package kubecaml

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

A Stateful_set_spec is the specification of a Stateful_set.

type t
val to_yojson : t -> Yojson.Safe.t
val make : ?volume_claim_templates: Kubernetes.Definitions.Api.Core.V1.Persistent_volume_claim.t list -> ?update_strategy: Kubernetes.Definitions.Api.Apps.V1beta1.Stateful_set_update_strategy.t -> template:Kubernetes.Definitions.Api.Core.V1.Pod_template_spec.t -> service_name:string -> ?selector: Kubernetes.Definitions.Apimachinery.Pkg.Apis.Meta.V1.Label_selector.t -> ?revision_history_limit:int -> ?replicas:int -> ?pod_management_policy:string -> unit -> t
val pod_management_policy : t -> string option

pod_management_policy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down. The default policy is `ordered_ready`, 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.

val replicas : t -> int option

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.

val revision_history_limit : t -> int option

revision_history_limit is the maximum number of revisions that will be maintained in the Stateful_set's revision history. The revision history consists of all revisions not represented by a currently applied Stateful_set_spec version. The default value is 10.

selector is a label query over pods that should match the replica count. If empty, defaulted to labels on the pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors

val service_name : t -> string

service_name is the name of the service that governs this Stateful_set. This service must exist before the Stateful_set, and is responsible for the network identity of the set. Pods get Dns/hostnames that follow the pattern: pod_specific_string.service_name.default.svc.cluster.local where "pod_specific_string" is managed by the Stateful_set controller.

template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the Stateful_set will fulfill this Template, but have a unique identity from the rest of the Stateful_set.

update_strategy indicates the Stateful_set_update_strategy that will be employed to update Pods in the Stateful_set when a revision is made to Template.

val volume_claim_templates : t -> Kubernetes.Definitions.Api.Core.V1.Persistent_volume_claim.t list option

volume_claim_templates is a list of claims that pods are allowed to reference. The Stateful_set 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) volume_mount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name.

module Object : Object.S with type value := t
OCaml

Innovation. Community. Security.