PHPackages                             mammatus/kubernetes-attributes - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. mammatus/kubernetes-attributes

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

mammatus/kubernetes-attributes
==============================

⏱️ Cron manager

1.1.0(6mo ago)059.8k↑275%[2 issues](https://github.com/MammatusPHP/kubernetes-attributes/issues)[1 PRs](https://github.com/MammatusPHP/kubernetes-attributes/pulls)MITMakefilePHP ^8.4CI passing

Since Oct 16Pushed 6d ago1 watchersCompare

[ Source](https://github.com/MammatusPHP/kubernetes-attributes)[ Packagist](https://packagist.org/packages/mammatus/kubernetes-attributes)[ GitHub Sponsors](https://github.com/WyriHaximus)[ RSS](/packages/mammatus-kubernetes-attributes/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (2)Dependencies (3)Versions (5)Used By (0)

Contracts for Kubernetes related attributes
===========================================

[](#contracts-for-kubernetes-related-attributes)

[![Continuous Integration](https://github.com/mammatusphp/kubernetes-attributes/workflows/Continuous%20Integration/badge.svg)](https://github.com/mammatusphp/kubernetes-attributes/workflows/Continuous%20Integration/badge.svg)[![Latest Stable Version](https://camo.githubusercontent.com/ae96f2382cadf59b28392b5ba281db73456dcfbe270e501cc77429df9611cdea/68747470733a2f2f706f7365722e707567782e6f72672f6d616d6d617475732f6b756265726e657465732d617474726962757465732f762f737461626c652e706e67)](https://packagist.org/packages/mammatus/kubernetes-attributes)[![Total Downloads](https://camo.githubusercontent.com/6fc10b453f6109b44d1bc88b54c487d5711fbb8dce4da201ed38d3cf591428e7/68747470733a2f2f706f7365722e707567782e6f72672f6d616d6d617475732f6b756265726e657465732d617474726962757465732f646f776e6c6f6164732e706e67)](https://packagist.org/packages/mammatus/kubernetes-attributes/stats)[![Type Coverage](https://camo.githubusercontent.com/03ec0480f32ba9bf4d538fa537eccd41c1c5e4b223e162e03300ff9b3944778c/68747470733a2f2f73686570686572642e6465762f6769746875622f6d616d6d617475737068702f6b756265726e657465732d617474726962757465732f636f7665726167652e737667)](https://shepherd.dev/github/mammatusphp/kubernetes-attributes)[![License](https://camo.githubusercontent.com/1570e8430c963864c53b2d4b85888bd04cafd510e6f3dfc6c3f09701101b37dc/68747470733a2f2f706f7365722e707567782e6f72672f6d616d6d617475732f6b756265726e657465732d617474726962757465732f6c6963656e73652e706e67)](https://packagist.org/packages/mammatus/kubernetes-attributes)

Install
=======

[](#install)

To install via [Composer](http://getcomposer.org/), use the command below, it will automatically detect the latest version and bind it with `^`.

```
composer require mammatus/kubernetes-attributes

```

Attributes
==========

[](#attributes)

This package provides the following attributes:

Resources
---------

[](#resources)

The `Resources` attribute is an addon for other attributes used in conjunction with the `SplitOut` attribute to configure the expected resources a split out operation can used. Both the `cpu` and `memory` arguments must provided with a non-negative value. The `cpu` argument works in full CPU cores. It translates everything into the string notation, so `1` becomes `1000m` and `13.37` becomes `13370m`. Same goes for the `memory` argument, it takes in GigaBytes and turns it into MegaBytes. `0.5` becomes `512Mi`.

SplitOut
--------

[](#splitout)

Mammatus is build with both big and small budgets in mind. By default every HTTP server, queue consumer, cronjob etc will run in a general all purpose pod. By using the `SplitOut` on that specific class will mark it to be a separate resource in Kubernetes. Cronjobs will become Kubernetes cronjob, the rest will become a deployment.

Example
=======

[](#example)

The following example is from one of the services that runs on my home cluster using both the `Resources` and `SplitOut` attributes:

```
