Skip to content

events.v1alpha1.eventSource

Index

Fields

obj metadata

"ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create."

fn metadata.withAnnotations

withAnnotations(annotations)

"Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations"

fn metadata.withAnnotationsMixin

withAnnotationsMixin(annotations)

"Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations"

Note: This function appends passed data to existing values

fn metadata.withClusterName

withClusterName(clusterName)

"The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request."

fn metadata.withCreationTimestamp

withCreationTimestamp(creationTimestamp)

"Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers."

fn metadata.withDeletionGracePeriodSeconds

withDeletionGracePeriodSeconds(deletionGracePeriodSeconds)

"Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only."

fn metadata.withDeletionTimestamp

withDeletionTimestamp(deletionTimestamp)

"Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers."

fn metadata.withFinalizers

withFinalizers(finalizers)

"Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. Finalizers may be processed and removed in any order. Order is NOT enforced because it introduces significant risk of stuck finalizers. finalizers is a shared field, any actor with permission can reorder it. If the finalizer list is processed in order, then this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a signal (field value, external system, or other) produced by a component responsible for a finalizer later in the list, resulting in a deadlock. Without enforced ordering finalizers are free to order amongst themselves and are not vulnerable to ordering changes in the list."

fn metadata.withFinalizersMixin

withFinalizersMixin(finalizers)

"Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. Finalizers may be processed and removed in any order. Order is NOT enforced because it introduces significant risk of stuck finalizers. finalizers is a shared field, any actor with permission can reorder it. If the finalizer list is processed in order, then this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a signal (field value, external system, or other) produced by a component responsible for a finalizer later in the list, resulting in a deadlock. Without enforced ordering finalizers are free to order amongst themselves and are not vulnerable to ordering changes in the list."

Note: This function appends passed data to existing values

fn metadata.withGenerateName

withGenerateName(generateName)

"GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency"

fn metadata.withGeneration

withGeneration(generation)

"A sequence number representing a specific generation of the desired state. Populated by the system. Read-only."

fn metadata.withLabels

withLabels(labels)

"Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels"

fn metadata.withLabelsMixin

withLabelsMixin(labels)

"Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels"

Note: This function appends passed data to existing values

fn metadata.withManagedFields

withManagedFields(managedFields)

"ManagedFields maps workflow-id and version to the set of fields that are managed by that workflow. This is mostly for internal housekeeping, and users typically shouldn't need to set or understand this field. A workflow can be the user's name, a controller's name, or the name of a specific apply path like \"ci-cd\". The set of fields is always in the version that the workflow used when modifying the object."

fn metadata.withManagedFieldsMixin

withManagedFieldsMixin(managedFields)

"ManagedFields maps workflow-id and version to the set of fields that are managed by that workflow. This is mostly for internal housekeeping, and users typically shouldn't need to set or understand this field. A workflow can be the user's name, a controller's name, or the name of a specific apply path like \"ci-cd\". The set of fields is always in the version that the workflow used when modifying the object."

Note: This function appends passed data to existing values

fn metadata.withName

withName(name)

"Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names"

fn metadata.withNamespace

withNamespace(namespace)

"Namespace defines the space within which each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces"

fn metadata.withOwnerReferences

withOwnerReferences(ownerReferences)

"List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller."

fn metadata.withOwnerReferencesMixin

withOwnerReferencesMixin(ownerReferences)

"List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller."

Note: This function appends passed data to existing values

fn metadata.withResourceVersion

withResourceVersion(resourceVersion)

"An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency"

withSelfLink(selfLink)

"SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release."

fn metadata.withUid

withUid(uid)

"UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\n\nPopulated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids"

obj spec

fn spec.withAmqp

withAmqp(amqp)

fn spec.withAmqpMixin

withAmqpMixin(amqp)

Note: This function appends passed data to existing values

fn spec.withAzureEventsHub

withAzureEventsHub(azureEventsHub)

fn spec.withAzureEventsHubMixin

withAzureEventsHubMixin(azureEventsHub)

Note: This function appends passed data to existing values

fn spec.withBitbucket

withBitbucket(bitbucket)

fn spec.withBitbucketMixin

withBitbucketMixin(bitbucket)

Note: This function appends passed data to existing values

fn spec.withBitbucketserver

withBitbucketserver(bitbucketserver)

fn spec.withBitbucketserverMixin

withBitbucketserverMixin(bitbucketserver)

Note: This function appends passed data to existing values

fn spec.withCalendar

withCalendar(calendar)

fn spec.withCalendarMixin

withCalendarMixin(calendar)

Note: This function appends passed data to existing values

fn spec.withEmitter

withEmitter(emitter)

fn spec.withEmitterMixin

withEmitterMixin(emitter)

Note: This function appends passed data to existing values

fn spec.withEventBusName

withEventBusName(eventBusName)

fn spec.withFile

withFile(file)

fn spec.withFileMixin

withFileMixin(file)

Note: This function appends passed data to existing values

fn spec.withGeneric

withGeneric(generic)

fn spec.withGenericMixin

withGenericMixin(generic)

Note: This function appends passed data to existing values

fn spec.withGithub

withGithub(github)

fn spec.withGithubMixin

withGithubMixin(github)

Note: This function appends passed data to existing values

fn spec.withGitlab

withGitlab(gitlab)

fn spec.withGitlabMixin

withGitlabMixin(gitlab)

Note: This function appends passed data to existing values

fn spec.withHdfs

withHdfs(hdfs)

fn spec.withHdfsMixin

withHdfsMixin(hdfs)

Note: This function appends passed data to existing values

fn spec.withKafka

withKafka(kafka)

fn spec.withKafkaMixin

withKafkaMixin(kafka)

Note: This function appends passed data to existing values

fn spec.withMinio

withMinio(minio)

fn spec.withMinioMixin

withMinioMixin(minio)

Note: This function appends passed data to existing values

fn spec.withMqtt

withMqtt(mqtt)

fn spec.withMqttMixin

withMqttMixin(mqtt)

Note: This function appends passed data to existing values

fn spec.withNats

withNats(nats)

fn spec.withNatsMixin

withNatsMixin(nats)

Note: This function appends passed data to existing values

fn spec.withNsq

withNsq(nsq)

fn spec.withNsqMixin

withNsqMixin(nsq)

Note: This function appends passed data to existing values

fn spec.withPubSub

withPubSub(pubSub)

fn spec.withPubSubMixin

withPubSubMixin(pubSub)

Note: This function appends passed data to existing values

fn spec.withPulsar

withPulsar(pulsar)

fn spec.withPulsarMixin

withPulsarMixin(pulsar)

Note: This function appends passed data to existing values

fn spec.withRedis

withRedis(redis)

fn spec.withRedisMixin

withRedisMixin(redis)

Note: This function appends passed data to existing values

fn spec.withReplicas

withReplicas(replicas)

fn spec.withResource

withResource(resource)

fn spec.withResourceMixin

withResourceMixin(resource)

Note: This function appends passed data to existing values

fn spec.withSlack

withSlack(slack)

fn spec.withSlackMixin

withSlackMixin(slack)

Note: This function appends passed data to existing values

fn spec.withSns

withSns(sns)

fn spec.withSnsMixin

withSnsMixin(sns)

Note: This function appends passed data to existing values

fn spec.withSqs

withSqs(sqs)

fn spec.withSqsMixin

withSqsMixin(sqs)

Note: This function appends passed data to existing values

fn spec.withStorageGrid

withStorageGrid(storageGrid)

fn spec.withStorageGridMixin

withStorageGridMixin(storageGrid)

Note: This function appends passed data to existing values

fn spec.withStripe

withStripe(stripe)

fn spec.withStripeMixin

withStripeMixin(stripe)

Note: This function appends passed data to existing values

fn spec.withWebhook

withWebhook(webhook)

fn spec.withWebhookMixin

withWebhookMixin(webhook)

Note: This function appends passed data to existing values

obj spec.service

fn spec.service.withClusterIP

withClusterIP(clusterIP)

fn spec.service.withPorts

withPorts(ports)

fn spec.service.withPortsMixin

withPortsMixin(ports)

Note: This function appends passed data to existing values

obj spec.template

fn spec.template.withImagePullSecrets

withImagePullSecrets(imagePullSecrets)

fn spec.template.withImagePullSecretsMixin

withImagePullSecretsMixin(imagePullSecrets)

Note: This function appends passed data to existing values

fn spec.template.withNodeSelector

withNodeSelector(nodeSelector)

fn spec.template.withNodeSelectorMixin

withNodeSelectorMixin(nodeSelector)

Note: This function appends passed data to existing values

fn spec.template.withPriority

withPriority(priority)

fn spec.template.withPriorityClassName

withPriorityClassName(priorityClassName)

fn spec.template.withServiceAccountName

withServiceAccountName(serviceAccountName)

fn spec.template.withTolerations

withTolerations(tolerations)

fn spec.template.withTolerationsMixin

withTolerationsMixin(tolerations)

Note: This function appends passed data to existing values

fn spec.template.withVolumes

withVolumes(volumes)

fn spec.template.withVolumesMixin

withVolumesMixin(volumes)

Note: This function appends passed data to existing values

obj spec.template.affinity

"Affinity is a group of affinity scheduling rules."

obj spec.template.affinity.nodeAffinity

"Node affinity is a group of node affinity scheduling rules."

fn spec.template.affinity.nodeAffinity.withPreferredDuringSchedulingIgnoredDuringExecution

withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution)

"The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred."

fn spec.template.affinity.nodeAffinity.withPreferredDuringSchedulingIgnoredDuringExecutionMixin

withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution)

"The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred."

Note: This function appends passed data to existing values

obj spec.template.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution

"A node selector represents the union of the results of one or more label queries over a set of nodes; that is, it represents the OR of the selectors represented by the node selector terms."

fn spec.template.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.withNodeSelectorTerms

withNodeSelectorTerms(nodeSelectorTerms)

"Required. A list of node selector terms. The terms are ORed."

fn spec.template.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.withNodeSelectorTermsMixin

withNodeSelectorTermsMixin(nodeSelectorTerms)

"Required. A list of node selector terms. The terms are ORed."

Note: This function appends passed data to existing values

obj spec.template.affinity.podAffinity

"Pod affinity is a group of inter pod affinity scheduling rules."

fn spec.template.affinity.podAffinity.withPreferredDuringSchedulingIgnoredDuringExecution

withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution)

"The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred."

fn spec.template.affinity.podAffinity.withPreferredDuringSchedulingIgnoredDuringExecutionMixin

withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution)

"The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred."

Note: This function appends passed data to existing values

fn spec.template.affinity.podAffinity.withRequiredDuringSchedulingIgnoredDuringExecution

withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution)

"If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied."

fn spec.template.affinity.podAffinity.withRequiredDuringSchedulingIgnoredDuringExecutionMixin

withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution)

"If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied."

Note: This function appends passed data to existing values

obj spec.template.affinity.podAntiAffinity

"Pod anti affinity is a group of inter pod anti affinity scheduling rules."

fn spec.template.affinity.podAntiAffinity.withPreferredDuringSchedulingIgnoredDuringExecution

withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution)

"The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred."

fn spec.template.affinity.podAntiAffinity.withPreferredDuringSchedulingIgnoredDuringExecutionMixin

withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution)

"The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred."

Note: This function appends passed data to existing values

fn spec.template.affinity.podAntiAffinity.withRequiredDuringSchedulingIgnoredDuringExecution

withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution)

"If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied."

fn spec.template.affinity.podAntiAffinity.withRequiredDuringSchedulingIgnoredDuringExecutionMixin

withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution)

"If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied."

Note: This function appends passed data to existing values

obj spec.template.container

"A single application container that you want to run within a pod."

fn spec.template.container.withArgs

withArgs(args)

"Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell"

fn spec.template.container.withArgsMixin

withArgsMixin(args)

"Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell"

Note: This function appends passed data to existing values

fn spec.template.container.withCommand

withCommand(command)

"Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell"

fn spec.template.container.withCommandMixin

withCommandMixin(command)

"Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell"

Note: This function appends passed data to existing values

fn spec.template.container.withEnv

withEnv(env)

"List of environment variables to set in the container. Cannot be updated."

fn spec.template.container.withEnvFrom

withEnvFrom(envFrom)

"List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated."

fn spec.template.container.withEnvFromMixin

withEnvFromMixin(envFrom)

"List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated."

Note: This function appends passed data to existing values

fn spec.template.container.withEnvMixin

withEnvMixin(env)

"List of environment variables to set in the container. Cannot be updated."

Note: This function appends passed data to existing values

fn spec.template.container.withImage

withImage(image)

"Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images This field is optional to allow higher level config management to default or override container images in workload controllers like Deployments and StatefulSets."

fn spec.template.container.withImagePullPolicy

withImagePullPolicy(imagePullPolicy)

"Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images\n\nPossible enum values:\n - \"Always\" means that kubelet always attempts to pull the latest image. Container will fail If the pull fails.\n - \"IfNotPresent\" means that kubelet pulls if the image isn't present on disk. Container will fail if the image isn't present and the pull fails.\n - \"Never\" means that kubelet never pulls an image, but only uses a local image. Container will fail if the image isn't present"

fn spec.template.container.withName

withName(name)

"Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated."

fn spec.template.container.withPorts

withPorts(ports)

"List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Cannot be updated."

fn spec.template.container.withPortsMixin

withPortsMixin(ports)

"List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Cannot be updated."

Note: This function appends passed data to existing values

fn spec.template.container.withStdin

withStdin(stdin)

"Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false."

fn spec.template.container.withStdinOnce

withStdinOnce(stdinOnce)

"Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false"

fn spec.template.container.withTerminationMessagePath

withTerminationMessagePath(terminationMessagePath)

"Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated."

fn spec.template.container.withTerminationMessagePolicy

withTerminationMessagePolicy(terminationMessagePolicy)

"Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.\n\nPossible enum values:\n - \"FallbackToLogsOnError\" will read the most recent contents of the container logs for the container status message when the container exits with an error and the terminationMessagePath has no contents.\n - \"File\" is the default behavior and will set the container status message to the contents of the container's terminationMessagePath when the container exits."

fn spec.template.container.withTty

withTty(tty)

"Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false."

fn spec.template.container.withVolumeDevices

withVolumeDevices(volumeDevices)

"volumeDevices is the list of block devices to be used by the container."

fn spec.template.container.withVolumeDevicesMixin

withVolumeDevicesMixin(volumeDevices)

"volumeDevices is the list of block devices to be used by the container."

Note: This function appends passed data to existing values

fn spec.template.container.withVolumeMounts

withVolumeMounts(volumeMounts)

"Pod volumes to mount into the container's filesystem. Cannot be updated."

fn spec.template.container.withVolumeMountsMixin

withVolumeMountsMixin(volumeMounts)

"Pod volumes to mount into the container's filesystem. Cannot be updated."

Note: This function appends passed data to existing values

fn spec.template.container.withWorkingDir

withWorkingDir(workingDir)

"Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated."

obj spec.template.container.lifecycle

"Lifecycle describes actions that the management system should take in response to container lifecycle events. For the PostStart and PreStop lifecycle handlers, management of the container blocks until the action is complete, unless the container process fails, in which case the handler is aborted."

obj spec.template.container.lifecycle.postStart

"LifecycleHandler defines a specific action that should be taken in a lifecycle hook. One and only one of the fields, except TCPSocket must be specified."

obj spec.template.container.lifecycle.postStart.exec

"ExecAction describes a \"run in container\" action."

fn spec.template.container.lifecycle.postStart.exec.withCommand

withCommand(command)

"Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy."

fn spec.template.container.lifecycle.postStart.exec.withCommandMixin

withCommandMixin(command)

"Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy."

Note: This function appends passed data to existing values

obj spec.template.container.lifecycle.postStart.httpGet

"HTTPGetAction describes an action based on HTTP Get requests."

fn spec.template.container.lifecycle.postStart.httpGet.withHost

withHost(host)

"Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead."

fn spec.template.container.lifecycle.postStart.httpGet.withHttpHeaders

withHttpHeaders(httpHeaders)

"Custom headers to set in the request. HTTP allows repeated headers."

fn spec.template.container.lifecycle.postStart.httpGet.withHttpHeadersMixin

withHttpHeadersMixin(httpHeaders)

"Custom headers to set in the request. HTTP allows repeated headers."

Note: This function appends passed data to existing values

fn spec.template.container.lifecycle.postStart.httpGet.withPath

withPath(path)

"Path to access on the HTTP server."

fn spec.template.container.lifecycle.postStart.httpGet.withPort

withPort(port)

fn spec.template.container.lifecycle.postStart.httpGet.withScheme

withScheme(scheme)

"Scheme to use for connecting to the host. Defaults to HTTP.\n\nPossible enum values:\n - \"HTTP\" means that the scheme used will be http://\n - \"HTTPS\" means that the scheme used will be https://"

obj spec.template.container.lifecycle.postStart.tcpSocket

"TCPSocketAction describes an action based on opening a socket"

fn spec.template.container.lifecycle.postStart.tcpSocket.withHost

withHost(host)

"Optional: Host name to connect to, defaults to the pod IP."

fn spec.template.container.lifecycle.postStart.tcpSocket.withPort

withPort(port)

obj spec.template.container.lifecycle.preStop

"LifecycleHandler defines a specific action that should be taken in a lifecycle hook. One and only one of the fields, except TCPSocket must be specified."

obj spec.template.container.lifecycle.preStop.exec

"ExecAction describes a \"run in container\" action."

fn spec.template.container.lifecycle.preStop.exec.withCommand

withCommand(command)

"Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy."

fn spec.template.container.lifecycle.preStop.exec.withCommandMixin

withCommandMixin(command)

"Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy."

Note: This function appends passed data to existing values

obj spec.template.container.lifecycle.preStop.httpGet

"HTTPGetAction describes an action based on HTTP Get requests."

fn spec.template.container.lifecycle.preStop.httpGet.withHost

withHost(host)

"Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead."

fn spec.template.container.lifecycle.preStop.httpGet.withHttpHeaders

withHttpHeaders(httpHeaders)

"Custom headers to set in the request. HTTP allows repeated headers."

fn spec.template.container.lifecycle.preStop.httpGet.withHttpHeadersMixin

withHttpHeadersMixin(httpHeaders)

"Custom headers to set in the request. HTTP allows repeated headers."

Note: This function appends passed data to existing values

fn spec.template.container.lifecycle.preStop.httpGet.withPath

withPath(path)

"Path to access on the HTTP server."

fn spec.template.container.lifecycle.preStop.httpGet.withPort

withPort(port)

fn spec.template.container.lifecycle.preStop.httpGet.withScheme

withScheme(scheme)

"Scheme to use for connecting to the host. Defaults to HTTP.\n\nPossible enum values:\n - \"HTTP\" means that the scheme used will be http://\n - \"HTTPS\" means that the scheme used will be https://"

obj spec.template.container.lifecycle.preStop.tcpSocket

"TCPSocketAction describes an action based on opening a socket"

fn spec.template.container.lifecycle.preStop.tcpSocket.withHost

withHost(host)

"Optional: Host name to connect to, defaults to the pod IP."

fn spec.template.container.lifecycle.preStop.tcpSocket.withPort

withPort(port)

obj spec.template.container.livenessProbe

"Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic."

fn spec.template.container.livenessProbe.withFailureThreshold

withFailureThreshold(failureThreshold)

"Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1."

fn spec.template.container.livenessProbe.withInitialDelaySeconds

withInitialDelaySeconds(initialDelaySeconds)

"Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes"

fn spec.template.container.livenessProbe.withPeriodSeconds

withPeriodSeconds(periodSeconds)

"How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1."

fn spec.template.container.livenessProbe.withSuccessThreshold

withSuccessThreshold(successThreshold)

"Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1."

fn spec.template.container.livenessProbe.withTerminationGracePeriodSeconds

withTerminationGracePeriodSeconds(terminationGracePeriodSeconds)

"Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset."

fn spec.template.container.livenessProbe.withTimeoutSeconds

withTimeoutSeconds(timeoutSeconds)

"Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes"

obj spec.template.container.livenessProbe.exec

"ExecAction describes a \"run in container\" action."

fn spec.template.container.livenessProbe.exec.withCommand

withCommand(command)

"Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy."

fn spec.template.container.livenessProbe.exec.withCommandMixin

withCommandMixin(command)

"Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy."

Note: This function appends passed data to existing values

obj spec.template.container.livenessProbe.grpc

fn spec.template.container.livenessProbe.grpc.withPort

withPort(port)

"Port number of the gRPC service. Number must be in the range 1 to 65535."

fn spec.template.container.livenessProbe.grpc.withService

withService(service)

"Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).\n\nIf this is not specified, the default behavior is defined by gRPC."

obj spec.template.container.livenessProbe.httpGet

"HTTPGetAction describes an action based on HTTP Get requests."

fn spec.template.container.livenessProbe.httpGet.withHost

withHost(host)

"Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead."

fn spec.template.container.livenessProbe.httpGet.withHttpHeaders

withHttpHeaders(httpHeaders)

"Custom headers to set in the request. HTTP allows repeated headers."

fn spec.template.container.livenessProbe.httpGet.withHttpHeadersMixin

withHttpHeadersMixin(httpHeaders)

"Custom headers to set in the request. HTTP allows repeated headers."

Note: This function appends passed data to existing values

fn spec.template.container.livenessProbe.httpGet.withPath

withPath(path)

"Path to access on the HTTP server."

fn spec.template.container.livenessProbe.httpGet.withPort

withPort(port)

fn spec.template.container.livenessProbe.httpGet.withScheme

withScheme(scheme)

"Scheme to use for connecting to the host. Defaults to HTTP.\n\nPossible enum values:\n - \"HTTP\" means that the scheme used will be http://\n - \"HTTPS\" means that the scheme used will be https://"

obj spec.template.container.livenessProbe.tcpSocket

"TCPSocketAction describes an action based on opening a socket"

fn spec.template.container.livenessProbe.tcpSocket.withHost

withHost(host)

"Optional: Host name to connect to, defaults to the pod IP."

fn spec.template.container.livenessProbe.tcpSocket.withPort

withPort(port)

obj spec.template.container.readinessProbe

"Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic."

fn spec.template.container.readinessProbe.withFailureThreshold

withFailureThreshold(failureThreshold)

"Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1."

fn spec.template.container.readinessProbe.withInitialDelaySeconds

withInitialDelaySeconds(initialDelaySeconds)

"Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes"

fn spec.template.container.readinessProbe.withPeriodSeconds

withPeriodSeconds(periodSeconds)

"How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1."

fn spec.template.container.readinessProbe.withSuccessThreshold

withSuccessThreshold(successThreshold)

"Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1."

fn spec.template.container.readinessProbe.withTerminationGracePeriodSeconds

withTerminationGracePeriodSeconds(terminationGracePeriodSeconds)

"Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset."

fn spec.template.container.readinessProbe.withTimeoutSeconds

withTimeoutSeconds(timeoutSeconds)

"Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes"

obj spec.template.container.readinessProbe.exec

"ExecAction describes a \"run in container\" action."

fn spec.template.container.readinessProbe.exec.withCommand

withCommand(command)

"Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy."

fn spec.template.container.readinessProbe.exec.withCommandMixin

withCommandMixin(command)

"Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy."

Note: This function appends passed data to existing values

obj spec.template.container.readinessProbe.grpc

fn spec.template.container.readinessProbe.grpc.withPort

withPort(port)

"Port number of the gRPC service. Number must be in the range 1 to 65535."

fn spec.template.container.readinessProbe.grpc.withService

withService(service)

"Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).\n\nIf this is not specified, the default behavior is defined by gRPC."

obj spec.template.container.readinessProbe.httpGet

"HTTPGetAction describes an action based on HTTP Get requests."

fn spec.template.container.readinessProbe.httpGet.withHost

withHost(host)

"Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead."

fn spec.template.container.readinessProbe.httpGet.withHttpHeaders

withHttpHeaders(httpHeaders)

"Custom headers to set in the request. HTTP allows repeated headers."

fn spec.template.container.readinessProbe.httpGet.withHttpHeadersMixin

withHttpHeadersMixin(httpHeaders)

"Custom headers to set in the request. HTTP allows repeated headers."

Note: This function appends passed data to existing values

fn spec.template.container.readinessProbe.httpGet.withPath

withPath(path)

"Path to access on the HTTP server."

fn spec.template.container.readinessProbe.httpGet.withPort

withPort(port)

fn spec.template.container.readinessProbe.httpGet.withScheme

withScheme(scheme)

"Scheme to use for connecting to the host. Defaults to HTTP.\n\nPossible enum values:\n - \"HTTP\" means that the scheme used will be http://\n - \"HTTPS\" means that the scheme used will be https://"

obj spec.template.container.readinessProbe.tcpSocket

"TCPSocketAction describes an action based on opening a socket"

fn spec.template.container.readinessProbe.tcpSocket.withHost

withHost(host)

"Optional: Host name to connect to, defaults to the pod IP."

fn spec.template.container.readinessProbe.tcpSocket.withPort

withPort(port)

obj spec.template.container.resources

"ResourceRequirements describes the compute resource requirements."

fn spec.template.container.resources.withLimits

withLimits(limits)

"Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/"

fn spec.template.container.resources.withLimitsMixin

withLimitsMixin(limits)

"Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/"

Note: This function appends passed data to existing values

fn spec.template.container.resources.withRequests

withRequests(requests)

"Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/"

fn spec.template.container.resources.withRequestsMixin

withRequestsMixin(requests)

"Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/"

Note: This function appends passed data to existing values

obj spec.template.container.securityContext

"SecurityContext holds security configuration that will be applied to a container. Some fields are present in both SecurityContext and PodSecurityContext. When both are set, the values in SecurityContext take precedence."

fn spec.template.container.securityContext.withAllowPrivilegeEscalation

withAllowPrivilegeEscalation(allowPrivilegeEscalation)

"AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the container process. AllowPrivilegeEscalation is true always when the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN Note that this field cannot be set when spec.os.name is windows."

fn spec.template.container.securityContext.withPrivileged

withPrivileged(privileged)

"Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. Note that this field cannot be set when spec.os.name is windows."

fn spec.template.container.securityContext.withProcMount

withProcMount(procMount)

"procMount denotes the type of proc mount to use for the containers. The default is DefaultProcMount which uses the container runtime defaults for readonly paths and masked paths. This requires the ProcMountType feature flag to be enabled. Note that this field cannot be set when spec.os.name is windows."

fn spec.template.container.securityContext.withReadOnlyRootFilesystem

withReadOnlyRootFilesystem(readOnlyRootFilesystem)

"Whether this container has a read-only root filesystem. Default is false. Note that this field cannot be set when spec.os.name is windows."

fn spec.template.container.securityContext.withRunAsGroup

withRunAsGroup(runAsGroup)

"The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows."

fn spec.template.container.securityContext.withRunAsNonRoot

withRunAsNonRoot(runAsNonRoot)

"Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence."

fn spec.template.container.securityContext.withRunAsUser

withRunAsUser(runAsUser)

"The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows."

obj spec.template.container.securityContext.capabilities

"Adds and removes POSIX capabilities from running containers."

fn spec.template.container.securityContext.capabilities.withAdd

withAdd(add)

"Added capabilities"

fn spec.template.container.securityContext.capabilities.withAddMixin

withAddMixin(add)

"Added capabilities"

Note: This function appends passed data to existing values

fn spec.template.container.securityContext.capabilities.withDrop

withDrop(drop)

"Removed capabilities"

fn spec.template.container.securityContext.capabilities.withDropMixin

withDropMixin(drop)

"Removed capabilities"

Note: This function appends passed data to existing values

obj spec.template.container.securityContext.seLinuxOptions

"SELinuxOptions are the labels to be applied to the container"

fn spec.template.container.securityContext.seLinuxOptions.withLevel

withLevel(level)

"Level is SELinux level label that applies to the container."

fn spec.template.container.securityContext.seLinuxOptions.withRole

withRole(role)

"Role is a SELinux role label that applies to the container."

fn spec.template.container.securityContext.seLinuxOptions.withType

withType(type)

"Type is a SELinux type label that applies to the container."

fn spec.template.container.securityContext.seLinuxOptions.withUser

withUser(user)

"User is a SELinux user label that applies to the container."

obj spec.template.container.securityContext.seccompProfile

"SeccompProfile defines a pod/container's seccomp profile settings. Only one profile source may be set."

fn spec.template.container.securityContext.seccompProfile.withLocalhostProfile

withLocalhostProfile(localhostProfile)

"localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. Must be a descending path, relative to the kubelet's configured seccomp profile location. Must only be set if type is \"Localhost\"."

fn spec.template.container.securityContext.seccompProfile.withType

withType(type)

"type indicates which kind of seccomp profile will be applied. Valid options are:\n\nLocalhost - a profile defined in a file on the node should be used. RuntimeDefault - the container runtime default profile should be used. Unconfined - no profile should be applied.\n\nPossible enum values:\n - \"Localhost\" indicates a profile defined in a file on the node should be used. The file's location relative to /seccomp.\n - \"RuntimeDefault\" represents the default container runtime seccomp profile.\n - \"Unconfined\" indicates no seccomp profile is applied (A.K.A. unconfined)."

obj spec.template.container.securityContext.windowsOptions

"WindowsSecurityContextOptions contain Windows-specific options and credentials."

fn spec.template.container.securityContext.windowsOptions.withGmsaCredentialSpec

withGmsaCredentialSpec(gmsaCredentialSpec)

"GMSACredentialSpec is where the GMSA admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field."

fn spec.template.container.securityContext.windowsOptions.withGmsaCredentialSpecName

withGmsaCredentialSpecName(gmsaCredentialSpecName)

"GMSACredentialSpecName is the name of the GMSA credential spec to use."

fn spec.template.container.securityContext.windowsOptions.withHostProcess

withHostProcess(hostProcess)

"HostProcess determines if a container should be run as a 'Host Process' container. This field is alpha-level and will only be honored by components that enable the WindowsHostProcessContainers feature flag. Setting this field without the feature flag will result in errors when validating the Pod. All of a Pod's containers must have the same effective HostProcess value (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). In addition, if HostProcess is true then HostNetwork must also be set to true."

fn spec.template.container.securityContext.windowsOptions.withRunAsUserName

withRunAsUserName(runAsUserName)

"The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence."

obj spec.template.container.startupProbe

"Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic."

fn spec.template.container.startupProbe.withFailureThreshold

withFailureThreshold(failureThreshold)

"Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1."

fn spec.template.container.startupProbe.withInitialDelaySeconds

withInitialDelaySeconds(initialDelaySeconds)

"Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes"

fn spec.template.container.startupProbe.withPeriodSeconds

withPeriodSeconds(periodSeconds)

"How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1."

fn spec.template.container.startupProbe.withSuccessThreshold

withSuccessThreshold(successThreshold)

"Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1."

fn spec.template.container.startupProbe.withTerminationGracePeriodSeconds

withTerminationGracePeriodSeconds(terminationGracePeriodSeconds)

"Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset."

fn spec.template.container.startupProbe.withTimeoutSeconds

withTimeoutSeconds(timeoutSeconds)

"Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes"

obj spec.template.container.startupProbe.exec

"ExecAction describes a \"run in container\" action."

fn spec.template.container.startupProbe.exec.withCommand

withCommand(command)

"Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy."

fn spec.template.container.startupProbe.exec.withCommandMixin

withCommandMixin(command)

"Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy."

Note: This function appends passed data to existing values

obj spec.template.container.startupProbe.grpc

fn spec.template.container.startupProbe.grpc.withPort

withPort(port)

"Port number of the gRPC service. Number must be in the range 1 to 65535."

fn spec.template.container.startupProbe.grpc.withService

withService(service)

"Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).\n\nIf this is not specified, the default behavior is defined by gRPC."

obj spec.template.container.startupProbe.httpGet

"HTTPGetAction describes an action based on HTTP Get requests."

fn spec.template.container.startupProbe.httpGet.withHost

withHost(host)

"Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead."

fn spec.template.container.startupProbe.httpGet.withHttpHeaders

withHttpHeaders(httpHeaders)

"Custom headers to set in the request. HTTP allows repeated headers."

fn spec.template.container.startupProbe.httpGet.withHttpHeadersMixin

withHttpHeadersMixin(httpHeaders)

"Custom headers to set in the request. HTTP allows repeated headers."

Note: This function appends passed data to existing values

fn spec.template.container.startupProbe.httpGet.withPath

withPath(path)

"Path to access on the HTTP server."

fn spec.template.container.startupProbe.httpGet.withPort

withPort(port)

fn spec.template.container.startupProbe.httpGet.withScheme

withScheme(scheme)

"Scheme to use for connecting to the host. Defaults to HTTP.\n\nPossible enum values:\n - \"HTTP\" means that the scheme used will be http://\n - \"HTTPS\" means that the scheme used will be https://"

obj spec.template.container.startupProbe.tcpSocket

"TCPSocketAction describes an action based on opening a socket"

fn spec.template.container.startupProbe.tcpSocket.withHost

withHost(host)

"Optional: Host name to connect to, defaults to the pod IP."

fn spec.template.container.startupProbe.tcpSocket.withPort

withPort(port)

obj spec.template.metadata

fn spec.template.metadata.withAnnotations

withAnnotations(annotations)

fn spec.template.metadata.withAnnotationsMixin

withAnnotationsMixin(annotations)

Note: This function appends passed data to existing values

fn spec.template.metadata.withLabels

withLabels(labels)

fn spec.template.metadata.withLabelsMixin

withLabelsMixin(labels)

Note: This function appends passed data to existing values

obj spec.template.securityContext

"PodSecurityContext holds pod-level security attributes and common container settings. Some fields are also present in container.securityContext. Field values of container.securityContext take precedence over field values of PodSecurityContext."

fn spec.template.securityContext.withFsGroup

withFsGroup(fsGroup)

"A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod:\n\n1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw----\n\nIf unset, the Kubelet will not modify the ownership and permissions of any volume. Note that this field cannot be set when spec.os.name is windows."

fn spec.template.securityContext.withFsGroupChangePolicy

withFsGroupChangePolicy(fsGroupChangePolicy)

"fsGroupChangePolicy defines behavior of changing ownership and permission of the volume before being exposed inside Pod. This field will only apply to volume types which support fsGroup based ownership(and permissions). It will have no effect on ephemeral volume types such as: secret, configmaps and emptydir. Valid values are \"OnRootMismatch\" and \"Always\". If not specified, \"Always\" is used. Note that this field cannot be set when spec.os.name is windows."

fn spec.template.securityContext.withRunAsGroup

withRunAsGroup(runAsGroup)

"The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows."

fn spec.template.securityContext.withRunAsNonRoot

withRunAsNonRoot(runAsNonRoot)

"Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence."

fn spec.template.securityContext.withRunAsUser

withRunAsUser(runAsUser)

"The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows."

fn spec.template.securityContext.withSupplementalGroups

withSupplementalGroups(supplementalGroups)

"A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container. Note that this field cannot be set when spec.os.name is windows."

fn spec.template.securityContext.withSupplementalGroupsMixin

withSupplementalGroupsMixin(supplementalGroups)

"A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container. Note that this field cannot be set when spec.os.name is windows."

Note: This function appends passed data to existing values

fn spec.template.securityContext.withSysctls

withSysctls(sysctls)

"Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. Note that this field cannot be set when spec.os.name is windows."

fn spec.template.securityContext.withSysctlsMixin

withSysctlsMixin(sysctls)

"Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. Note that this field cannot be set when spec.os.name is windows."

Note: This function appends passed data to existing values

obj spec.template.securityContext.seLinuxOptions

"SELinuxOptions are the labels to be applied to the container"

fn spec.template.securityContext.seLinuxOptions.withLevel

withLevel(level)

"Level is SELinux level label that applies to the container."

fn spec.template.securityContext.seLinuxOptions.withRole

withRole(role)

"Role is a SELinux role label that applies to the container."

fn spec.template.securityContext.seLinuxOptions.withType

withType(type)

"Type is a SELinux type label that applies to the container."

fn spec.template.securityContext.seLinuxOptions.withUser

withUser(user)

"User is a SELinux user label that applies to the container."

obj spec.template.securityContext.seccompProfile

"SeccompProfile defines a pod/container's seccomp profile settings. Only one profile source may be set."

fn spec.template.securityContext.seccompProfile.withLocalhostProfile

withLocalhostProfile(localhostProfile)

"localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. Must be a descending path, relative to the kubelet's configured seccomp profile location. Must only be set if type is \"Localhost\"."

fn spec.template.securityContext.seccompProfile.withType

withType(type)

"type indicates which kind of seccomp profile will be applied. Valid options are:\n\nLocalhost - a profile defined in a file on the node should be used. RuntimeDefault - the container runtime default profile should be used. Unconfined - no profile should be applied.\n\nPossible enum values:\n - \"Localhost\" indicates a profile defined in a file on the node should be used. The file's location relative to /seccomp.\n - \"RuntimeDefault\" represents the default container runtime seccomp profile.\n - \"Unconfined\" indicates no seccomp profile is applied (A.K.A. unconfined)."

obj spec.template.securityContext.windowsOptions

"WindowsSecurityContextOptions contain Windows-specific options and credentials."

fn spec.template.securityContext.windowsOptions.withGmsaCredentialSpec

withGmsaCredentialSpec(gmsaCredentialSpec)

"GMSACredentialSpec is where the GMSA admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field."

fn spec.template.securityContext.windowsOptions.withGmsaCredentialSpecName

withGmsaCredentialSpecName(gmsaCredentialSpecName)

"GMSACredentialSpecName is the name of the GMSA credential spec to use."

fn spec.template.securityContext.windowsOptions.withHostProcess

withHostProcess(hostProcess)

"HostProcess determines if a container should be run as a 'Host Process' container. This field is alpha-level and will only be honored by components that enable the WindowsHostProcessContainers feature flag. Setting this field without the feature flag will result in errors when validating the Pod. All of a Pod's containers must have the same effective HostProcess value (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). In addition, if HostProcess is true then HostNetwork must also be set to true."

fn spec.template.securityContext.windowsOptions.withRunAsUserName

withRunAsUserName(runAsUserName)

"The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence."