PodPreset v1alpha1

PodPreset

apiVersion: settings.k8s.io/v1alpha1
import "k8s.io/api/settings/v1alpha1"

PodPreset

PodPreset is a policy resource that defines additional runtime requirements for a Pod.

PodPresetSpec

PodPresetSpec is a description of a pod preset.

  • selector (LabelSelector)
    Selector is a label query over a set of resources, in this case pods. Required.
  • volumes ([]Volume)
    Volumes defines the collection of Volume to inject into the pod.
  • volumeMounts ([]VolumeMount)
    VolumeMounts defines the collection of VolumeMount to inject into containers.
    VolumeMount describes a mounting of a Volume within a container.
    • volumeMounts.mountPath (string), required
      Path within the container at which the volume should be mounted. Must not contain ‘:’.
    • volumeMounts.name (string), required
      This must match the Name of a Volume.
    • volumeMounts.mountPropagation (string)
      mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used. This field is beta in 1.10.
    • volumeMounts.readOnly (boolean)
      Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.
    • volumeMounts.subPath (string)
      Path within the volume from which the container’s volume should be mounted. Defaults to "” (volume’s root).
    • volumeMounts.subPathExpr (string)
      Expanded path within the volume from which the container’s volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container’s environment. Defaults to "” (volume’s root). SubPathExpr and SubPath are mutually exclusive.
  • env ([]EnvVar)
    Env defines the collection of EnvVar to inject into containers.
    EnvVar represents an environment variable present in a Container.
    • env.name (string), required
      Name of the environment variable. Must be a C_IDENTIFIER.
    • env.value (string)
      Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to “”.
    • env.valueFrom (EnvVarSource)
      Source for the environment variable’s value. Cannot be used if value is not empty.
      EnvVarSource represents a source for the value of an EnvVar.
    • env.valueFrom.configMapKeyRef (ConfigMapKeySelector)
      Selects a key of a ConfigMap.
      Selects a key from a ConfigMap.
    • env.valueFrom.configMapKeyRef.key (string), required
      The key to select.
    • env.valueFrom.configMapKeyRef.name (string)
      Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
    • env.valueFrom.configMapKeyRef.optional (boolean)
      Specify whether the ConfigMap or its key must be defined
    • env.valueFrom.fieldRef (ObjectFieldSelector)
      Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels['<KEY>'], metadata.annotations['<KEY>'], spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
    • env.valueFrom.resourceFieldRef (ResourceFieldSelector)
      Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
    • env.valueFrom.secretKeyRef (SecretKeySelector)
      Selects a key of a secret in the pod’s namespace
      SecretKeySelector selects a key of a Secret.
    • env.valueFrom.secretKeyRef.key (string), required
      The key of the secret to select from. Must be a valid secret key.
    • env.valueFrom.secretKeyRef.name (string)
      Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
    • env.valueFrom.secretKeyRef.optional (boolean)
      Specify whether the Secret or its key must be defined
  • envFrom ([]EnvFromSource)
    EnvFrom defines the collection of EnvFromSource to inject into containers.
    EnvFromSource represents the source of a set of ConfigMaps
    • envFrom.configMapRef (ConfigMapEnvSource)
      The ConfigMap to select from
      ConfigMapEnvSource selects a ConfigMap to populate the environment variables with.
      The contents of the target ConfigMap’s Data field will represent the key-value pairs as environment variables.
    • envFrom.configMapRef.name (string)
      Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
    • envFrom.configMapRef.optional (boolean)
      Specify whether the ConfigMap must be defined
    • envFrom.prefix (string)
      An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.
    • envFrom.secretRef (SecretEnvSource)
      The Secret to select from
      SecretEnvSource selects a Secret to populate the environment variables with.
      The contents of the target Secret’s Data field will represent the key-value pairs as environment variables.
    • envFrom.secretRef.name (string)
      Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
    • envFrom.secretRef.optional (boolean)
      Specify whether the Secret must be defined

PodPresetList

PodPresetList is a list of PodPreset objects.

Operations

get read the specified PodPreset

HTTP Request

GET /apis/settings.k8s.io/v1alpha1/namespaces/{namespace}/podpresets/{name}

Parameters
  • {name} (string), required
    name of the PodPreset
  • {namespace} (string), required
    namespace
  • ?pretty (string)
    pretty
Response

200 (PodPreset): OK
401: Unauthorized

list list or watch objects of kind PodPreset

HTTP Request

GET /apis/settings.k8s.io/v1alpha1/namespaces/{namespace}/podpresets

Parameters
Response

200 (PodPresetList): OK
401: Unauthorized

list list or watch objects of kind PodPreset

HTTP Request

GET /apis/settings.k8s.io/v1alpha1/podpresets

Parameters
Response

200 (PodPresetList): OK
401: Unauthorized

create create a PodPreset

HTTP Request

POST /apis/settings.k8s.io/v1alpha1/namespaces/{namespace}/podpresets

Parameters
Response

200 (PodPreset): OK
201 (PodPreset): Created
202 (PodPreset): Accepted
401: Unauthorized

update replace the specified PodPreset

HTTP Request

PUT /apis/settings.k8s.io/v1alpha1/namespaces/{namespace}/podpresets/{name}

Parameters
Response

200 (PodPreset): OK
201 (PodPreset): Created
401: Unauthorized

patch partially update the specified PodPreset

HTTP Request

PATCH /apis/settings.k8s.io/v1alpha1/namespaces/{namespace}/podpresets/{name}

Parameters
  • {name} (string), required
    name of the PodPreset

  • {namespace} (string), required
    namespace

  • body (Patch), required

  • ?dryRun (string)
    dryRun

  • ?fieldManager (string)
    fieldManager

  • ?force (boolean)
    force

  • ?pretty (string)
    pretty

Response

200 (PodPreset): OK
401: Unauthorized

delete delete a PodPreset

HTTP Request

DELETE /apis/settings.k8s.io/v1alpha1/namespaces/{namespace}/podpresets/{name}

Parameters
Response

200 (Status): OK
202 (Status): Accepted
401: Unauthorized

deletecollection delete collection of PodPreset

HTTP Request

DELETE /apis/settings.k8s.io/v1alpha1/namespaces/{namespace}/podpresets

Parameters
Response

200 (Status): OK
401: Unauthorized