avionix.kube.apps¶
-
class
avionix.kube.apps.ControllerRevision(metadata, data, revision, api_version=None)¶ - Parameters
metadata (
ObjectMeta) – Standard object’s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata # noqadata (
dict) – Data is the serialized representation of the state.revision (
int) – Revision indicates the revision of the state represented by Data.api_version (
Optional[str]) – APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa
-
class
avionix.kube.apps.ControllerRevisionList(metadata, items, api_version=None)¶ - Parameters
metadata (
ListMeta) – More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata # noqaitems (
List[ControllerRevision]) – Items is the list of ControllerRevisionsapi_version (
Optional[str]) – APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa
-
class
avionix.kube.apps.DaemonSet(metadata, spec, api_version=None)¶ - Parameters
metadata (
ObjectMeta) – Standard object’s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata # noqaspec (
DaemonSetSpec) – The desired behavior of this daemon set. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status # noqaapi_version (
Optional[str]) – APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa
-
class
avionix.kube.apps.DaemonSetCondition(last_transition_time, message, reason, type)¶ - Parameters
last_transition_time (
time) – Last time the condition transitioned from one status to another.message (
str) – A human readable message indicating details about the transition.reason (
str) – The reason for the condition’s last transition.type (
str) – Type of DaemonSet condition.
-
class
avionix.kube.apps.DaemonSetList(metadata, items, api_version=None)¶ - Parameters
metadata (
ListMeta) – Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata # noqaitems (
List[DaemonSet]) – A list of daemon sets.api_version (
Optional[str]) – APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa
-
class
avionix.kube.apps.DaemonSetSpec(template, selector, min_ready_seconds=None, revision_history_limit=None, update_strategy=None)¶ - Parameters
template (
PodTemplateSpec) – An object that describes the pod that will be created. The DaemonSet will create exactly one copy of this pod on every node that matches the template’s node selector (or on every node if no node selector is specified). More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template # noqaselector (
LabelSelector) – A label query over pods that are managed by the daemon set. Must match in order to be controlled. It must match the pod template’s labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors # noqamin_ready_seconds (
Optional[int]) – The minimum number of seconds for which a newly created DaemonSet pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready).revision_history_limit (
Optional[int]) – The number of old history to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10.update_strategy (
Optional[DaemonSetUpdateStrategy]) – An update strategy to replace existing DaemonSet pods with new pods.
-
class
avionix.kube.apps.DaemonSetUpdateStrategy(rolling_update=None, type=None)¶ - Parameters
rolling_update (
Optional[RollingUpdateDaemonSet]) – Rolling update config params. Present only if type = “RollingUpdate”.type (
Optional[str]) – Type of daemon set update. Can be “RollingUpdate” or “OnDelete”. Default is RollingUpdate.
-
class
avionix.kube.apps.Deployment(metadata, spec, api_version=None)¶ - Parameters
metadata (
ObjectMeta) – Standard object metadata.spec (
DeploymentSpec) – Specification of the desired behavior of the Deployment.api_version (
Optional[str]) – APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa
-
class
avionix.kube.apps.DeploymentCondition(last_transition_time, last_update_time, message, reason, type)¶ - Parameters
last_transition_time (
time) – Last time the condition transitioned from one status to another.last_update_time (
time) – The last time this condition was updated.message (
str) – A human readable message indicating details about the transition.reason (
str) – The reason for the condition’s last transition.type (
str) – Type of deployment condition.
-
class
avionix.kube.apps.DeploymentList(metadata, items, api_version=None)¶ - Parameters
metadata (
ListMeta) – Standard list metadata.items (
List[Deployment]) – Items is the list of Deployments.api_version (
Optional[str]) – APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa
-
class
avionix.kube.apps.DeploymentSpec(template, selector, min_ready_seconds=None, paused=None, progress_deadline_seconds=None, replicas=None, revision_history_limit=None, strategy=None)¶ - Parameters
template (
PodTemplateSpec) – Template describes the pods that will be created.selector (
LabelSelector) – Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment. It must match the pod template’s labels.min_ready_seconds (
Optional[int]) – Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)paused (
Optional[bool]) – Indicates that the deployment is paused.progress_deadline_seconds (
Optional[int]) – The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s.replicas (
Optional[int]) – Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.revision_history_limit (
Optional[int]) – The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10.strategy (
Optional[DeploymentStrategy]) – The deployment strategy to use to replace existing pods with new ones.
-
class
avionix.kube.apps.DeploymentStrategy(rolling_update=None, type=None)¶ - Parameters
rolling_update (
Optional[RollingUpdateDeployment]) – Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate.type (
Optional[str]) – Type of deployment. Can be “Recreate” or “RollingUpdate”. Default is RollingUpdate.
-
class
avionix.kube.apps.ReplicaSet(metadata, spec, api_version=None)¶ - Parameters
metadata (
ObjectMeta) – If the Labels of a ReplicaSet are empty, they are defaulted to be the same as the Pod(s) that the ReplicaSet manages. Standard object’s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata # noqaspec (
ReplicaSetSpec) – Spec defines the specification of the desired behavior of the ReplicaSet. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status # noqaapi_version (
Optional[str]) – APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa
-
class
avionix.kube.apps.ReplicaSetCondition(last_transition_time, message, reason, type)¶ - Parameters
last_transition_time (
time) – The last time the condition transitioned from one status to another.message (
str) – A human readable message indicating details about the transition.reason (
str) – The reason for the condition’s last transition.type (
str) – Type of replica set condition.
-
class
avionix.kube.apps.ReplicaSetList(metadata, items, api_version=None)¶ - Parameters
metadata (
ListMeta) – Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqaitems (
List[ReplicaSet]) – List of ReplicaSets. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller # noqaapi_version (
Optional[str]) – APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa
-
class
avionix.kube.apps.ReplicaSetSpec(template, selector, min_ready_seconds=None, replicas=None)¶ - Parameters
template (
PodTemplateSpec) – Template is the object that describes the pod that will be created if insufficient replicas are detected. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template # noqaselector (
LabelSelector) – Selector is a label query over pods that should match the replica count. Label keys and values that must match in order to be controlled by this replica set. It must match the pod template’s labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors # noqamin_ready_seconds (
Optional[int]) – Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)replicas (
Optional[int]) – Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller # noqa
-
class
avionix.kube.apps.RollingUpdateDaemonSet(max_unavailable)¶ - Parameters
max_unavailable (
str) – The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0. Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update.
-
class
avionix.kube.apps.RollingUpdateDeployment(max_surge=None, max_unavailable=None)¶ - Parameters
max_surge (
Optional[str]) – The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new ReplicaSet can be scaled up further, ensuring that total number of pods running at any time during the update is at most 130% of desired pods.max_unavailable (
Optional[str]) – The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old ReplicaSet can be scaled down further, followed by scaling up the new ReplicaSet, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.
-
class
avionix.kube.apps.RollingUpdateStatefulSetStrategy(partition)¶ - Parameters
partition (
int) – Partition indicates the ordinal at which the StatefulSet should be partitioned. Default value is 0.
-
class
avionix.kube.apps.StatefulSet(metadata, spec, api_version=None)¶ - Parameters
metadata (
ObjectMeta) – Nonespec (
StatefulSetSpec) – Spec defines the desired identities of pods in this set.api_version (
Optional[str]) – APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa
-
class
avionix.kube.apps.StatefulSetCondition(last_transition_time, message, reason, type)¶ - Parameters
last_transition_time (
time) – Last time the condition transitioned from one status to another.message (
str) – A human readable message indicating details about the transition.reason (
str) – The reason for the condition’s last transition.type (
str) – Type of statefulset condition.
-
class
avionix.kube.apps.StatefulSetList(metadata, items, api_version=None)¶ - Parameters
metadata (
ListMeta) – Noneitems (
List[StatefulSet]) – Noneapi_version (
Optional[str]) – APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa
-
class
avionix.kube.apps.StatefulSetSpec(template, pod_management_policy, revision_history_limit, selector, service_name, volume_claim_templates, replicas=None, update_strategy=None)¶ - Parameters
template (
PodTemplateSpec) – template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet.pod_management_policy (
str) – podManagementPolicy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down. The default policy is OrderedReady, where pods are created in increasing order (pod-0, then pod-1, etc) and the controller will wait until each pod is ready before continuing. When scaling down, the pods are removed in the opposite order. The alternative policy is Parallel which will create pods in parallel to match the desired scale without waiting, and on scale down will delete all pods at once.revision_history_limit (
int) – revisionHistoryLimit is the maximum number of revisions that will be maintained in the StatefulSet’s revision history. The revision history consists of all revisions not represented by a currently applied StatefulSetSpec version. The default value is 10.selector (
LabelSelector) – selector is a label query over pods that should match the replica count. It must match the pod template’s labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors # noqaservice_name (
str) – serviceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where “pod-specific-string” is managed by the StatefulSet controller.volume_claim_templates (
List[PersistentVolumeClaim]) – volumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name.replicas (
Optional[int]) – replicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1.update_strategy (
Optional[StatefulSetUpdateStrategy]) – updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template.
-
class
avionix.kube.apps.StatefulSetUpdateStrategy(rolling_update, type=None)¶ - Parameters
rolling_update (
RollingUpdateStatefulSetStrategy) – RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType.type (
Optional[str]) – Type indicates the type of the StatefulSetUpdateStrategy. Default is RollingUpdate.