From bb62f5c7e4120031d2f11c552b45d9265c4a8414 Mon Sep 17 00:00:00 2001 From: STRRL Date: Wed, 16 Jun 2021 16:28:37 +0800 Subject: [PATCH] workflow task node (#1866) * feat: conditional branches in workflownode Signed-off-by: STRRL * feat: reconciler of task node Signed-off-by: STRRL * feat: setup one container for task node Signed-off-by: STRRL * fix: address the comments by muse-dev Signed-off-by: STRRL * chore: cleanup duplicated codes Signed-off-by: STRRL * fix: bump controller-gen version compliable issue with kubernetes 1.18, detail: kubernetes-sigs/controller-tools#480 Signed-off-by: STRRL * chore: bump the version of controller-gen to v0.4.1 Signed-off-by: STRRL * fix: restrict kubernetes version with replace Signed-off-by: STRRL * fix: also restrict version for e2e-test Signed-off-by: STRRL * fix: also bump the verison of controller-runtime Signed-off-by: STRRL * fix: fallback to v1beta1 Signed-off-by: STRRL * Revert "fix: also bump the verison of controller-runtime" This reverts commit 8e051961ebbb80e61723f82993f2c9d828848579. Signed-off-by: STRRL * fix: fill the conditional branches if nil Signed-off-by: STRRL * fix: permission of custom task about creating pod Signed-off-by: STRRL * feat: use v1 instead of v1beta1 with CRD Signed-off-by: STRRL * fix: NOOP when pods exactly same Signed-off-by: STRRL * refactor: refactor the collectors Signed-off-by: STRRL * feat: finish the rest of task nodes Signed-off-by: STRRL * fix: check before sync nodes in task Signed-off-by: STRRL * chore: make linters happier Signed-off-by: STRRL * chore: make linters happier Signed-off-by: STRRL * Update pkg/workflow/controllers/task_reconciler.go Signed-off-by: STRRL Co-authored-by: AsterNighT * fix: use create instead of apply apply will create a huge annotaion which exceed the limit of size of annotation Signed-off-by: STRRL * chore: update the comments for workflow template Signed-off-by: STRRL * fix: crd installation in e2e test Signed-off-by: STRRL Co-authored-by: AsterNighT Co-authored-by: Ti Chi Robot Signed-off-by: root --- api/v1alpha1/workflow_types.go | 26 +- api/v1alpha1/workflownode_types.go | 28 +- api/v1alpha1/zz_generated.deepcopy.go | 107 + .../crd/bases/chaos-mesh.org_schedules.yaml | 1533 +- .../bases/chaos-mesh.org_workflownodes.yaml | 3483 ++- .../crd/bases/chaos-mesh.org_workflows.yaml | 1533 +- e2e-test/action.go | 4 +- e2e-test/go.sum | 14 + examples/workflow/custom-task.yaml | 67 + go.mod | 2 +- go.sum | 15 + .../crds/chaos-mesh.org_schedules.yaml | 1533 +- .../crds/chaos-mesh.org_workflownodes.yaml | 3483 ++- .../crds/chaos-mesh.org_workflows.yaml | 1533 +- .../templates/controller-manager-rbac.yaml | 24 +- install.sh | 14 +- manifests/crd-v1beta1.yaml | 18485 ++++++++++---- manifests/crd.yaml | 20994 ++++++++++++---- pkg/expr/expr.go | 31 + pkg/expr/expr_test.go | 99 + pkg/workflow/controllers/bootstrap.go | 14 + pkg/workflow/controllers/new_node.go | 18 +- .../controllers/parallel_node_reconciler.go | 29 - pkg/workflow/controllers/task_reconciler.go | 438 + pkg/workflow/controllers/utils.go | 29 + pkg/workflow/task/collector/collector.go | 67 + pkg/workflow/task/collector/exit_code.go | 75 + pkg/workflow/task/collector/stdout.go | 57 + .../task/collector/valued_collector.go | 44 + pkg/workflow/task/doc.go | 15 + pkg/workflow/task/evaluator.go | 59 + pkg/workflow/task/pod.go | 51 + 32 files changed, 43772 insertions(+), 10132 deletions(-) create mode 100644 examples/workflow/custom-task.yaml create mode 100644 pkg/expr/expr.go create mode 100644 pkg/expr/expr_test.go create mode 100644 pkg/workflow/controllers/task_reconciler.go create mode 100644 pkg/workflow/task/collector/collector.go create mode 100644 pkg/workflow/task/collector/exit_code.go create mode 100644 pkg/workflow/task/collector/stdout.go create mode 100644 pkg/workflow/task/collector/valued_collector.go create mode 100644 pkg/workflow/task/doc.go create mode 100644 pkg/workflow/task/evaluator.go create mode 100644 pkg/workflow/task/pod.go diff --git a/api/v1alpha1/workflow_types.go b/api/v1alpha1/workflow_types.go index 31fe22c6bf..f49226e9b2 100644 --- a/api/v1alpha1/workflow_types.go +++ b/api/v1alpha1/workflow_types.go @@ -17,9 +17,9 @@ import ( "fmt" corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/runtime" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" ) // +kubebuilder:object:root=true @@ -120,9 +120,19 @@ type Template struct { Name string `json:"name"` Type TemplateType `json:"templateType"` Duration *string `json:"duration,omitempty"` - Tasks []string `json:"tasks,omitempty"` + // Task describes the behavior of the custom task. Only used when Type is TypeTask. + // +optional + Task *Task `json:"task,omitempty"` + // Tasks describes the children steps of serial or parallel node. Only used when Type is TypeSerial or TypeParallel. + // +optional + Tasks []string `json:"tasks,omitempty"` + // ConditionalTasks describes the conditional branches of custom tasks. Only used when Type is TypeTask. + // +optional + ConditionalTasks []ConditionalTask `json:"conditionalTasks,omitempty"` + // EmbedChaos describe the chaos to be injected with chaos nodes. Only used when Type is TypeChaos. // +optional *EmbedChaos `json:",inline"` + // Schedule describe the Schedule(describing scheduled chaos) to be injected with chaos nodes. Only used when Type is TypeSchedule. // +optional Schedule *ChaosOnlyScheduleSpec `json:"schedule,omitempty"` } @@ -151,6 +161,18 @@ type ChaosOnlyScheduleSpec struct { EmbedChaos `json:",inline"` } +type Task struct { + // Container is the main container image to run in the pod + Container *corev1.Container `json:"container,omitempty"` + + // Volumes is a list of volumes that can be mounted by containers in a template. + // +patchStrategy=merge + // +patchMergeKey=name + Volumes []corev1.Volume `json:"volumes,omitempty" patchStrategy:"merge" patchMergeKey:"name"` + + // TODO: maybe we could specify parameters in other ways, like loading context from file +} + // +kubebuilder:object:root=true type WorkflowList struct { metav1.TypeMeta `json:",inline"` diff --git a/api/v1alpha1/workflownode_types.go b/api/v1alpha1/workflownode_types.go index fb5aa524a9..166f29f97d 100644 --- a/api/v1alpha1/workflownode_types.go +++ b/api/v1alpha1/workflownode_types.go @@ -47,8 +47,12 @@ type WorkflowNodeSpec struct { // +optional Deadline *metav1.Time `json:"deadline,omitempty"` // +optional + Task *Task `json:"task,omitempty"` + // +optional Tasks []string `json:"tasks,omitempty"` // +optional + ConditionalTasks []ConditionalTask `json:"conditionalTasks,omitempty"` + // +optional *EmbedChaos `json:",inline,omitempty"` // +optional Schedule *ScheduleSpec `json:"schedule,omitempty"` @@ -60,6 +64,10 @@ type WorkflowNodeStatus struct { // +optional ChaosResource *corev1.TypedLocalObjectReference `json:"chaosResource,omitempty"` + // ConditionalBranches records the evaluation result of each ConditionalTask + // +optional + ConditionalBranches *ConditionalBranchesStatus `json:"conditionalBranches,omitempty"` + // ActiveChildren means the created children node // +optional ActiveChildren []corev1.LocalObjectReference `json:"activeChildren,omitempty"` @@ -68,13 +76,31 @@ type WorkflowNodeStatus struct { // +optional FinishedChildren []corev1.LocalObjectReference `json:"finishedChildren,omitempty"` - // Represents the latest available observations of a worklfow node's current state. + // Represents the latest available observations of a workflow node's current state. // +optional // +patchMergeKey=type // +patchStrategy=merge Conditions []WorkflowNodeCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` } +type ConditionalTask struct { + Task string `json:"task"` + // +optional + Expression string `json:"expression,omitempty"` +} + +type ConditionalBranchesStatus struct { + // +optional + Branches []ConditionalBranch `json:"branches"` + // +optional + Context []string `json:"context"` +} + +type ConditionalBranch struct { + Task string `json:"task"` + EvaluationResult corev1.ConditionStatus `json:"run"` +} + type WorkflowNodeConditionType string const ( diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 5efad7ed88..7c3556805d 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -361,6 +361,61 @@ func (in *ChaosStatus) DeepCopy() *ChaosStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ConditionalBranch) DeepCopyInto(out *ConditionalBranch) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConditionalBranch. +func (in *ConditionalBranch) DeepCopy() *ConditionalBranch { + if in == nil { + return nil + } + out := new(ConditionalBranch) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ConditionalBranchesStatus) DeepCopyInto(out *ConditionalBranchesStatus) { + *out = *in + if in.Branches != nil { + in, out := &in.Branches, &out.Branches + *out = make([]ConditionalBranch, len(*in)) + copy(*out, *in) + } + if in.Context != nil { + in, out := &in.Context, &out.Context + *out = make([]string, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConditionalBranchesStatus. +func (in *ConditionalBranchesStatus) DeepCopy() *ConditionalBranchesStatus { + if in == nil { + return nil + } + out := new(ConditionalBranchesStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ConditionalTask) DeepCopyInto(out *ConditionalTask) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConditionalTask. +func (in *ConditionalTask) DeepCopy() *ConditionalTask { + if in == nil { + return nil + } + out := new(ConditionalTask) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ContainerSelector) DeepCopyInto(out *ContainerSelector) { *out = *in @@ -2654,6 +2709,33 @@ func (in *Stressors) DeepCopy() *Stressors { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Task) DeepCopyInto(out *Task) { + *out = *in + if in.Container != nil { + in, out := &in.Container, &out.Container + *out = new(v1.Container) + (*in).DeepCopyInto(*out) + } + if in.Volumes != nil { + in, out := &in.Volumes, &out.Volumes + *out = make([]v1.Volume, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Task. +func (in *Task) DeepCopy() *Task { + if in == nil { + return nil + } + out := new(Task) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TcParameter) DeepCopyInto(out *TcParameter) { *out = *in @@ -2702,11 +2784,21 @@ func (in *Template) DeepCopyInto(out *Template) { *out = new(string) **out = **in } + if in.Task != nil { + in, out := &in.Task, &out.Task + *out = new(Task) + (*in).DeepCopyInto(*out) + } if in.Tasks != nil { in, out := &in.Tasks, &out.Tasks *out = make([]string, len(*in)) copy(*out, *in) } + if in.ConditionalTasks != nil { + in, out := &in.ConditionalTasks, &out.ConditionalTasks + *out = make([]ConditionalTask, len(*in)) + copy(*out, *in) + } if in.EmbedChaos != nil { in, out := &in.EmbedChaos, &out.EmbedChaos *out = new(EmbedChaos) @@ -3008,11 +3100,21 @@ func (in *WorkflowNodeSpec) DeepCopyInto(out *WorkflowNodeSpec) { in, out := &in.Deadline, &out.Deadline *out = (*in).DeepCopy() } + if in.Task != nil { + in, out := &in.Task, &out.Task + *out = new(Task) + (*in).DeepCopyInto(*out) + } if in.Tasks != nil { in, out := &in.Tasks, &out.Tasks *out = make([]string, len(*in)) copy(*out, *in) } + if in.ConditionalTasks != nil { + in, out := &in.ConditionalTasks, &out.ConditionalTasks + *out = make([]ConditionalTask, len(*in)) + copy(*out, *in) + } if in.EmbedChaos != nil { in, out := &in.EmbedChaos, &out.EmbedChaos *out = new(EmbedChaos) @@ -3043,6 +3145,11 @@ func (in *WorkflowNodeStatus) DeepCopyInto(out *WorkflowNodeStatus) { *out = new(v1.TypedLocalObjectReference) (*in).DeepCopyInto(*out) } + if in.ConditionalBranches != nil { + in, out := &in.ConditionalBranches, &out.ConditionalBranches + *out = new(ConditionalBranchesStatus) + (*in).DeepCopyInto(*out) + } if in.ActiveChildren != nil { in, out := &in.ActiveChildren, &out.ActiveChildren *out = make([]v1.LocalObjectReference, len(*in)) diff --git a/config/crd/bases/chaos-mesh.org_schedules.yaml b/config/crd/bases/chaos-mesh.org_schedules.yaml index 241c325be0..a4f3f2c131 100644 --- a/config/crd/bases/chaos-mesh.org_schedules.yaml +++ b/config/crd/bases/chaos-mesh.org_schedules.yaml @@ -1576,6 +1576,18 @@ spec: - awsRegion - ec2Instance type: object + conditionalTasks: + description: ConditionalTasks describes the conditional branches of custom tasks. Only used when Type is TypeTask. + items: + properties: + expression: + type: string + task: + type: string + required: + - task + type: object + type: array dnsChaos: description: DNSChaosSpec defines the desired state of DNSChaos properties: @@ -2789,7 +2801,7 @@ spec: - selector type: object schedule: - description: ChaosOnlyScheduleSpec is very similar with ScheduleSpec, but it could not schedule Workflow because we could not resolve nested CRD now + description: Schedule describe the Schedule(describing scheduled chaos) to be injected with chaos nodes. Only used when Type is TypeSchedule. properties: awsChaos: description: AwsChaosSpec is the content of the specification for an AwsChaos @@ -4430,7 +4442,1526 @@ spec: - mode - selector type: object + task: + description: Task describes the behavior of the custom task. Only used when Type is TypeTask. + properties: + container: + description: Container is the main container image to run in the pod + properties: + args: + description: '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. 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. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + command: + description: '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. 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. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + env: + description: List of environment variables to set in the container. Cannot be updated. + items: + description: EnvVar represents an environment variable present in a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: '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 "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: '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.' + properties: + containerName: + description: 'Container name: required for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + description: 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. + items: + description: EnvFromSource represents the source of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object + type: object + type: array + image: + description: '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.' + type: string + imagePullPolicy: + description: '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' + type: string + lifecycle: + description: Actions that the management system should take in response to container lifecycle events. Cannot be updated. + properties: + postStart: + description: 'PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following should be specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + description: 'PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The reason for termination is passed to the handler. The Pod''s termination grace period countdown begins before the PreStop hooked is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod''s termination grace period. Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following should be specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + description: 'Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following should be specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: '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' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: 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. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: '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' + format: int32 + type: integer + type: object + name: + description: Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. + type: string + ports: + description: 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. + items: + description: ContainerPort represents a network port in a single container. + properties: + containerPort: + description: Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. + format: int32 + type: integer + hostIP: + description: What host IP to bind the external port to. + type: string + hostPort: + description: Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. + format: int32 + type: integer + name: + description: If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services. + type: string + protocol: + default: TCP + description: Protocol for port. Must be UDP, TCP, or SCTP. Defaults to "TCP". + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + description: 'Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following should be specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: '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' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: 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. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: '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' + format: int32 + type: integer + type: object + resources: + description: 'Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: '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-compute-resources-container/' + type: object + type: object + securityContext: + description: 'Security options the pod should run with. More info: https://kubernetes.io/docs/concepts/policy/security-context/ More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/' + properties: + allowPrivilegeEscalation: + description: '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' + type: boolean + capabilities: + description: The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. + type: boolean + procMount: + description: 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. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only root filesystem. Default is false. + type: boolean + runAsGroup: + description: 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. + format: int64 + type: integer + runAsNonRoot: + description: 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. + type: boolean + runAsUser: + description: 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. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + properties: + level: + description: Level is SELinux level label that applies to the container. + type: string + role: + description: Role is a SELinux role label that applies to the container. + type: string + type: + description: Type is a SELinux type label that applies to the container. + type: string + user: + description: User is a SELinux user label that applies to the container. + type: string + type: object + windowsOptions: + description: The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + properties: + gmsaCredentialSpec: + description: 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. This field is alpha-level and is only honored by servers that enable the WindowsGMSA feature flag. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the GMSA credential spec to use. This field is alpha-level and is only honored by servers that enable the WindowsGMSA feature flag. + type: string + runAsUserName: + description: 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. This field is beta-level and may be disabled with the WindowsRunAsUserName feature flag. + type: string + type: object + type: object + startupProbe: + description: 'StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod''s lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. This is an alpha feature enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following should be specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: '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' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: 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. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: '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' + format: int32 + type: integer + type: object + stdin: + description: 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. + type: boolean + stdinOnce: + description: 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 + type: boolean + terminationMessagePath: + description: '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.' + type: string + terminationMessagePolicy: + description: 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. + type: string + tty: + description: Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false. + type: boolean + volumeDevices: + description: volumeDevices is the list of block devices to be used by the container. This is a beta feature. + items: + description: volumeDevice describes a mapping of a raw block device within a container. + properties: + devicePath: + description: devicePath is the path inside of the container that the device will be mapped to. + type: string + name: + description: name must match the name of a persistentVolumeClaim in the pod + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + description: Pod volumes to mount into the container's filesystem. Cannot be updated. + items: + description: VolumeMount describes a mounting of a Volume within a container. + properties: + mountPath: + description: Path within the container at which the volume should be mounted. Must not contain ':'. + type: string + mountPropagation: + description: 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. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. + type: boolean + subPath: + description: Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). + type: string + subPathExpr: + description: 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. + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: 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. + type: string + required: + - name + type: object + volumes: + description: Volumes is a list of volumes that can be mounted by containers in a template. + items: + description: Volume represents a named volume in a pod that may be accessed by any container in the pod. + properties: + awsElasticBlockStore: + description: 'AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + properties: + fsType: + description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + partition: + description: 'The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty).' + format: int32 + type: integer + readOnly: + description: 'Specify "true" to force and set the ReadOnly property in VolumeMounts to "true". If omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: boolean + volumeID: + description: 'Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: string + required: + - volumeID + type: object + azureDisk: + description: AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. + properties: + cachingMode: + description: 'Host Caching mode: None, Read Only, Read Write.' + type: string + diskName: + description: The Name of the data disk in the blob storage + type: string + diskURI: + description: The URI the data disk in the blob storage + type: string + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + kind: + description: 'Expected values Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared' + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + description: AzureFile represents an Azure File Service mount on the host and bind mount to the pod. + properties: + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretName: + description: the name of secret that contains Azure Storage Account Name and Key + type: string + shareName: + description: Share Name + type: string + required: + - secretName + - shareName + type: object + cephfs: + description: CephFS represents a Ceph FS mount on the host that shares a pod's lifetime + properties: + monitors: + description: 'Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + items: + type: string + type: array + path: + description: 'Optional: Used as the mounted root, rather than the full Ceph tree, default is /' + type: string + readOnly: + description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: boolean + secretFile: + description: 'Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + secretRef: + description: 'Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + user: + description: 'Optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + required: + - monitors + type: object + cinder: + description: 'Cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + properties: + fsType: + description: 'Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + readOnly: + description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: boolean + secretRef: + description: 'Optional: points to a secret object containing parameters used to connect to OpenStack.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + volumeID: + description: 'volume id used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + required: + - volumeID + type: object + configMap: + description: ConfigMap represents a configMap that should populate this volume + properties: + defaultMode: + description: 'Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + items: + description: If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its keys must be defined + type: boolean + type: object + csi: + description: CSI (Container Storage Interface) represents storage that is handled by an external CSI driver (Alpha feature). + properties: + driver: + description: Driver is the name of the CSI driver that handles this volume. Consult with your admin for the correct name as registered in the cluster. + type: string + fsType: + description: Filesystem type to mount. Ex. "ext4", "xfs", "ntfs". If not provided, the empty value is passed to the associated CSI driver which will determine the default filesystem to apply. + type: string + nodePublishSecretRef: + description: NodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secret references are passed. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + readOnly: + description: Specifies a read-only configuration for the volume. Defaults to false (read/write). + type: boolean + volumeAttributes: + additionalProperties: + type: string + description: VolumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values. + type: object + required: + - driver + type: object + downwardAPI: + description: DownwardAPI represents downward API about the pod that should populate this volume + properties: + defaultMode: + description: 'Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + items: + description: Items is a list of downward API volume file + items: + description: DownwardAPIVolumeFile represents information to create the file containing the pod field + properties: + fieldRef: + description: 'Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.' + properties: + apiVersion: + description: Version of the schema the FieldPath is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified API version. + type: string + required: + - fieldPath + type: object + mode: + description: 'Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative path name of the file to be created. Must not be absolute or contain the ''..'' path. Must be utf-8 encoded. The first item of the relative path must not start with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + emptyDir: + description: 'EmptyDir represents a temporary directory that shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + properties: + medium: + description: 'What type of storage medium should back this directory. The default is "" which means to use the node''s default medium. Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + description: 'Total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir' + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + fc: + description: FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. + properties: + fsType: + description: 'Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + lun: + description: 'Optional: FC target lun number' + format: int32 + type: integer + readOnly: + description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.' + type: boolean + targetWWNs: + description: 'Optional: FC target worldwide names (WWNs)' + items: + type: string + type: array + wwids: + description: 'Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously.' + items: + type: string + type: array + type: object + flexVolume: + description: FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. + properties: + driver: + description: Driver is the name of the driver to use for this volume. + type: string + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script. + type: string + options: + additionalProperties: + type: string + description: 'Optional: Extra command options if any.' + type: object + readOnly: + description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.' + type: boolean + secretRef: + description: 'Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - driver + type: object + flocker: + description: Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running + properties: + datasetName: + description: Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated + type: string + datasetUUID: + description: UUID of the dataset. This is unique identifier of a Flocker dataset + type: string + type: object + gcePersistentDisk: + description: 'GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + properties: + fsType: + description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + partition: + description: 'The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + format: int32 + type: integer + pdName: + description: 'Unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: string + readOnly: + description: 'ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: boolean + required: + - pdName + type: object + gitRepo: + description: 'GitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod''s container.' + properties: + directory: + description: Target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name. + type: string + repository: + description: Repository URL + type: string + revision: + description: Commit hash for the specified revision. + type: string + required: + - repository + type: object + glusterfs: + description: 'Glusterfs represents a Glusterfs mount on the host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md' + properties: + endpoints: + description: 'EndpointsName is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + path: + description: 'Path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + readOnly: + description: 'ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: boolean + required: + - endpoints + - path + type: object + hostPath: + description: 'HostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath --- TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not mount host directories as read/write.' + properties: + path: + description: 'Path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + type: + description: 'Type for HostPath Volume Defaults to "" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + required: + - path + type: object + iscsi: + description: 'ISCSI represents an ISCSI Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' + properties: + chapAuthDiscovery: + description: whether support iSCSI Discovery CHAP authentication + type: boolean + chapAuthSession: + description: whether support iSCSI Session CHAP authentication + type: boolean + fsType: + description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + initiatorName: + description: Custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection. + type: string + iqn: + description: Target iSCSI Qualified Name. + type: string + iscsiInterface: + description: iSCSI Interface Name that uses an iSCSI transport. Defaults to 'default' (tcp). + type: string + lun: + description: iSCSI Target Lun number. + format: int32 + type: integer + portals: + description: iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). + items: + type: string + type: array + readOnly: + description: ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. + type: boolean + secretRef: + description: CHAP Secret for iSCSI target and initiator authentication + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + targetPortal: + description: iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + description: 'Volume''s name. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + nfs: + description: 'NFS represents an NFS mount on the host that shares a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + properties: + path: + description: 'Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + readOnly: + description: 'ReadOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: boolean + server: + description: 'Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + description: 'PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + properties: + claimName: + description: 'ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + type: string + readOnly: + description: Will force the ReadOnly setting in VolumeMounts. Default false. + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + description: PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + pdID: + description: ID that identifies Photon Controller persistent disk + type: string + required: + - pdID + type: object + portworxVolume: + description: PortworxVolume represents a portworx volume attached and mounted on kubelets host machine + properties: + fsType: + description: FSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + volumeID: + description: VolumeID uniquely identifies a Portworx volume + type: string + required: + - volumeID + type: object + projected: + description: Items for all in one resources secrets, configmaps, and downward API + properties: + defaultMode: + description: Mode bits to use on created files by default. Must be a value between 0 and 0777. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. + format: int32 + type: integer + sources: + description: list of volume projections + items: + description: Projection that may be projected along with other supported volume types + properties: + configMap: + description: information about the configMap data to project + properties: + items: + description: If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its keys must be defined + type: boolean + type: object + downwardAPI: + description: information about the downwardAPI data to project + properties: + items: + description: Items is a list of DownwardAPIVolume file + items: + description: DownwardAPIVolumeFile represents information to create the file containing the pod field + properties: + fieldRef: + description: 'Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.' + properties: + apiVersion: + description: Version of the schema the FieldPath is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified API version. + type: string + required: + - fieldPath + type: object + mode: + description: 'Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative path name of the file to be created. Must not be absolute or contain the ''..'' path. Must be utf-8 encoded. The first item of the relative path must not start with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + secret: + description: information about the secret data to project + properties: + items: + description: If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must be defined + type: boolean + type: object + serviceAccountToken: + description: information about the serviceAccountToken data to project + properties: + audience: + description: Audience is the intended audience of the token. A recipient of a token must identify itself with an identifier specified in the audience of the token, and otherwise should reject the token. The audience defaults to the identifier of the apiserver. + type: string + expirationSeconds: + description: ExpirationSeconds is the requested duration of validity of the service account token. As the token approaches expiration, the kubelet volume plugin will proactively rotate the service account token. The kubelet will start trying to rotate the token if the token is older than 80 percent of its time to live or if the token is older than 24 hours.Defaults to 1 hour and must be at least 10 minutes. + format: int64 + type: integer + path: + description: Path is the path relative to the mount point of the file to project the token into. + type: string + required: + - path + type: object + type: object + type: array + required: + - sources + type: object + quobyte: + description: Quobyte represents a Quobyte mount on the host that shares a pod's lifetime + properties: + group: + description: Group to map volume access to Default is no group + type: string + readOnly: + description: ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false. + type: boolean + registry: + description: Registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes + type: string + tenant: + description: Tenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin + type: string + user: + description: User to map volume access to Defaults to serivceaccount user + type: string + volume: + description: Volume is a string that references an already created Quobyte volume by name. + type: string + required: + - registry + - volume + type: object + rbd: + description: 'RBD represents a Rados Block Device mount on the host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md' + properties: + fsType: + description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + image: + description: 'The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + keyring: + description: 'Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + monitors: + description: 'A collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + items: + type: string + type: array + pool: + description: 'The rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + readOnly: + description: 'ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: boolean + secretRef: + description: 'SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + user: + description: 'The rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + required: + - image + - monitors + type: object + scaleIO: + description: ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Default is "xfs". + type: string + gateway: + description: The host address of the ScaleIO API Gateway. + type: string + protectionDomain: + description: The name of the ScaleIO Protection Domain for the configured storage. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + sslEnabled: + description: Flag to enable/disable SSL communication with Gateway, default false + type: boolean + storageMode: + description: Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned. + type: string + storagePool: + description: The ScaleIO Storage Pool associated with the protection domain. + type: string + system: + description: The name of the storage system as configured in ScaleIO. + type: string + volumeName: + description: The name of a volume already created in the ScaleIO system that is associated with this volume source. + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + description: 'Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + properties: + defaultMode: + description: 'Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + items: + description: If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + optional: + description: Specify whether the Secret or its keys must be defined + type: boolean + secretName: + description: 'Name of the secret in the pod''s namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + type: string + type: object + storageos: + description: StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + volumeName: + description: VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace. + type: string + volumeNamespace: + description: VolumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to "default" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created. + type: string + type: object + vsphereVolume: + description: VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + storagePolicyID: + description: Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. + type: string + storagePolicyName: + description: Storage Policy Based Management (SPBM) profile name. + type: string + volumePath: + description: Path that identifies vSphere volume vmdk + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + type: object tasks: + description: Tasks describes the children steps of serial or parallel node. Only used when Type is TypeSerial or TypeParallel. items: type: string type: array diff --git a/config/crd/bases/chaos-mesh.org_workflownodes.yaml b/config/crd/bases/chaos-mesh.org_workflownodes.yaml index 20e93f5dca..58a244ecb6 100644 --- a/config/crd/bases/chaos-mesh.org_workflownodes.yaml +++ b/config/crd/bases/chaos-mesh.org_workflownodes.yaml @@ -69,6 +69,17 @@ spec: - awsRegion - ec2Instance type: object + conditionalTasks: + items: + properties: + expression: + type: string + task: + type: string + required: + - task + type: object + type: array deadline: format: date-time type: string @@ -2827,6 +2838,18 @@ spec: - awsRegion - ec2Instance type: object + conditionalTasks: + description: ConditionalTasks describes the conditional branches of custom tasks. Only used when Type is TypeTask. + items: + properties: + expression: + type: string + task: + type: string + required: + - task + type: object + type: array dnsChaos: description: DNSChaosSpec defines the desired state of DNSChaos properties: @@ -4040,7 +4063,7 @@ spec: - selector type: object schedule: - description: ChaosOnlyScheduleSpec is very similar with ScheduleSpec, but it could not schedule Workflow because we could not resolve nested CRD now + description: Schedule describe the Schedule(describing scheduled chaos) to be injected with chaos nodes. Only used when Type is TypeSchedule. properties: awsChaos: description: AwsChaosSpec is the content of the specification for an AwsChaos @@ -5681,129 +5704,1648 @@ spec: - mode - selector type: object - tasks: - items: - type: string - type: array - templateType: - type: string - timeChaos: - description: TimeChaosSpec defines the desired state of TimeChaos + task: + description: Task describes the behavior of the custom task. Only used when Type is TypeTask. properties: - clockIds: - description: ClockIds defines all affected clock id All available options are ["CLOCK_REALTIME","CLOCK_MONOTONIC","CLOCK_PROCESS_CPUTIME_ID","CLOCK_THREAD_CPUTIME_ID", "CLOCK_MONOTONIC_RAW","CLOCK_REALTIME_COARSE","CLOCK_MONOTONIC_COARSE","CLOCK_BOOTTIME","CLOCK_REALTIME_ALARM", "CLOCK_BOOTTIME_ALARM"] Default value is ["CLOCK_REALTIME"] - items: - type: string - type: array - containerNames: - description: ContainerNames indicates list of the name of affected container. If not set, all containers will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of the chaos action - type: string - mode: - description: 'Mode defines the mode to run chaos action. Supported mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - selector: - description: Selector is used to select pods that are used to inject chaos action. + container: + description: Container is the main container image to run in the pod properties: - annotationSelectors: - additionalProperties: + args: + description: '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. 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. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: type: string - description: Map of string keys and values that can be used to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that can be used to select objects. A list of selectors based on set-based label expressions. + type: array + command: + description: '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. 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. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + type: string + type: array + env: + description: List of environment variables to set in the container. Cannot be updated. + items: + description: EnvVar represents an environment variable present in a Container. properties: - key: - description: key is the label key that the selector applies to. + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. + value: + description: '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 "".' type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: '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.' + properties: + containerName: + description: 'Container name: required for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must be defined + type: boolean + required: + - key + type: object + type: object required: - - key - - operator + - name type: object type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which objects belong. + envFrom: + description: 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. items: - type: string + description: EnvFromSource represents the source of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object + type: object type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to select nodes. Selector which must match a node's labels, and objects must belong to these selected nodes. + image: + description: '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.' + type: string + imagePullPolicy: + description: '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' + type: string + lifecycle: + description: Actions that the management system should take in response to container lifecycle events. Cannot be updated. + properties: + postStart: + description: 'PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following should be specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + description: 'PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The reason for termination is passed to the handler. The Pod''s termination grace period countdown begins before the PreStop hooked is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod''s termination grace period. Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following should be specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object type: object - nodes: - description: Nodes is a set of node name and objects must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition of a pod at the current time. supported value: Pending / Running / Succeeded / Failed / Unknown' + livenessProbe: + description: 'Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following should be specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: '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' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: 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. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: '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' + format: int32 + type: integer + type: object + name: + description: Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. + type: string + ports: + description: 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. items: - type: string + description: ContainerPort represents a network port in a single container. + properties: + containerPort: + description: Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. + format: int32 + type: integer + hostIP: + description: What host IP to bind the external port to. + type: string + hostPort: + description: Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. + format: int32 + type: integer + name: + description: If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services. + type: string + protocol: + default: TCP + description: Protocol for port. Must be UDP, TCP, or SCTP. Defaults to "TCP". + type: string + required: + - containerPort + type: object type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values that used to select pods. The key defines the namespace which pods belong, and the each values is a set of pod names. + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + description: 'Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following should be specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: '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' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: 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. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: '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' + format: int32 + type: integer type: object - type: object - timeOffset: - description: TimeOffset defines the delta time of injected program. It's a possibly signed sequence of decimal numbers, such as "300ms", "-1.5h" or "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". - type: string - value: - description: Value is required when the mode is set to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. If `FixedPodMode`, provide an integer of pods to do chaos action. If `FixedPercentPodMod`, provide a number from 0-100 to specify the percent of pods the server can do chaos action. IF `RandomMaxPercentPodMod`, provide a number from 0-100 to specify the max percent of pods to do chaos action - type: string - required: - - mode - - selector - - timeOffset - type: object - required: - - name - - templateType - type: object - type: array - required: - - entry - - templates - type: object - required: - - schedule - - type - type: object - startTime: + resources: + description: 'Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: '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-compute-resources-container/' + type: object + type: object + securityContext: + description: 'Security options the pod should run with. More info: https://kubernetes.io/docs/concepts/policy/security-context/ More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/' + properties: + allowPrivilegeEscalation: + description: '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' + type: boolean + capabilities: + description: The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. + type: boolean + procMount: + description: 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. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only root filesystem. Default is false. + type: boolean + runAsGroup: + description: 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. + format: int64 + type: integer + runAsNonRoot: + description: 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. + type: boolean + runAsUser: + description: 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. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + properties: + level: + description: Level is SELinux level label that applies to the container. + type: string + role: + description: Role is a SELinux role label that applies to the container. + type: string + type: + description: Type is a SELinux type label that applies to the container. + type: string + user: + description: User is a SELinux user label that applies to the container. + type: string + type: object + windowsOptions: + description: The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + properties: + gmsaCredentialSpec: + description: 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. This field is alpha-level and is only honored by servers that enable the WindowsGMSA feature flag. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the GMSA credential spec to use. This field is alpha-level and is only honored by servers that enable the WindowsGMSA feature flag. + type: string + runAsUserName: + description: 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. This field is beta-level and may be disabled with the WindowsRunAsUserName feature flag. + type: string + type: object + type: object + startupProbe: + description: 'StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod''s lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. This is an alpha feature enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following should be specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: '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' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: 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. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: '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' + format: int32 + type: integer + type: object + stdin: + description: 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. + type: boolean + stdinOnce: + description: 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 + type: boolean + terminationMessagePath: + description: '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.' + type: string + terminationMessagePolicy: + description: 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. + type: string + tty: + description: Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false. + type: boolean + volumeDevices: + description: volumeDevices is the list of block devices to be used by the container. This is a beta feature. + items: + description: volumeDevice describes a mapping of a raw block device within a container. + properties: + devicePath: + description: devicePath is the path inside of the container that the device will be mapped to. + type: string + name: + description: name must match the name of a persistentVolumeClaim in the pod + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + description: Pod volumes to mount into the container's filesystem. Cannot be updated. + items: + description: VolumeMount describes a mounting of a Volume within a container. + properties: + mountPath: + description: Path within the container at which the volume should be mounted. Must not contain ':'. + type: string + mountPropagation: + description: 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. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. + type: boolean + subPath: + description: Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). + type: string + subPathExpr: + description: 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. + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: 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. + type: string + required: + - name + type: object + volumes: + description: Volumes is a list of volumes that can be mounted by containers in a template. + items: + description: Volume represents a named volume in a pod that may be accessed by any container in the pod. + properties: + awsElasticBlockStore: + description: 'AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + properties: + fsType: + description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + partition: + description: 'The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty).' + format: int32 + type: integer + readOnly: + description: 'Specify "true" to force and set the ReadOnly property in VolumeMounts to "true". If omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: boolean + volumeID: + description: 'Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: string + required: + - volumeID + type: object + azureDisk: + description: AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. + properties: + cachingMode: + description: 'Host Caching mode: None, Read Only, Read Write.' + type: string + diskName: + description: The Name of the data disk in the blob storage + type: string + diskURI: + description: The URI the data disk in the blob storage + type: string + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + kind: + description: 'Expected values Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared' + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + description: AzureFile represents an Azure File Service mount on the host and bind mount to the pod. + properties: + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretName: + description: the name of secret that contains Azure Storage Account Name and Key + type: string + shareName: + description: Share Name + type: string + required: + - secretName + - shareName + type: object + cephfs: + description: CephFS represents a Ceph FS mount on the host that shares a pod's lifetime + properties: + monitors: + description: 'Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + items: + type: string + type: array + path: + description: 'Optional: Used as the mounted root, rather than the full Ceph tree, default is /' + type: string + readOnly: + description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: boolean + secretFile: + description: 'Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + secretRef: + description: 'Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + user: + description: 'Optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + required: + - monitors + type: object + cinder: + description: 'Cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + properties: + fsType: + description: 'Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + readOnly: + description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: boolean + secretRef: + description: 'Optional: points to a secret object containing parameters used to connect to OpenStack.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + volumeID: + description: 'volume id used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + required: + - volumeID + type: object + configMap: + description: ConfigMap represents a configMap that should populate this volume + properties: + defaultMode: + description: 'Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + items: + description: If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its keys must be defined + type: boolean + type: object + csi: + description: CSI (Container Storage Interface) represents storage that is handled by an external CSI driver (Alpha feature). + properties: + driver: + description: Driver is the name of the CSI driver that handles this volume. Consult with your admin for the correct name as registered in the cluster. + type: string + fsType: + description: Filesystem type to mount. Ex. "ext4", "xfs", "ntfs". If not provided, the empty value is passed to the associated CSI driver which will determine the default filesystem to apply. + type: string + nodePublishSecretRef: + description: NodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secret references are passed. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + readOnly: + description: Specifies a read-only configuration for the volume. Defaults to false (read/write). + type: boolean + volumeAttributes: + additionalProperties: + type: string + description: VolumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values. + type: object + required: + - driver + type: object + downwardAPI: + description: DownwardAPI represents downward API about the pod that should populate this volume + properties: + defaultMode: + description: 'Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + items: + description: Items is a list of downward API volume file + items: + description: DownwardAPIVolumeFile represents information to create the file containing the pod field + properties: + fieldRef: + description: 'Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.' + properties: + apiVersion: + description: Version of the schema the FieldPath is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified API version. + type: string + required: + - fieldPath + type: object + mode: + description: 'Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative path name of the file to be created. Must not be absolute or contain the ''..'' path. Must be utf-8 encoded. The first item of the relative path must not start with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + emptyDir: + description: 'EmptyDir represents a temporary directory that shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + properties: + medium: + description: 'What type of storage medium should back this directory. The default is "" which means to use the node''s default medium. Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + description: 'Total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir' + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + fc: + description: FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. + properties: + fsType: + description: 'Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + lun: + description: 'Optional: FC target lun number' + format: int32 + type: integer + readOnly: + description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.' + type: boolean + targetWWNs: + description: 'Optional: FC target worldwide names (WWNs)' + items: + type: string + type: array + wwids: + description: 'Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously.' + items: + type: string + type: array + type: object + flexVolume: + description: FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. + properties: + driver: + description: Driver is the name of the driver to use for this volume. + type: string + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script. + type: string + options: + additionalProperties: + type: string + description: 'Optional: Extra command options if any.' + type: object + readOnly: + description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.' + type: boolean + secretRef: + description: 'Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - driver + type: object + flocker: + description: Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running + properties: + datasetName: + description: Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated + type: string + datasetUUID: + description: UUID of the dataset. This is unique identifier of a Flocker dataset + type: string + type: object + gcePersistentDisk: + description: 'GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + properties: + fsType: + description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + partition: + description: 'The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + format: int32 + type: integer + pdName: + description: 'Unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: string + readOnly: + description: 'ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: boolean + required: + - pdName + type: object + gitRepo: + description: 'GitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod''s container.' + properties: + directory: + description: Target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name. + type: string + repository: + description: Repository URL + type: string + revision: + description: Commit hash for the specified revision. + type: string + required: + - repository + type: object + glusterfs: + description: 'Glusterfs represents a Glusterfs mount on the host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md' + properties: + endpoints: + description: 'EndpointsName is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + path: + description: 'Path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + readOnly: + description: 'ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: boolean + required: + - endpoints + - path + type: object + hostPath: + description: 'HostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath --- TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not mount host directories as read/write.' + properties: + path: + description: 'Path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + type: + description: 'Type for HostPath Volume Defaults to "" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + required: + - path + type: object + iscsi: + description: 'ISCSI represents an ISCSI Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' + properties: + chapAuthDiscovery: + description: whether support iSCSI Discovery CHAP authentication + type: boolean + chapAuthSession: + description: whether support iSCSI Session CHAP authentication + type: boolean + fsType: + description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + initiatorName: + description: Custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection. + type: string + iqn: + description: Target iSCSI Qualified Name. + type: string + iscsiInterface: + description: iSCSI Interface Name that uses an iSCSI transport. Defaults to 'default' (tcp). + type: string + lun: + description: iSCSI Target Lun number. + format: int32 + type: integer + portals: + description: iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). + items: + type: string + type: array + readOnly: + description: ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. + type: boolean + secretRef: + description: CHAP Secret for iSCSI target and initiator authentication + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + targetPortal: + description: iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + description: 'Volume''s name. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + nfs: + description: 'NFS represents an NFS mount on the host that shares a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + properties: + path: + description: 'Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + readOnly: + description: 'ReadOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: boolean + server: + description: 'Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + description: 'PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + properties: + claimName: + description: 'ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + type: string + readOnly: + description: Will force the ReadOnly setting in VolumeMounts. Default false. + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + description: PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + pdID: + description: ID that identifies Photon Controller persistent disk + type: string + required: + - pdID + type: object + portworxVolume: + description: PortworxVolume represents a portworx volume attached and mounted on kubelets host machine + properties: + fsType: + description: FSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + volumeID: + description: VolumeID uniquely identifies a Portworx volume + type: string + required: + - volumeID + type: object + projected: + description: Items for all in one resources secrets, configmaps, and downward API + properties: + defaultMode: + description: Mode bits to use on created files by default. Must be a value between 0 and 0777. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. + format: int32 + type: integer + sources: + description: list of volume projections + items: + description: Projection that may be projected along with other supported volume types + properties: + configMap: + description: information about the configMap data to project + properties: + items: + description: If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its keys must be defined + type: boolean + type: object + downwardAPI: + description: information about the downwardAPI data to project + properties: + items: + description: Items is a list of DownwardAPIVolume file + items: + description: DownwardAPIVolumeFile represents information to create the file containing the pod field + properties: + fieldRef: + description: 'Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.' + properties: + apiVersion: + description: Version of the schema the FieldPath is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified API version. + type: string + required: + - fieldPath + type: object + mode: + description: 'Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative path name of the file to be created. Must not be absolute or contain the ''..'' path. Must be utf-8 encoded. The first item of the relative path must not start with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + secret: + description: information about the secret data to project + properties: + items: + description: If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must be defined + type: boolean + type: object + serviceAccountToken: + description: information about the serviceAccountToken data to project + properties: + audience: + description: Audience is the intended audience of the token. A recipient of a token must identify itself with an identifier specified in the audience of the token, and otherwise should reject the token. The audience defaults to the identifier of the apiserver. + type: string + expirationSeconds: + description: ExpirationSeconds is the requested duration of validity of the service account token. As the token approaches expiration, the kubelet volume plugin will proactively rotate the service account token. The kubelet will start trying to rotate the token if the token is older than 80 percent of its time to live or if the token is older than 24 hours.Defaults to 1 hour and must be at least 10 minutes. + format: int64 + type: integer + path: + description: Path is the path relative to the mount point of the file to project the token into. + type: string + required: + - path + type: object + type: object + type: array + required: + - sources + type: object + quobyte: + description: Quobyte represents a Quobyte mount on the host that shares a pod's lifetime + properties: + group: + description: Group to map volume access to Default is no group + type: string + readOnly: + description: ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false. + type: boolean + registry: + description: Registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes + type: string + tenant: + description: Tenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin + type: string + user: + description: User to map volume access to Defaults to serivceaccount user + type: string + volume: + description: Volume is a string that references an already created Quobyte volume by name. + type: string + required: + - registry + - volume + type: object + rbd: + description: 'RBD represents a Rados Block Device mount on the host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md' + properties: + fsType: + description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + image: + description: 'The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + keyring: + description: 'Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + monitors: + description: 'A collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + items: + type: string + type: array + pool: + description: 'The rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + readOnly: + description: 'ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: boolean + secretRef: + description: 'SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + user: + description: 'The rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + required: + - image + - monitors + type: object + scaleIO: + description: ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Default is "xfs". + type: string + gateway: + description: The host address of the ScaleIO API Gateway. + type: string + protectionDomain: + description: The name of the ScaleIO Protection Domain for the configured storage. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + sslEnabled: + description: Flag to enable/disable SSL communication with Gateway, default false + type: boolean + storageMode: + description: Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned. + type: string + storagePool: + description: The ScaleIO Storage Pool associated with the protection domain. + type: string + system: + description: The name of the storage system as configured in ScaleIO. + type: string + volumeName: + description: The name of a volume already created in the ScaleIO system that is associated with this volume source. + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + description: 'Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + properties: + defaultMode: + description: 'Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + items: + description: If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + optional: + description: Specify whether the Secret or its keys must be defined + type: boolean + secretName: + description: 'Name of the secret in the pod''s namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + type: string + type: object + storageos: + description: StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + volumeName: + description: VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace. + type: string + volumeNamespace: + description: VolumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to "default" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created. + type: string + type: object + vsphereVolume: + description: VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + storagePolicyID: + description: Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. + type: string + storagePolicyName: + description: Storage Policy Based Management (SPBM) profile name. + type: string + volumePath: + description: Path that identifies vSphere volume vmdk + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + type: object + tasks: + description: Tasks describes the children steps of serial or parallel node. Only used when Type is TypeSerial or TypeParallel. + items: + type: string + type: array + templateType: + type: string + timeChaos: + description: TimeChaosSpec defines the desired state of TimeChaos + properties: + clockIds: + description: ClockIds defines all affected clock id All available options are ["CLOCK_REALTIME","CLOCK_MONOTONIC","CLOCK_PROCESS_CPUTIME_ID","CLOCK_THREAD_CPUTIME_ID", "CLOCK_MONOTONIC_RAW","CLOCK_REALTIME_COARSE","CLOCK_MONOTONIC_COARSE","CLOCK_BOOTTIME","CLOCK_REALTIME_ALARM", "CLOCK_BOOTTIME_ALARM"] Default value is ["CLOCK_REALTIME"] + items: + type: string + type: array + containerNames: + description: ContainerNames indicates list of the name of affected container. If not set, all containers will be injected + items: + type: string + type: array + duration: + description: Duration represents the duration of the chaos action + type: string + mode: + description: 'Mode defines the mode to run chaos action. Supported mode: one / all / fixed / fixed-percent / random-max-percent' + enum: + - one + - all + - fixed + - fixed-percent + - random-max-percent + type: string + selector: + description: Selector is used to select pods that are used to inject chaos action. + properties: + annotationSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can be used to select objects. A selector based on annotations. + type: object + expressionSelectors: + description: a slice of label selector expressions that can be used to select objects. A list of selectors based on set-based label expressions. + items: + description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + properties: + key: + description: key is the label key that the selector applies to. + type: string + operator: + description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + fieldSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can be used to select objects. A selector based on fields. + type: object + labelSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can be used to select objects. A selector based on labels. + type: object + namespaces: + description: Namespaces is a set of namespace to which objects belong. + items: + type: string + type: array + nodeSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can be used to select nodes. Selector which must match a node's labels, and objects must belong to these selected nodes. + type: object + nodes: + description: Nodes is a set of node name and objects must belong to these nodes. + items: + type: string + type: array + podPhaseSelectors: + description: 'PodPhaseSelectors is a set of condition of a pod at the current time. supported value: Pending / Running / Succeeded / Failed / Unknown' + items: + type: string + type: array + pods: + additionalProperties: + items: + type: string + type: array + description: Pods is a map of string keys and a set values that used to select pods. The key defines the namespace which pods belong, and the each values is a set of pod names. + type: object + type: object + timeOffset: + description: TimeOffset defines the delta time of injected program. It's a possibly signed sequence of decimal numbers, such as "300ms", "-1.5h" or "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". + type: string + value: + description: Value is required when the mode is set to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. If `FixedPodMode`, provide an integer of pods to do chaos action. If `FixedPercentPodMod`, provide a number from 0-100 to specify the percent of pods the server can do chaos action. IF `RandomMaxPercentPodMod`, provide a number from 0-100 to specify the max percent of pods to do chaos action + type: string + required: + - mode + - selector + - timeOffset + type: object + required: + - name + - templateType + type: object + type: array + required: + - entry + - templates + type: object + required: + - schedule + - type + type: object + startTime: format: date-time type: string stressChaos: @@ -5834,112 +7376,1629 @@ spec: type: string description: Map of string keys and values that can be used to select objects. A selector based on annotations. type: object - expressionSelectors: - description: a slice of label selector expressions that can be used to select objects. A list of selectors based on set-based label expressions. + expressionSelectors: + description: a slice of label selector expressions that can be used to select objects. A list of selectors based on set-based label expressions. + items: + description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + properties: + key: + description: key is the label key that the selector applies to. + type: string + operator: + description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + fieldSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can be used to select objects. A selector based on fields. + type: object + labelSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can be used to select objects. A selector based on labels. + type: object + namespaces: + description: Namespaces is a set of namespace to which objects belong. + items: + type: string + type: array + nodeSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can be used to select nodes. Selector which must match a node's labels, and objects must belong to these selected nodes. + type: object + nodes: + description: Nodes is a set of node name and objects must belong to these nodes. + items: + type: string + type: array + podPhaseSelectors: + description: 'PodPhaseSelectors is a set of condition of a pod at the current time. supported value: Pending / Running / Succeeded / Failed / Unknown' + items: + type: string + type: array + pods: + additionalProperties: + items: + type: string + type: array + description: Pods is a map of string keys and a set values that used to select pods. The key defines the namespace which pods belong, and the each values is a set of pod names. + type: object + type: object + stressngStressors: + description: StressngStressors defines plenty of stressors just like `Stressors` except that it's an experimental feature and more powerful. You can define stressors in `stress-ng` (see also `man stress-ng`) dialect, however not all of the supported stressors are well tested. It maybe retired in later releases. You should always use `Stressors` to define the stressors and use this only when you want more stressors unsupported by `Stressors`. When both `StressngStressors` and `Stressors` are defined, `StressngStressors` wins. + type: string + stressors: + description: Stressors defines plenty of stressors supported to stress system components out. You can use one or more of them to make up various kinds of stresses. At least one of the stressors should be specified. + properties: + cpu: + description: CPUStressor stresses CPU out + properties: + load: + description: Load specifies P percent loading per CPU worker. 0 is effectively a sleep (no load) and 100 is full loading. + type: integer + options: + description: extend stress-ng options + items: + type: string + type: array + workers: + description: Workers specifies N workers to apply the stressor. + type: integer + required: + - workers + type: object + memory: + description: MemoryStressor stresses virtual memory out + properties: + options: + description: extend stress-ng options + items: + type: string + type: array + size: + description: Size specifies N bytes consumed per vm worker, default is the total available memory. One can specify the size as % of total available memory or in units of B, KB/KiB, MB/MiB, GB/GiB, TB/TiB. + type: string + workers: + description: Workers specifies N workers to apply the stressor. + type: integer + required: + - workers + type: object + type: object + value: + description: Value is required when the mode is set to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. If `FixedPodMode`, provide an integer of pods to do chaos action. If `FixedPercentPodMod`, provide a number from 0-100 to specify the percent of pods the server can do chaos action. IF `RandomMaxPercentPodMod`, provide a number from 0-100 to specify the max percent of pods to do chaos action + type: string + required: + - mode + - selector + type: object + task: + properties: + container: + description: Container is the main container image to run in the pod + properties: + args: + description: '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. 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. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + command: + description: '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. 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. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + env: + description: List of environment variables to set in the container. Cannot be updated. + items: + description: EnvVar represents an environment variable present in a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: '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 "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: '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.' + properties: + containerName: + description: 'Container name: required for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + description: 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. + items: + description: EnvFromSource represents the source of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object + type: object + type: array + image: + description: '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.' + type: string + imagePullPolicy: + description: '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' + type: string + lifecycle: + description: Actions that the management system should take in response to container lifecycle events. Cannot be updated. + properties: + postStart: + description: 'PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following should be specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + description: 'PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The reason for termination is passed to the handler. The Pod''s termination grace period countdown begins before the PreStop hooked is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod''s termination grace period. Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following should be specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + description: 'Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following should be specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: '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' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: 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. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: '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' + format: int32 + type: integer + type: object + name: + description: Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. + type: string + ports: + description: 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. items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + description: ContainerPort represents a network port in a single container. + properties: + containerPort: + description: Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. + format: int32 + type: integer + hostIP: + description: What host IP to bind the external port to. + type: string + hostPort: + description: Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. + format: int32 + type: integer + name: + description: If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services. + type: string + protocol: + default: TCP + description: Protocol for port. Must be UDP, TCP, or SCTP. Defaults to "TCP". + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + description: 'Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following should be specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: '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' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: 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. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: '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' + format: int32 + type: integer + type: object + resources: + description: 'Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: '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-compute-resources-container/' + type: object + type: object + securityContext: + description: 'Security options the pod should run with. More info: https://kubernetes.io/docs/concepts/policy/security-context/ More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/' + properties: + allowPrivilegeEscalation: + description: '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' + type: boolean + capabilities: + description: The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. + type: boolean + procMount: + description: 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. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only root filesystem. Default is false. + type: boolean + runAsGroup: + description: 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. + format: int64 + type: integer + runAsNonRoot: + description: 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. + type: boolean + runAsUser: + description: 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. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + properties: + level: + description: Level is SELinux level label that applies to the container. + type: string + role: + description: Role is a SELinux role label that applies to the container. + type: string + type: + description: Type is a SELinux type label that applies to the container. + type: string + user: + description: User is a SELinux user label that applies to the container. + type: string + type: object + windowsOptions: + description: The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + properties: + gmsaCredentialSpec: + description: 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. This field is alpha-level and is only honored by servers that enable the WindowsGMSA feature flag. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the GMSA credential spec to use. This field is alpha-level and is only honored by servers that enable the WindowsGMSA feature flag. + type: string + runAsUserName: + description: 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. This field is beta-level and may be disabled with the WindowsRunAsUserName feature flag. + type: string + type: object + type: object + startupProbe: + description: 'StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod''s lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. This is an alpha feature enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following should be specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: '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' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: 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. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: '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' + format: int32 + type: integer + type: object + stdin: + description: 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. + type: boolean + stdinOnce: + description: 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 + type: boolean + terminationMessagePath: + description: '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.' + type: string + terminationMessagePolicy: + description: 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. + type: string + tty: + description: Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false. + type: boolean + volumeDevices: + description: volumeDevices is the list of block devices to be used by the container. This is a beta feature. + items: + description: volumeDevice describes a mapping of a raw block device within a container. + properties: + devicePath: + description: devicePath is the path inside of the container that the device will be mapped to. + type: string + name: + description: name must match the name of a persistentVolumeClaim in the pod + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + description: Pod volumes to mount into the container's filesystem. Cannot be updated. + items: + description: VolumeMount describes a mounting of a Volume within a container. + properties: + mountPath: + description: Path within the container at which the volume should be mounted. Must not contain ':'. + type: string + mountPropagation: + description: 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. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. + type: boolean + subPath: + description: Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). + type: string + subPathExpr: + description: 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. + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: 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. + type: string + required: + - name + type: object + volumes: + description: Volumes is a list of volumes that can be mounted by containers in a template. + items: + description: Volume represents a named volume in a pod that may be accessed by any container in the pod. + properties: + awsElasticBlockStore: + description: 'AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + properties: + fsType: + description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + partition: + description: 'The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty).' + format: int32 + type: integer + readOnly: + description: 'Specify "true" to force and set the ReadOnly property in VolumeMounts to "true". If omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: boolean + volumeID: + description: 'Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: string + required: + - volumeID + type: object + azureDisk: + description: AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. + properties: + cachingMode: + description: 'Host Caching mode: None, Read Only, Read Write.' + type: string + diskName: + description: The Name of the data disk in the blob storage + type: string + diskURI: + description: The URI the data disk in the blob storage + type: string + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + kind: + description: 'Expected values Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared' + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + description: AzureFile represents an Azure File Service mount on the host and bind mount to the pod. + properties: + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretName: + description: the name of secret that contains Azure Storage Account Name and Key + type: string + shareName: + description: Share Name + type: string + required: + - secretName + - shareName + type: object + cephfs: + description: CephFS represents a Ceph FS mount on the host that shares a pod's lifetime + properties: + monitors: + description: 'Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + items: + type: string + type: array + path: + description: 'Optional: Used as the mounted root, rather than the full Ceph tree, default is /' + type: string + readOnly: + description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: boolean + secretFile: + description: 'Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + secretRef: + description: 'Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + user: + description: 'Optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + required: + - monitors + type: object + cinder: + description: 'Cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + properties: + fsType: + description: 'Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + readOnly: + description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: boolean + secretRef: + description: 'Optional: points to a secret object containing parameters used to connect to OpenStack.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + volumeID: + description: 'volume id used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + required: + - volumeID + type: object + configMap: + description: ConfigMap represents a configMap that should populate this volume + properties: + defaultMode: + description: 'Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + items: + description: If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its keys must be defined + type: boolean + type: object + csi: + description: CSI (Container Storage Interface) represents storage that is handled by an external CSI driver (Alpha feature). + properties: + driver: + description: Driver is the name of the CSI driver that handles this volume. Consult with your admin for the correct name as registered in the cluster. + type: string + fsType: + description: Filesystem type to mount. Ex. "ext4", "xfs", "ntfs". If not provided, the empty value is passed to the associated CSI driver which will determine the default filesystem to apply. + type: string + nodePublishSecretRef: + description: NodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secret references are passed. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + readOnly: + description: Specifies a read-only configuration for the volume. Defaults to false (read/write). + type: boolean + volumeAttributes: + additionalProperties: + type: string + description: VolumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values. + type: object + required: + - driver + type: object + downwardAPI: + description: DownwardAPI represents downward API about the pod that should populate this volume + properties: + defaultMode: + description: 'Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + items: + description: Items is a list of downward API volume file + items: + description: DownwardAPIVolumeFile represents information to create the file containing the pod field + properties: + fieldRef: + description: 'Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.' + properties: + apiVersion: + description: Version of the schema the FieldPath is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified API version. + type: string + required: + - fieldPath + type: object + mode: + description: 'Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative path name of the file to be created. Must not be absolute or contain the ''..'' path. Must be utf-8 encoded. The first item of the relative path must not start with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + emptyDir: + description: 'EmptyDir represents a temporary directory that shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + properties: + medium: + description: 'What type of storage medium should back this directory. The default is "" which means to use the node''s default medium. Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + description: 'Total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir' + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + fc: + description: FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. + properties: + fsType: + description: 'Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + lun: + description: 'Optional: FC target lun number' + format: int32 + type: integer + readOnly: + description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.' + type: boolean + targetWWNs: + description: 'Optional: FC target worldwide names (WWNs)' + items: + type: string + type: array + wwids: + description: 'Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously.' + items: + type: string + type: array + type: object + flexVolume: + description: FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. + properties: + driver: + description: Driver is the name of the driver to use for this volume. + type: string + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script. + type: string + options: + additionalProperties: + type: string + description: 'Optional: Extra command options if any.' + type: object + readOnly: + description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.' + type: boolean + secretRef: + description: 'Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - driver + type: object + flocker: + description: Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running properties: - key: - description: key is the label key that the selector applies to. + datasetName: + description: Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. + datasetUUID: + description: UUID of the dataset. This is unique identifier of a Flocker dataset type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. + type: object + gcePersistentDisk: + description: 'GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + properties: + fsType: + description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + partition: + description: 'The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + format: int32 + type: integer + pdName: + description: 'Unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: string + readOnly: + description: 'ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: boolean + required: + - pdName + type: object + gitRepo: + description: 'GitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod''s container.' + properties: + directory: + description: Target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name. + type: string + repository: + description: Repository URL + type: string + revision: + description: Commit hash for the specified revision. + type: string + required: + - repository + type: object + glusterfs: + description: 'Glusterfs represents a Glusterfs mount on the host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md' + properties: + endpoints: + description: 'EndpointsName is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + path: + description: 'Path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + readOnly: + description: 'ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: boolean + required: + - endpoints + - path + type: object + hostPath: + description: 'HostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath --- TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not mount host directories as read/write.' + properties: + path: + description: 'Path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + type: + description: 'Type for HostPath Volume Defaults to "" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + required: + - path + type: object + iscsi: + description: 'ISCSI represents an ISCSI Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' + properties: + chapAuthDiscovery: + description: whether support iSCSI Discovery CHAP authentication + type: boolean + chapAuthSession: + description: whether support iSCSI Session CHAP authentication + type: boolean + fsType: + description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + initiatorName: + description: Custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection. + type: string + iqn: + description: Target iSCSI Qualified Name. + type: string + iscsiInterface: + description: iSCSI Interface Name that uses an iSCSI transport. Defaults to 'default' (tcp). + type: string + lun: + description: iSCSI Target Lun number. + format: int32 + type: integer + portals: + description: iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). items: type: string type: array + readOnly: + description: ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. + type: boolean + secretRef: + description: CHAP Secret for iSCSI target and initiator authentication + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + targetPortal: + description: iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). + type: string required: - - key - - operator + - iqn + - lun + - targetPortal type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to select nodes. Selector which must match a node's labels, and objects must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition of a pod at the current time. supported value: Pending / Running / Succeeded / Failed / Unknown' - items: + name: + description: 'Volume''s name. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values that used to select pods. The key defines the namespace which pods belong, and the each values is a set of pod names. - type: object - type: object - stressngStressors: - description: StressngStressors defines plenty of stressors just like `Stressors` except that it's an experimental feature and more powerful. You can define stressors in `stress-ng` (see also `man stress-ng`) dialect, however not all of the supported stressors are well tested. It maybe retired in later releases. You should always use `Stressors` to define the stressors and use this only when you want more stressors unsupported by `Stressors`. When both `StressngStressors` and `Stressors` are defined, `StressngStressors` wins. - type: string - stressors: - description: Stressors defines plenty of stressors supported to stress system components out. You can use one or more of them to make up various kinds of stresses. At least one of the stressors should be specified. - properties: - cpu: - description: CPUStressor stresses CPU out - properties: - load: - description: Load specifies P percent loading per CPU worker. 0 is effectively a sleep (no load) and 100 is full loading. - type: integer - options: - description: extend stress-ng options - items: + nfs: + description: 'NFS represents an NFS mount on the host that shares a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + properties: + path: + description: 'Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' type: string - type: array - workers: - description: Workers specifies N workers to apply the stressor. - type: integer - required: - - workers - type: object - memory: - description: MemoryStressor stresses virtual memory out - properties: - options: - description: extend stress-ng options + readOnly: + description: 'ReadOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: boolean + server: + description: 'Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + description: 'PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + properties: + claimName: + description: 'ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + type: string + readOnly: + description: Will force the ReadOnly setting in VolumeMounts. Default false. + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + description: PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + pdID: + description: ID that identifies Photon Controller persistent disk + type: string + required: + - pdID + type: object + portworxVolume: + description: PortworxVolume represents a portworx volume attached and mounted on kubelets host machine + properties: + fsType: + description: FSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + volumeID: + description: VolumeID uniquely identifies a Portworx volume + type: string + required: + - volumeID + type: object + projected: + description: Items for all in one resources secrets, configmaps, and downward API + properties: + defaultMode: + description: Mode bits to use on created files by default. Must be a value between 0 and 0777. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. + format: int32 + type: integer + sources: + description: list of volume projections + items: + description: Projection that may be projected along with other supported volume types + properties: + configMap: + description: information about the configMap data to project + properties: + items: + description: If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its keys must be defined + type: boolean + type: object + downwardAPI: + description: information about the downwardAPI data to project + properties: + items: + description: Items is a list of DownwardAPIVolume file + items: + description: DownwardAPIVolumeFile represents information to create the file containing the pod field + properties: + fieldRef: + description: 'Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.' + properties: + apiVersion: + description: Version of the schema the FieldPath is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified API version. + type: string + required: + - fieldPath + type: object + mode: + description: 'Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative path name of the file to be created. Must not be absolute or contain the ''..'' path. Must be utf-8 encoded. The first item of the relative path must not start with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + secret: + description: information about the secret data to project + properties: + items: + description: If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must be defined + type: boolean + type: object + serviceAccountToken: + description: information about the serviceAccountToken data to project + properties: + audience: + description: Audience is the intended audience of the token. A recipient of a token must identify itself with an identifier specified in the audience of the token, and otherwise should reject the token. The audience defaults to the identifier of the apiserver. + type: string + expirationSeconds: + description: ExpirationSeconds is the requested duration of validity of the service account token. As the token approaches expiration, the kubelet volume plugin will proactively rotate the service account token. The kubelet will start trying to rotate the token if the token is older than 80 percent of its time to live or if the token is older than 24 hours.Defaults to 1 hour and must be at least 10 minutes. + format: int64 + type: integer + path: + description: Path is the path relative to the mount point of the file to project the token into. + type: string + required: + - path + type: object + type: object + type: array + required: + - sources + type: object + quobyte: + description: Quobyte represents a Quobyte mount on the host that shares a pod's lifetime + properties: + group: + description: Group to map volume access to Default is no group + type: string + readOnly: + description: ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false. + type: boolean + registry: + description: Registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes + type: string + tenant: + description: Tenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin + type: string + user: + description: User to map volume access to Defaults to serivceaccount user + type: string + volume: + description: Volume is a string that references an already created Quobyte volume by name. + type: string + required: + - registry + - volume + type: object + rbd: + description: 'RBD represents a Rados Block Device mount on the host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md' + properties: + fsType: + description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + image: + description: 'The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + keyring: + description: 'Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + monitors: + description: 'A collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + items: + type: string + type: array + pool: + description: 'The rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + readOnly: + description: 'ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: boolean + secretRef: + description: 'SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + user: + description: 'The rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + required: + - image + - monitors + type: object + scaleIO: + description: ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Default is "xfs". + type: string + gateway: + description: The host address of the ScaleIO API Gateway. + type: string + protectionDomain: + description: The name of the ScaleIO Protection Domain for the configured storage. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + sslEnabled: + description: Flag to enable/disable SSL communication with Gateway, default false + type: boolean + storageMode: + description: Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned. + type: string + storagePool: + description: The ScaleIO Storage Pool associated with the protection domain. + type: string + system: + description: The name of the storage system as configured in ScaleIO. + type: string + volumeName: + description: The name of a volume already created in the ScaleIO system that is associated with this volume source. + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + description: 'Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + properties: + defaultMode: + description: 'Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer items: + description: If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + optional: + description: Specify whether the Secret or its keys must be defined + type: boolean + secretName: + description: 'Name of the secret in the pod''s namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' type: string - type: array - size: - description: Size specifies N bytes consumed per vm worker, default is the total available memory. One can specify the size as % of total available memory or in units of B, KB/KiB, MB/MiB, GB/GiB, TB/TiB. - type: string - workers: - description: Workers specifies N workers to apply the stressor. - type: integer - required: - - workers - type: object - type: object - value: - description: Value is required when the mode is set to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. If `FixedPodMode`, provide an integer of pods to do chaos action. If `FixedPercentPodMod`, provide a number from 0-100 to specify the percent of pods the server can do chaos action. IF `RandomMaxPercentPodMod`, provide a number from 0-100 to specify the max percent of pods to do chaos action - type: string - required: - - mode - - selector + type: object + storageos: + description: StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + volumeName: + description: VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace. + type: string + volumeNamespace: + description: VolumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to "default" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created. + type: string + type: object + vsphereVolume: + description: VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + storagePolicyID: + description: Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. + type: string + storagePolicyName: + description: Storage Policy Based Management (SPBM) profile name. + type: string + volumePath: + description: Path that identifies vSphere volume vmdk + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array type: object tasks: items: @@ -6089,8 +9148,28 @@ spec: - kind - name type: object + conditionalBranches: + description: ConditionalBranches records the evaluation result of each ConditionalTask + properties: + branches: + items: + properties: + run: + type: string + task: + type: string + required: + - run + - task + type: object + type: array + context: + items: + type: string + type: array + type: object conditions: - description: Represents the latest available observations of a worklfow node's current state. + description: Represents the latest available observations of a workflow node's current state. items: properties: reason: diff --git a/config/crd/bases/chaos-mesh.org_workflows.yaml b/config/crd/bases/chaos-mesh.org_workflows.yaml index f71bd6ca78..df88ea34ed 100644 --- a/config/crd/bases/chaos-mesh.org_workflows.yaml +++ b/config/crd/bases/chaos-mesh.org_workflows.yaml @@ -74,6 +74,18 @@ spec: - awsRegion - ec2Instance type: object + conditionalTasks: + description: ConditionalTasks describes the conditional branches of custom tasks. Only used when Type is TypeTask. + items: + properties: + expression: + type: string + task: + type: string + required: + - task + type: object + type: array dnsChaos: description: DNSChaosSpec defines the desired state of DNSChaos properties: @@ -1287,7 +1299,7 @@ spec: - selector type: object schedule: - description: ChaosOnlyScheduleSpec is very similar with ScheduleSpec, but it could not schedule Workflow because we could not resolve nested CRD now + description: Schedule describe the Schedule(describing scheduled chaos) to be injected with chaos nodes. Only used when Type is TypeSchedule. properties: awsChaos: description: AwsChaosSpec is the content of the specification for an AwsChaos @@ -2928,7 +2940,1526 @@ spec: - mode - selector type: object + task: + description: Task describes the behavior of the custom task. Only used when Type is TypeTask. + properties: + container: + description: Container is the main container image to run in the pod + properties: + args: + description: '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. 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. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + command: + description: '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. 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. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + env: + description: List of environment variables to set in the container. Cannot be updated. + items: + description: EnvVar represents an environment variable present in a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: '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 "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: '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.' + properties: + containerName: + description: 'Container name: required for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + description: 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. + items: + description: EnvFromSource represents the source of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object + type: object + type: array + image: + description: '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.' + type: string + imagePullPolicy: + description: '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' + type: string + lifecycle: + description: Actions that the management system should take in response to container lifecycle events. Cannot be updated. + properties: + postStart: + description: 'PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following should be specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + description: 'PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The reason for termination is passed to the handler. The Pod''s termination grace period countdown begins before the PreStop hooked is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod''s termination grace period. Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following should be specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + description: 'Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following should be specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: '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' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: 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. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: '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' + format: int32 + type: integer + type: object + name: + description: Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. + type: string + ports: + description: 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. + items: + description: ContainerPort represents a network port in a single container. + properties: + containerPort: + description: Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. + format: int32 + type: integer + hostIP: + description: What host IP to bind the external port to. + type: string + hostPort: + description: Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. + format: int32 + type: integer + name: + description: If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services. + type: string + protocol: + default: TCP + description: Protocol for port. Must be UDP, TCP, or SCTP. Defaults to "TCP". + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + description: 'Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following should be specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: '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' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: 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. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: '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' + format: int32 + type: integer + type: object + resources: + description: 'Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: '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-compute-resources-container/' + type: object + type: object + securityContext: + description: 'Security options the pod should run with. More info: https://kubernetes.io/docs/concepts/policy/security-context/ More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/' + properties: + allowPrivilegeEscalation: + description: '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' + type: boolean + capabilities: + description: The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. + type: boolean + procMount: + description: 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. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only root filesystem. Default is false. + type: boolean + runAsGroup: + description: 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. + format: int64 + type: integer + runAsNonRoot: + description: 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. + type: boolean + runAsUser: + description: 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. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + properties: + level: + description: Level is SELinux level label that applies to the container. + type: string + role: + description: Role is a SELinux role label that applies to the container. + type: string + type: + description: Type is a SELinux type label that applies to the container. + type: string + user: + description: User is a SELinux user label that applies to the container. + type: string + type: object + windowsOptions: + description: The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + properties: + gmsaCredentialSpec: + description: 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. This field is alpha-level and is only honored by servers that enable the WindowsGMSA feature flag. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the GMSA credential spec to use. This field is alpha-level and is only honored by servers that enable the WindowsGMSA feature flag. + type: string + runAsUserName: + description: 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. This field is beta-level and may be disabled with the WindowsRunAsUserName feature flag. + type: string + type: object + type: object + startupProbe: + description: 'StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod''s lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. This is an alpha feature enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following should be specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: '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' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: 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. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: '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' + format: int32 + type: integer + type: object + stdin: + description: 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. + type: boolean + stdinOnce: + description: 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 + type: boolean + terminationMessagePath: + description: '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.' + type: string + terminationMessagePolicy: + description: 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. + type: string + tty: + description: Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false. + type: boolean + volumeDevices: + description: volumeDevices is the list of block devices to be used by the container. This is a beta feature. + items: + description: volumeDevice describes a mapping of a raw block device within a container. + properties: + devicePath: + description: devicePath is the path inside of the container that the device will be mapped to. + type: string + name: + description: name must match the name of a persistentVolumeClaim in the pod + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + description: Pod volumes to mount into the container's filesystem. Cannot be updated. + items: + description: VolumeMount describes a mounting of a Volume within a container. + properties: + mountPath: + description: Path within the container at which the volume should be mounted. Must not contain ':'. + type: string + mountPropagation: + description: 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. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. + type: boolean + subPath: + description: Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). + type: string + subPathExpr: + description: 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. + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: 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. + type: string + required: + - name + type: object + volumes: + description: Volumes is a list of volumes that can be mounted by containers in a template. + items: + description: Volume represents a named volume in a pod that may be accessed by any container in the pod. + properties: + awsElasticBlockStore: + description: 'AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + properties: + fsType: + description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + partition: + description: 'The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty).' + format: int32 + type: integer + readOnly: + description: 'Specify "true" to force and set the ReadOnly property in VolumeMounts to "true". If omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: boolean + volumeID: + description: 'Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: string + required: + - volumeID + type: object + azureDisk: + description: AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. + properties: + cachingMode: + description: 'Host Caching mode: None, Read Only, Read Write.' + type: string + diskName: + description: The Name of the data disk in the blob storage + type: string + diskURI: + description: The URI the data disk in the blob storage + type: string + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + kind: + description: 'Expected values Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared' + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + description: AzureFile represents an Azure File Service mount on the host and bind mount to the pod. + properties: + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretName: + description: the name of secret that contains Azure Storage Account Name and Key + type: string + shareName: + description: Share Name + type: string + required: + - secretName + - shareName + type: object + cephfs: + description: CephFS represents a Ceph FS mount on the host that shares a pod's lifetime + properties: + monitors: + description: 'Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + items: + type: string + type: array + path: + description: 'Optional: Used as the mounted root, rather than the full Ceph tree, default is /' + type: string + readOnly: + description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: boolean + secretFile: + description: 'Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + secretRef: + description: 'Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + user: + description: 'Optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + required: + - monitors + type: object + cinder: + description: 'Cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + properties: + fsType: + description: 'Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + readOnly: + description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: boolean + secretRef: + description: 'Optional: points to a secret object containing parameters used to connect to OpenStack.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + volumeID: + description: 'volume id used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + required: + - volumeID + type: object + configMap: + description: ConfigMap represents a configMap that should populate this volume + properties: + defaultMode: + description: 'Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + items: + description: If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its keys must be defined + type: boolean + type: object + csi: + description: CSI (Container Storage Interface) represents storage that is handled by an external CSI driver (Alpha feature). + properties: + driver: + description: Driver is the name of the CSI driver that handles this volume. Consult with your admin for the correct name as registered in the cluster. + type: string + fsType: + description: Filesystem type to mount. Ex. "ext4", "xfs", "ntfs". If not provided, the empty value is passed to the associated CSI driver which will determine the default filesystem to apply. + type: string + nodePublishSecretRef: + description: NodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secret references are passed. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + readOnly: + description: Specifies a read-only configuration for the volume. Defaults to false (read/write). + type: boolean + volumeAttributes: + additionalProperties: + type: string + description: VolumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values. + type: object + required: + - driver + type: object + downwardAPI: + description: DownwardAPI represents downward API about the pod that should populate this volume + properties: + defaultMode: + description: 'Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + items: + description: Items is a list of downward API volume file + items: + description: DownwardAPIVolumeFile represents information to create the file containing the pod field + properties: + fieldRef: + description: 'Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.' + properties: + apiVersion: + description: Version of the schema the FieldPath is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified API version. + type: string + required: + - fieldPath + type: object + mode: + description: 'Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative path name of the file to be created. Must not be absolute or contain the ''..'' path. Must be utf-8 encoded. The first item of the relative path must not start with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + emptyDir: + description: 'EmptyDir represents a temporary directory that shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + properties: + medium: + description: 'What type of storage medium should back this directory. The default is "" which means to use the node''s default medium. Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + description: 'Total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir' + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + fc: + description: FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. + properties: + fsType: + description: 'Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + lun: + description: 'Optional: FC target lun number' + format: int32 + type: integer + readOnly: + description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.' + type: boolean + targetWWNs: + description: 'Optional: FC target worldwide names (WWNs)' + items: + type: string + type: array + wwids: + description: 'Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously.' + items: + type: string + type: array + type: object + flexVolume: + description: FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. + properties: + driver: + description: Driver is the name of the driver to use for this volume. + type: string + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script. + type: string + options: + additionalProperties: + type: string + description: 'Optional: Extra command options if any.' + type: object + readOnly: + description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.' + type: boolean + secretRef: + description: 'Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - driver + type: object + flocker: + description: Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running + properties: + datasetName: + description: Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated + type: string + datasetUUID: + description: UUID of the dataset. This is unique identifier of a Flocker dataset + type: string + type: object + gcePersistentDisk: + description: 'GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + properties: + fsType: + description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + partition: + description: 'The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + format: int32 + type: integer + pdName: + description: 'Unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: string + readOnly: + description: 'ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: boolean + required: + - pdName + type: object + gitRepo: + description: 'GitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod''s container.' + properties: + directory: + description: Target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name. + type: string + repository: + description: Repository URL + type: string + revision: + description: Commit hash for the specified revision. + type: string + required: + - repository + type: object + glusterfs: + description: 'Glusterfs represents a Glusterfs mount on the host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md' + properties: + endpoints: + description: 'EndpointsName is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + path: + description: 'Path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + readOnly: + description: 'ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: boolean + required: + - endpoints + - path + type: object + hostPath: + description: 'HostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath --- TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not mount host directories as read/write.' + properties: + path: + description: 'Path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + type: + description: 'Type for HostPath Volume Defaults to "" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + required: + - path + type: object + iscsi: + description: 'ISCSI represents an ISCSI Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' + properties: + chapAuthDiscovery: + description: whether support iSCSI Discovery CHAP authentication + type: boolean + chapAuthSession: + description: whether support iSCSI Session CHAP authentication + type: boolean + fsType: + description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + initiatorName: + description: Custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection. + type: string + iqn: + description: Target iSCSI Qualified Name. + type: string + iscsiInterface: + description: iSCSI Interface Name that uses an iSCSI transport. Defaults to 'default' (tcp). + type: string + lun: + description: iSCSI Target Lun number. + format: int32 + type: integer + portals: + description: iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). + items: + type: string + type: array + readOnly: + description: ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. + type: boolean + secretRef: + description: CHAP Secret for iSCSI target and initiator authentication + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + targetPortal: + description: iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + description: 'Volume''s name. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + nfs: + description: 'NFS represents an NFS mount on the host that shares a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + properties: + path: + description: 'Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + readOnly: + description: 'ReadOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: boolean + server: + description: 'Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + description: 'PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + properties: + claimName: + description: 'ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + type: string + readOnly: + description: Will force the ReadOnly setting in VolumeMounts. Default false. + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + description: PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + pdID: + description: ID that identifies Photon Controller persistent disk + type: string + required: + - pdID + type: object + portworxVolume: + description: PortworxVolume represents a portworx volume attached and mounted on kubelets host machine + properties: + fsType: + description: FSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + volumeID: + description: VolumeID uniquely identifies a Portworx volume + type: string + required: + - volumeID + type: object + projected: + description: Items for all in one resources secrets, configmaps, and downward API + properties: + defaultMode: + description: Mode bits to use on created files by default. Must be a value between 0 and 0777. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. + format: int32 + type: integer + sources: + description: list of volume projections + items: + description: Projection that may be projected along with other supported volume types + properties: + configMap: + description: information about the configMap data to project + properties: + items: + description: If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its keys must be defined + type: boolean + type: object + downwardAPI: + description: information about the downwardAPI data to project + properties: + items: + description: Items is a list of DownwardAPIVolume file + items: + description: DownwardAPIVolumeFile represents information to create the file containing the pod field + properties: + fieldRef: + description: 'Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.' + properties: + apiVersion: + description: Version of the schema the FieldPath is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified API version. + type: string + required: + - fieldPath + type: object + mode: + description: 'Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative path name of the file to be created. Must not be absolute or contain the ''..'' path. Must be utf-8 encoded. The first item of the relative path must not start with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + secret: + description: information about the secret data to project + properties: + items: + description: If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must be defined + type: boolean + type: object + serviceAccountToken: + description: information about the serviceAccountToken data to project + properties: + audience: + description: Audience is the intended audience of the token. A recipient of a token must identify itself with an identifier specified in the audience of the token, and otherwise should reject the token. The audience defaults to the identifier of the apiserver. + type: string + expirationSeconds: + description: ExpirationSeconds is the requested duration of validity of the service account token. As the token approaches expiration, the kubelet volume plugin will proactively rotate the service account token. The kubelet will start trying to rotate the token if the token is older than 80 percent of its time to live or if the token is older than 24 hours.Defaults to 1 hour and must be at least 10 minutes. + format: int64 + type: integer + path: + description: Path is the path relative to the mount point of the file to project the token into. + type: string + required: + - path + type: object + type: object + type: array + required: + - sources + type: object + quobyte: + description: Quobyte represents a Quobyte mount on the host that shares a pod's lifetime + properties: + group: + description: Group to map volume access to Default is no group + type: string + readOnly: + description: ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false. + type: boolean + registry: + description: Registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes + type: string + tenant: + description: Tenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin + type: string + user: + description: User to map volume access to Defaults to serivceaccount user + type: string + volume: + description: Volume is a string that references an already created Quobyte volume by name. + type: string + required: + - registry + - volume + type: object + rbd: + description: 'RBD represents a Rados Block Device mount on the host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md' + properties: + fsType: + description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + image: + description: 'The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + keyring: + description: 'Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + monitors: + description: 'A collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + items: + type: string + type: array + pool: + description: 'The rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + readOnly: + description: 'ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: boolean + secretRef: + description: 'SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + user: + description: 'The rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + required: + - image + - monitors + type: object + scaleIO: + description: ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Default is "xfs". + type: string + gateway: + description: The host address of the ScaleIO API Gateway. + type: string + protectionDomain: + description: The name of the ScaleIO Protection Domain for the configured storage. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + sslEnabled: + description: Flag to enable/disable SSL communication with Gateway, default false + type: boolean + storageMode: + description: Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned. + type: string + storagePool: + description: The ScaleIO Storage Pool associated with the protection domain. + type: string + system: + description: The name of the storage system as configured in ScaleIO. + type: string + volumeName: + description: The name of a volume already created in the ScaleIO system that is associated with this volume source. + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + description: 'Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + properties: + defaultMode: + description: 'Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + items: + description: If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + optional: + description: Specify whether the Secret or its keys must be defined + type: boolean + secretName: + description: 'Name of the secret in the pod''s namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + type: string + type: object + storageos: + description: StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + volumeName: + description: VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace. + type: string + volumeNamespace: + description: VolumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to "default" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created. + type: string + type: object + vsphereVolume: + description: VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + storagePolicyID: + description: Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. + type: string + storagePolicyName: + description: Storage Policy Based Management (SPBM) profile name. + type: string + volumePath: + description: Path that identifies vSphere volume vmdk + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + type: object tasks: + description: Tasks describes the children steps of serial or parallel node. Only used when Type is TypeSerial or TypeParallel. items: type: string type: array diff --git a/e2e-test/action.go b/e2e-test/action.go index 85106cf945..c14f2f771c 100644 --- a/e2e-test/action.go +++ b/e2e-test/action.go @@ -112,9 +112,9 @@ func (oa *operatorAction) DeployOperator(info OperatorConfig) error { func (oa *operatorAction) InstallCRD(info OperatorConfig) error { klog.Infof("deploying chaos-mesh crd :%v", info.ReleaseName) if oa.apiextensionsV1Available() { - oa.runKubectlOrDie("apply", "-f", oa.manifestPath("e2e/crd.yaml"), "--validate=false") + oa.runKubectlOrDie("create", "-f", oa.manifestPath("e2e/crd.yaml"), "--validate=false") } else { - oa.runKubectlOrDie("apply", "-f", oa.manifestPath("e2e/crd-v1beta1.yaml"), "--validate=false") + oa.runKubectlOrDie("create", "-f", oa.manifestPath("e2e/crd-v1beta1.yaml"), "--validate=false") } e2eutil.WaitForCRDsEstablished(oa.apiExtCli, labels.Everything()) // workaround for https://github.com/kubernetes/kubernetes/issues/65517 diff --git a/e2e-test/go.sum b/e2e-test/go.sum index fcc8ca2a9d..3fdb5434ba 100644 --- a/e2e-test/go.sum +++ b/e2e-test/go.sum @@ -80,6 +80,7 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= +github.com/antonmedv/expr v1.8.9/go.mod h1:5qsM3oLGDND7sDmQGDXHkYfkjYMUX14qsgqmHhwGEk8= github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db/go.mod h1:VTxUBvSJ3s3eHAg65PNgrsn5BtqCRPdmyXh6rAfdxN0= github.com/aristanetworks/goarista v0.0.0-20170210015632-ea17b1a17847/go.mod h1:D/tb0zPVXnP7fmsLZjtdUhSsumbK/ij54UXjjVgMGxQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= @@ -194,6 +195,7 @@ github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7Do github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= github.com/dave/jennifer v1.2.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -260,6 +262,8 @@ github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWo github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fvbommel/util v0.0.2/go.mod h1:n7nJJ4dUdRBvS0OR9FZ9zhHvQJX/3DoYiStK6hUtafs= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= +github.com/gdamore/encoding v1.0.0/go.mod h1:alR0ol34c49FCSBLjhosxzcPHQbf2trDkoo5dl+VrEg= +github.com/gdamore/tcell v1.3.0/go.mod h1:Hjvr+Ofd+gLglo7RYKxxnzCBmev3BzsS67MebKS4zMM= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= @@ -617,6 +621,8 @@ github.com/lucas-clemente/aes12 v0.0.0-20171027163421-cd47fb39b79f/go.mod h1:JpH github.com/lucas-clemente/quic-clients v0.1.0/go.mod h1:y5xVIEoObKqULIKivu+gD/LU90pL73bTdtQjPBvtCBk= github.com/lucas-clemente/quic-go v0.10.2/go.mod h1:hvaRS9IHjFLMq76puFJeWNfmn+H70QZ/CXoxqw9bzao= github.com/lucas-clemente/quic-go-certificates v0.0.0-20160823095156-d2f86524cced/go.mod h1:NCcRLrOTZbzhZvixZLlERbJtDtYsmMw8Jc4vS8Z0g58= +github.com/lucasb-eyer/go-colorful v1.0.2/go.mod h1:0MS4r+7BZKSJ5mw4/S5MPN+qHFF1fYclkSPilDOKW0s= +github.com/lucasb-eyer/go-colorful v1.0.3/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/magiconair/properties v1.7.6/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= @@ -647,6 +653,7 @@ github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzp github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-runewidth v0.0.8/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-shellwords v1.0.5/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= @@ -793,6 +800,8 @@ github.com/quasilyte/go-consistent v0.0.0-20190521200055-c6f3937de18c/go.mod h1: github.com/quobyte/api v0.1.2/go.mod h1:jL7lIHrmqQ7yh05OJ+eEEdHr0u/kmT1Ff9iHd+4H6VI= github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446/go.mod h1:uYEyJGbgTkfkS4+E/PavXkNJcbFIpEtjt2B0KDQ5+9M= github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52/go.mod h1:RDpi1RftBQPUCDRw6SmxeaREsAaRKnOclghuzp/WRzc= +github.com/rivo/tview v0.0.0-20200219210816-cd38d7432498/go.mod h1:6lkG1x+13OShEf0EaOCaTQYyB7d5nSbb181KtjlS+84= +github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho= github.com/robfig/cron v1.1.0 h1:jk4/Hud3TTdcrJgUOBgsqrZBarcxl6ADIjSC2iniwLY= github.com/robfig/cron v1.1.0/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k= @@ -810,6 +819,7 @@ github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/go-glob v0.0.0-20170128012129-256dc444b735/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= +github.com/sanity-io/litter v1.2.0/go.mod h1:JF6pZUFgu2Q0sBZ+HSV35P8TVPI1TTzEwyu9FXAw2W4= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= @@ -878,10 +888,12 @@ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v0.0.0-20161117074351-18a02ba4a312/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= @@ -1105,6 +1117,7 @@ golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190610200419-93c9922d18ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190626150813-e07cf5db2756/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1119,6 +1132,7 @@ golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200107162124-548cf772de50/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200120151820-655fe14d7479/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= diff --git a/examples/workflow/custom-task.yaml b/examples/workflow/custom-task.yaml new file mode 100644 index 0000000000..0d55aac50c --- /dev/null +++ b/examples/workflow/custom-task.yaml @@ -0,0 +1,67 @@ +apiVersion: chaos-mesh.org/v1alpha1 +kind: Workflow +metadata: + name: try-workflow-custom-task +spec: + entry: the-entry + templates: + - name: the-entry + templateType: Task + task: + container: + name: main-contaienr + image: busybox + command: + - echo + - branch-b +# - sh +# - -c +# - exit 1 + conditionalTasks: + - task: workflow-stress-chaos + expression: 'exitCode == 0 && stdout == "branch-a"' + - task: workflow-network-chaos + expression: 'exitCode == 0 && stdout == "branch-b"' + - task: on-failed + expression: 'exitCode != 0' + - name: workflow-network-chaos + templateType: NetworkChaos + duration: 20s + networkChaos: + direction: to + action: delay + mode: all + selector: + labelSelectors: + "app": "hello-kubernetes" + delay: + latency: "90ms" + correlation: "25" + jitter: "90ms" + - name: workflow-stress-chaos + templateType: StressChaos + duration: 20s + stressChaos: + mode: one + selector: + labelSelectors: + "app": "hello-kubernetes" + stressors: + cpu: + workers: 1 + load: 20 + options: [ "--cpu 1", "--timeout 600" ] + - name: on-failed + templateType: Task + task: + container: + name: main-contaienr + image: curlimages/curl + # for example: your webhook for sending notify + command: + - curl + - -XPOST + - -d + - k1=v1&k2=v2 + - https://jsonplaceholder.typicode.com/posts + diff --git a/go.mod b/go.mod index f6a9a1c107..2ece7c6458 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/Microsoft/go-winio v0.4.11 // indirect github.com/Microsoft/hcsshim v0.0.0-20190417211021-672e52e9209d // indirect github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect - github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 + github.com/antonmedv/expr v1.8.9 github.com/aws/aws-sdk-go-v2 v1.3.2 github.com/aws/aws-sdk-go-v2/config v1.1.1 github.com/aws/aws-sdk-go-v2/credentials v1.1.1 diff --git a/go.sum b/go.sum index bb343a530d..f1c75ad894 100644 --- a/go.sum +++ b/go.sum @@ -74,6 +74,8 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuy github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= +github.com/antonmedv/expr v1.8.9 h1:O9stiHmHHww9b4ozhPx7T6BK7fXfOCHJ8ybxf0833zw= +github.com/antonmedv/expr v1.8.9/go.mod h1:5qsM3oLGDND7sDmQGDXHkYfkjYMUX14qsgqmHhwGEk8= github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db/go.mod h1:VTxUBvSJ3s3eHAg65PNgrsn5BtqCRPdmyXh6rAfdxN0= github.com/aristanetworks/goarista v0.0.0-20170210015632-ea17b1a17847/go.mod h1:D/tb0zPVXnP7fmsLZjtdUhSsumbK/ij54UXjjVgMGxQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= @@ -178,6 +180,7 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsr github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/dave/jennifer v1.2.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -244,6 +247,8 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= +github.com/gdamore/encoding v1.0.0/go.mod h1:alR0ol34c49FCSBLjhosxzcPHQbf2trDkoo5dl+VrEg= +github.com/gdamore/tcell v1.3.0/go.mod h1:Hjvr+Ofd+gLglo7RYKxxnzCBmev3BzsS67MebKS4zMM= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= @@ -556,6 +561,8 @@ github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhnIaL+V+BEER86oLrvS+kWobKpbJuye0= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc= +github.com/lucasb-eyer/go-colorful v1.0.2/go.mod h1:0MS4r+7BZKSJ5mw4/S5MPN+qHFF1fYclkSPilDOKW0s= +github.com/lucasb-eyer/go-colorful v1.0.3/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= @@ -584,6 +591,7 @@ github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzp github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-runewidth v0.0.8/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= @@ -715,6 +723,8 @@ github.com/prometheus/tsdb v0.6.2-0.20190402121629-4f204dcbc150/go.mod h1:qhTCs0 github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446/go.mod h1:uYEyJGbgTkfkS4+E/PavXkNJcbFIpEtjt2B0KDQ5+9M= github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52/go.mod h1:RDpi1RftBQPUCDRw6SmxeaREsAaRKnOclghuzp/WRzc= +github.com/rivo/tview v0.0.0-20200219210816-cd38d7432498/go.mod h1:6lkG1x+13OShEf0EaOCaTQYyB7d5nSbb181KtjlS+84= +github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho= github.com/robfig/cron v1.1.0 h1:jk4/Hud3TTdcrJgUOBgsqrZBarcxl6ADIjSC2iniwLY= github.com/robfig/cron v1.1.0/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k= @@ -730,6 +740,7 @@ github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/sanity-io/litter v1.2.0/go.mod h1:JF6pZUFgu2Q0sBZ+HSV35P8TVPI1TTzEwyu9FXAw2W4= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/segmentio/kafka-go v0.1.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= @@ -780,10 +791,12 @@ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v0.0.0-20161117074351-18a02ba4a312/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= @@ -990,6 +1003,7 @@ golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190610200419-93c9922d18ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190626150813-e07cf5db2756/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1003,6 +1017,7 @@ golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200107162124-548cf772de50/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200120151820-655fe14d7479/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= diff --git a/helm/chaos-mesh/crds/chaos-mesh.org_schedules.yaml b/helm/chaos-mesh/crds/chaos-mesh.org_schedules.yaml index 241c325be0..a4f3f2c131 100644 --- a/helm/chaos-mesh/crds/chaos-mesh.org_schedules.yaml +++ b/helm/chaos-mesh/crds/chaos-mesh.org_schedules.yaml @@ -1576,6 +1576,18 @@ spec: - awsRegion - ec2Instance type: object + conditionalTasks: + description: ConditionalTasks describes the conditional branches of custom tasks. Only used when Type is TypeTask. + items: + properties: + expression: + type: string + task: + type: string + required: + - task + type: object + type: array dnsChaos: description: DNSChaosSpec defines the desired state of DNSChaos properties: @@ -2789,7 +2801,7 @@ spec: - selector type: object schedule: - description: ChaosOnlyScheduleSpec is very similar with ScheduleSpec, but it could not schedule Workflow because we could not resolve nested CRD now + description: Schedule describe the Schedule(describing scheduled chaos) to be injected with chaos nodes. Only used when Type is TypeSchedule. properties: awsChaos: description: AwsChaosSpec is the content of the specification for an AwsChaos @@ -4430,7 +4442,1526 @@ spec: - mode - selector type: object + task: + description: Task describes the behavior of the custom task. Only used when Type is TypeTask. + properties: + container: + description: Container is the main container image to run in the pod + properties: + args: + description: '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. 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. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + command: + description: '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. 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. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + env: + description: List of environment variables to set in the container. Cannot be updated. + items: + description: EnvVar represents an environment variable present in a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: '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 "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: '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.' + properties: + containerName: + description: 'Container name: required for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + description: 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. + items: + description: EnvFromSource represents the source of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object + type: object + type: array + image: + description: '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.' + type: string + imagePullPolicy: + description: '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' + type: string + lifecycle: + description: Actions that the management system should take in response to container lifecycle events. Cannot be updated. + properties: + postStart: + description: 'PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following should be specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + description: 'PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The reason for termination is passed to the handler. The Pod''s termination grace period countdown begins before the PreStop hooked is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod''s termination grace period. Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following should be specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + description: 'Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following should be specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: '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' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: 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. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: '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' + format: int32 + type: integer + type: object + name: + description: Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. + type: string + ports: + description: 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. + items: + description: ContainerPort represents a network port in a single container. + properties: + containerPort: + description: Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. + format: int32 + type: integer + hostIP: + description: What host IP to bind the external port to. + type: string + hostPort: + description: Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. + format: int32 + type: integer + name: + description: If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services. + type: string + protocol: + default: TCP + description: Protocol for port. Must be UDP, TCP, or SCTP. Defaults to "TCP". + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + description: 'Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following should be specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: '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' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: 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. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: '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' + format: int32 + type: integer + type: object + resources: + description: 'Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: '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-compute-resources-container/' + type: object + type: object + securityContext: + description: 'Security options the pod should run with. More info: https://kubernetes.io/docs/concepts/policy/security-context/ More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/' + properties: + allowPrivilegeEscalation: + description: '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' + type: boolean + capabilities: + description: The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. + type: boolean + procMount: + description: 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. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only root filesystem. Default is false. + type: boolean + runAsGroup: + description: 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. + format: int64 + type: integer + runAsNonRoot: + description: 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. + type: boolean + runAsUser: + description: 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. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + properties: + level: + description: Level is SELinux level label that applies to the container. + type: string + role: + description: Role is a SELinux role label that applies to the container. + type: string + type: + description: Type is a SELinux type label that applies to the container. + type: string + user: + description: User is a SELinux user label that applies to the container. + type: string + type: object + windowsOptions: + description: The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + properties: + gmsaCredentialSpec: + description: 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. This field is alpha-level and is only honored by servers that enable the WindowsGMSA feature flag. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the GMSA credential spec to use. This field is alpha-level and is only honored by servers that enable the WindowsGMSA feature flag. + type: string + runAsUserName: + description: 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. This field is beta-level and may be disabled with the WindowsRunAsUserName feature flag. + type: string + type: object + type: object + startupProbe: + description: 'StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod''s lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. This is an alpha feature enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following should be specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: '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' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: 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. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: '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' + format: int32 + type: integer + type: object + stdin: + description: 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. + type: boolean + stdinOnce: + description: 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 + type: boolean + terminationMessagePath: + description: '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.' + type: string + terminationMessagePolicy: + description: 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. + type: string + tty: + description: Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false. + type: boolean + volumeDevices: + description: volumeDevices is the list of block devices to be used by the container. This is a beta feature. + items: + description: volumeDevice describes a mapping of a raw block device within a container. + properties: + devicePath: + description: devicePath is the path inside of the container that the device will be mapped to. + type: string + name: + description: name must match the name of a persistentVolumeClaim in the pod + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + description: Pod volumes to mount into the container's filesystem. Cannot be updated. + items: + description: VolumeMount describes a mounting of a Volume within a container. + properties: + mountPath: + description: Path within the container at which the volume should be mounted. Must not contain ':'. + type: string + mountPropagation: + description: 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. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. + type: boolean + subPath: + description: Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). + type: string + subPathExpr: + description: 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. + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: 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. + type: string + required: + - name + type: object + volumes: + description: Volumes is a list of volumes that can be mounted by containers in a template. + items: + description: Volume represents a named volume in a pod that may be accessed by any container in the pod. + properties: + awsElasticBlockStore: + description: 'AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + properties: + fsType: + description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + partition: + description: 'The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty).' + format: int32 + type: integer + readOnly: + description: 'Specify "true" to force and set the ReadOnly property in VolumeMounts to "true". If omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: boolean + volumeID: + description: 'Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: string + required: + - volumeID + type: object + azureDisk: + description: AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. + properties: + cachingMode: + description: 'Host Caching mode: None, Read Only, Read Write.' + type: string + diskName: + description: The Name of the data disk in the blob storage + type: string + diskURI: + description: The URI the data disk in the blob storage + type: string + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + kind: + description: 'Expected values Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared' + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + description: AzureFile represents an Azure File Service mount on the host and bind mount to the pod. + properties: + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretName: + description: the name of secret that contains Azure Storage Account Name and Key + type: string + shareName: + description: Share Name + type: string + required: + - secretName + - shareName + type: object + cephfs: + description: CephFS represents a Ceph FS mount on the host that shares a pod's lifetime + properties: + monitors: + description: 'Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + items: + type: string + type: array + path: + description: 'Optional: Used as the mounted root, rather than the full Ceph tree, default is /' + type: string + readOnly: + description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: boolean + secretFile: + description: 'Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + secretRef: + description: 'Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + user: + description: 'Optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + required: + - monitors + type: object + cinder: + description: 'Cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + properties: + fsType: + description: 'Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + readOnly: + description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: boolean + secretRef: + description: 'Optional: points to a secret object containing parameters used to connect to OpenStack.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + volumeID: + description: 'volume id used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + required: + - volumeID + type: object + configMap: + description: ConfigMap represents a configMap that should populate this volume + properties: + defaultMode: + description: 'Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + items: + description: If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its keys must be defined + type: boolean + type: object + csi: + description: CSI (Container Storage Interface) represents storage that is handled by an external CSI driver (Alpha feature). + properties: + driver: + description: Driver is the name of the CSI driver that handles this volume. Consult with your admin for the correct name as registered in the cluster. + type: string + fsType: + description: Filesystem type to mount. Ex. "ext4", "xfs", "ntfs". If not provided, the empty value is passed to the associated CSI driver which will determine the default filesystem to apply. + type: string + nodePublishSecretRef: + description: NodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secret references are passed. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + readOnly: + description: Specifies a read-only configuration for the volume. Defaults to false (read/write). + type: boolean + volumeAttributes: + additionalProperties: + type: string + description: VolumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values. + type: object + required: + - driver + type: object + downwardAPI: + description: DownwardAPI represents downward API about the pod that should populate this volume + properties: + defaultMode: + description: 'Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + items: + description: Items is a list of downward API volume file + items: + description: DownwardAPIVolumeFile represents information to create the file containing the pod field + properties: + fieldRef: + description: 'Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.' + properties: + apiVersion: + description: Version of the schema the FieldPath is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified API version. + type: string + required: + - fieldPath + type: object + mode: + description: 'Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative path name of the file to be created. Must not be absolute or contain the ''..'' path. Must be utf-8 encoded. The first item of the relative path must not start with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + emptyDir: + description: 'EmptyDir represents a temporary directory that shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + properties: + medium: + description: 'What type of storage medium should back this directory. The default is "" which means to use the node''s default medium. Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + description: 'Total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir' + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + fc: + description: FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. + properties: + fsType: + description: 'Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + lun: + description: 'Optional: FC target lun number' + format: int32 + type: integer + readOnly: + description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.' + type: boolean + targetWWNs: + description: 'Optional: FC target worldwide names (WWNs)' + items: + type: string + type: array + wwids: + description: 'Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously.' + items: + type: string + type: array + type: object + flexVolume: + description: FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. + properties: + driver: + description: Driver is the name of the driver to use for this volume. + type: string + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script. + type: string + options: + additionalProperties: + type: string + description: 'Optional: Extra command options if any.' + type: object + readOnly: + description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.' + type: boolean + secretRef: + description: 'Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - driver + type: object + flocker: + description: Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running + properties: + datasetName: + description: Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated + type: string + datasetUUID: + description: UUID of the dataset. This is unique identifier of a Flocker dataset + type: string + type: object + gcePersistentDisk: + description: 'GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + properties: + fsType: + description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + partition: + description: 'The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + format: int32 + type: integer + pdName: + description: 'Unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: string + readOnly: + description: 'ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: boolean + required: + - pdName + type: object + gitRepo: + description: 'GitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod''s container.' + properties: + directory: + description: Target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name. + type: string + repository: + description: Repository URL + type: string + revision: + description: Commit hash for the specified revision. + type: string + required: + - repository + type: object + glusterfs: + description: 'Glusterfs represents a Glusterfs mount on the host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md' + properties: + endpoints: + description: 'EndpointsName is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + path: + description: 'Path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + readOnly: + description: 'ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: boolean + required: + - endpoints + - path + type: object + hostPath: + description: 'HostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath --- TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not mount host directories as read/write.' + properties: + path: + description: 'Path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + type: + description: 'Type for HostPath Volume Defaults to "" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + required: + - path + type: object + iscsi: + description: 'ISCSI represents an ISCSI Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' + properties: + chapAuthDiscovery: + description: whether support iSCSI Discovery CHAP authentication + type: boolean + chapAuthSession: + description: whether support iSCSI Session CHAP authentication + type: boolean + fsType: + description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + initiatorName: + description: Custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection. + type: string + iqn: + description: Target iSCSI Qualified Name. + type: string + iscsiInterface: + description: iSCSI Interface Name that uses an iSCSI transport. Defaults to 'default' (tcp). + type: string + lun: + description: iSCSI Target Lun number. + format: int32 + type: integer + portals: + description: iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). + items: + type: string + type: array + readOnly: + description: ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. + type: boolean + secretRef: + description: CHAP Secret for iSCSI target and initiator authentication + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + targetPortal: + description: iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + description: 'Volume''s name. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + nfs: + description: 'NFS represents an NFS mount on the host that shares a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + properties: + path: + description: 'Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + readOnly: + description: 'ReadOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: boolean + server: + description: 'Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + description: 'PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + properties: + claimName: + description: 'ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + type: string + readOnly: + description: Will force the ReadOnly setting in VolumeMounts. Default false. + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + description: PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + pdID: + description: ID that identifies Photon Controller persistent disk + type: string + required: + - pdID + type: object + portworxVolume: + description: PortworxVolume represents a portworx volume attached and mounted on kubelets host machine + properties: + fsType: + description: FSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + volumeID: + description: VolumeID uniquely identifies a Portworx volume + type: string + required: + - volumeID + type: object + projected: + description: Items for all in one resources secrets, configmaps, and downward API + properties: + defaultMode: + description: Mode bits to use on created files by default. Must be a value between 0 and 0777. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. + format: int32 + type: integer + sources: + description: list of volume projections + items: + description: Projection that may be projected along with other supported volume types + properties: + configMap: + description: information about the configMap data to project + properties: + items: + description: If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its keys must be defined + type: boolean + type: object + downwardAPI: + description: information about the downwardAPI data to project + properties: + items: + description: Items is a list of DownwardAPIVolume file + items: + description: DownwardAPIVolumeFile represents information to create the file containing the pod field + properties: + fieldRef: + description: 'Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.' + properties: + apiVersion: + description: Version of the schema the FieldPath is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified API version. + type: string + required: + - fieldPath + type: object + mode: + description: 'Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative path name of the file to be created. Must not be absolute or contain the ''..'' path. Must be utf-8 encoded. The first item of the relative path must not start with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + secret: + description: information about the secret data to project + properties: + items: + description: If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must be defined + type: boolean + type: object + serviceAccountToken: + description: information about the serviceAccountToken data to project + properties: + audience: + description: Audience is the intended audience of the token. A recipient of a token must identify itself with an identifier specified in the audience of the token, and otherwise should reject the token. The audience defaults to the identifier of the apiserver. + type: string + expirationSeconds: + description: ExpirationSeconds is the requested duration of validity of the service account token. As the token approaches expiration, the kubelet volume plugin will proactively rotate the service account token. The kubelet will start trying to rotate the token if the token is older than 80 percent of its time to live or if the token is older than 24 hours.Defaults to 1 hour and must be at least 10 minutes. + format: int64 + type: integer + path: + description: Path is the path relative to the mount point of the file to project the token into. + type: string + required: + - path + type: object + type: object + type: array + required: + - sources + type: object + quobyte: + description: Quobyte represents a Quobyte mount on the host that shares a pod's lifetime + properties: + group: + description: Group to map volume access to Default is no group + type: string + readOnly: + description: ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false. + type: boolean + registry: + description: Registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes + type: string + tenant: + description: Tenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin + type: string + user: + description: User to map volume access to Defaults to serivceaccount user + type: string + volume: + description: Volume is a string that references an already created Quobyte volume by name. + type: string + required: + - registry + - volume + type: object + rbd: + description: 'RBD represents a Rados Block Device mount on the host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md' + properties: + fsType: + description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + image: + description: 'The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + keyring: + description: 'Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + monitors: + description: 'A collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + items: + type: string + type: array + pool: + description: 'The rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + readOnly: + description: 'ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: boolean + secretRef: + description: 'SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + user: + description: 'The rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + required: + - image + - monitors + type: object + scaleIO: + description: ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Default is "xfs". + type: string + gateway: + description: The host address of the ScaleIO API Gateway. + type: string + protectionDomain: + description: The name of the ScaleIO Protection Domain for the configured storage. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + sslEnabled: + description: Flag to enable/disable SSL communication with Gateway, default false + type: boolean + storageMode: + description: Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned. + type: string + storagePool: + description: The ScaleIO Storage Pool associated with the protection domain. + type: string + system: + description: The name of the storage system as configured in ScaleIO. + type: string + volumeName: + description: The name of a volume already created in the ScaleIO system that is associated with this volume source. + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + description: 'Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + properties: + defaultMode: + description: 'Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + items: + description: If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + optional: + description: Specify whether the Secret or its keys must be defined + type: boolean + secretName: + description: 'Name of the secret in the pod''s namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + type: string + type: object + storageos: + description: StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + volumeName: + description: VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace. + type: string + volumeNamespace: + description: VolumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to "default" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created. + type: string + type: object + vsphereVolume: + description: VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + storagePolicyID: + description: Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. + type: string + storagePolicyName: + description: Storage Policy Based Management (SPBM) profile name. + type: string + volumePath: + description: Path that identifies vSphere volume vmdk + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + type: object tasks: + description: Tasks describes the children steps of serial or parallel node. Only used when Type is TypeSerial or TypeParallel. items: type: string type: array diff --git a/helm/chaos-mesh/crds/chaos-mesh.org_workflownodes.yaml b/helm/chaos-mesh/crds/chaos-mesh.org_workflownodes.yaml index 20e93f5dca..58a244ecb6 100644 --- a/helm/chaos-mesh/crds/chaos-mesh.org_workflownodes.yaml +++ b/helm/chaos-mesh/crds/chaos-mesh.org_workflownodes.yaml @@ -69,6 +69,17 @@ spec: - awsRegion - ec2Instance type: object + conditionalTasks: + items: + properties: + expression: + type: string + task: + type: string + required: + - task + type: object + type: array deadline: format: date-time type: string @@ -2827,6 +2838,18 @@ spec: - awsRegion - ec2Instance type: object + conditionalTasks: + description: ConditionalTasks describes the conditional branches of custom tasks. Only used when Type is TypeTask. + items: + properties: + expression: + type: string + task: + type: string + required: + - task + type: object + type: array dnsChaos: description: DNSChaosSpec defines the desired state of DNSChaos properties: @@ -4040,7 +4063,7 @@ spec: - selector type: object schedule: - description: ChaosOnlyScheduleSpec is very similar with ScheduleSpec, but it could not schedule Workflow because we could not resolve nested CRD now + description: Schedule describe the Schedule(describing scheduled chaos) to be injected with chaos nodes. Only used when Type is TypeSchedule. properties: awsChaos: description: AwsChaosSpec is the content of the specification for an AwsChaos @@ -5681,129 +5704,1648 @@ spec: - mode - selector type: object - tasks: - items: - type: string - type: array - templateType: - type: string - timeChaos: - description: TimeChaosSpec defines the desired state of TimeChaos + task: + description: Task describes the behavior of the custom task. Only used when Type is TypeTask. properties: - clockIds: - description: ClockIds defines all affected clock id All available options are ["CLOCK_REALTIME","CLOCK_MONOTONIC","CLOCK_PROCESS_CPUTIME_ID","CLOCK_THREAD_CPUTIME_ID", "CLOCK_MONOTONIC_RAW","CLOCK_REALTIME_COARSE","CLOCK_MONOTONIC_COARSE","CLOCK_BOOTTIME","CLOCK_REALTIME_ALARM", "CLOCK_BOOTTIME_ALARM"] Default value is ["CLOCK_REALTIME"] - items: - type: string - type: array - containerNames: - description: ContainerNames indicates list of the name of affected container. If not set, all containers will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of the chaos action - type: string - mode: - description: 'Mode defines the mode to run chaos action. Supported mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - selector: - description: Selector is used to select pods that are used to inject chaos action. + container: + description: Container is the main container image to run in the pod properties: - annotationSelectors: - additionalProperties: + args: + description: '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. 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. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: type: string - description: Map of string keys and values that can be used to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that can be used to select objects. A list of selectors based on set-based label expressions. + type: array + command: + description: '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. 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. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + type: string + type: array + env: + description: List of environment variables to set in the container. Cannot be updated. + items: + description: EnvVar represents an environment variable present in a Container. properties: - key: - description: key is the label key that the selector applies to. + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. + value: + description: '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 "".' type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: '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.' + properties: + containerName: + description: 'Container name: required for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must be defined + type: boolean + required: + - key + type: object + type: object required: - - key - - operator + - name type: object type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which objects belong. + envFrom: + description: 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. items: - type: string + description: EnvFromSource represents the source of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object + type: object type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to select nodes. Selector which must match a node's labels, and objects must belong to these selected nodes. + image: + description: '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.' + type: string + imagePullPolicy: + description: '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' + type: string + lifecycle: + description: Actions that the management system should take in response to container lifecycle events. Cannot be updated. + properties: + postStart: + description: 'PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following should be specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + description: 'PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The reason for termination is passed to the handler. The Pod''s termination grace period countdown begins before the PreStop hooked is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod''s termination grace period. Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following should be specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object type: object - nodes: - description: Nodes is a set of node name and objects must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition of a pod at the current time. supported value: Pending / Running / Succeeded / Failed / Unknown' + livenessProbe: + description: 'Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following should be specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: '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' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: 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. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: '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' + format: int32 + type: integer + type: object + name: + description: Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. + type: string + ports: + description: 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. items: - type: string + description: ContainerPort represents a network port in a single container. + properties: + containerPort: + description: Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. + format: int32 + type: integer + hostIP: + description: What host IP to bind the external port to. + type: string + hostPort: + description: Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. + format: int32 + type: integer + name: + description: If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services. + type: string + protocol: + default: TCP + description: Protocol for port. Must be UDP, TCP, or SCTP. Defaults to "TCP". + type: string + required: + - containerPort + type: object type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values that used to select pods. The key defines the namespace which pods belong, and the each values is a set of pod names. + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + description: 'Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following should be specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: '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' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: 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. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: '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' + format: int32 + type: integer type: object - type: object - timeOffset: - description: TimeOffset defines the delta time of injected program. It's a possibly signed sequence of decimal numbers, such as "300ms", "-1.5h" or "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". - type: string - value: - description: Value is required when the mode is set to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. If `FixedPodMode`, provide an integer of pods to do chaos action. If `FixedPercentPodMod`, provide a number from 0-100 to specify the percent of pods the server can do chaos action. IF `RandomMaxPercentPodMod`, provide a number from 0-100 to specify the max percent of pods to do chaos action - type: string - required: - - mode - - selector - - timeOffset - type: object - required: - - name - - templateType - type: object - type: array - required: - - entry - - templates - type: object - required: - - schedule - - type - type: object - startTime: + resources: + description: 'Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: '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-compute-resources-container/' + type: object + type: object + securityContext: + description: 'Security options the pod should run with. More info: https://kubernetes.io/docs/concepts/policy/security-context/ More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/' + properties: + allowPrivilegeEscalation: + description: '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' + type: boolean + capabilities: + description: The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. + type: boolean + procMount: + description: 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. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only root filesystem. Default is false. + type: boolean + runAsGroup: + description: 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. + format: int64 + type: integer + runAsNonRoot: + description: 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. + type: boolean + runAsUser: + description: 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. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + properties: + level: + description: Level is SELinux level label that applies to the container. + type: string + role: + description: Role is a SELinux role label that applies to the container. + type: string + type: + description: Type is a SELinux type label that applies to the container. + type: string + user: + description: User is a SELinux user label that applies to the container. + type: string + type: object + windowsOptions: + description: The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + properties: + gmsaCredentialSpec: + description: 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. This field is alpha-level and is only honored by servers that enable the WindowsGMSA feature flag. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the GMSA credential spec to use. This field is alpha-level and is only honored by servers that enable the WindowsGMSA feature flag. + type: string + runAsUserName: + description: 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. This field is beta-level and may be disabled with the WindowsRunAsUserName feature flag. + type: string + type: object + type: object + startupProbe: + description: 'StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod''s lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. This is an alpha feature enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following should be specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: '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' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: 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. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: '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' + format: int32 + type: integer + type: object + stdin: + description: 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. + type: boolean + stdinOnce: + description: 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 + type: boolean + terminationMessagePath: + description: '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.' + type: string + terminationMessagePolicy: + description: 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. + type: string + tty: + description: Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false. + type: boolean + volumeDevices: + description: volumeDevices is the list of block devices to be used by the container. This is a beta feature. + items: + description: volumeDevice describes a mapping of a raw block device within a container. + properties: + devicePath: + description: devicePath is the path inside of the container that the device will be mapped to. + type: string + name: + description: name must match the name of a persistentVolumeClaim in the pod + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + description: Pod volumes to mount into the container's filesystem. Cannot be updated. + items: + description: VolumeMount describes a mounting of a Volume within a container. + properties: + mountPath: + description: Path within the container at which the volume should be mounted. Must not contain ':'. + type: string + mountPropagation: + description: 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. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. + type: boolean + subPath: + description: Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). + type: string + subPathExpr: + description: 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. + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: 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. + type: string + required: + - name + type: object + volumes: + description: Volumes is a list of volumes that can be mounted by containers in a template. + items: + description: Volume represents a named volume in a pod that may be accessed by any container in the pod. + properties: + awsElasticBlockStore: + description: 'AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + properties: + fsType: + description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + partition: + description: 'The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty).' + format: int32 + type: integer + readOnly: + description: 'Specify "true" to force and set the ReadOnly property in VolumeMounts to "true". If omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: boolean + volumeID: + description: 'Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: string + required: + - volumeID + type: object + azureDisk: + description: AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. + properties: + cachingMode: + description: 'Host Caching mode: None, Read Only, Read Write.' + type: string + diskName: + description: The Name of the data disk in the blob storage + type: string + diskURI: + description: The URI the data disk in the blob storage + type: string + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + kind: + description: 'Expected values Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared' + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + description: AzureFile represents an Azure File Service mount on the host and bind mount to the pod. + properties: + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretName: + description: the name of secret that contains Azure Storage Account Name and Key + type: string + shareName: + description: Share Name + type: string + required: + - secretName + - shareName + type: object + cephfs: + description: CephFS represents a Ceph FS mount on the host that shares a pod's lifetime + properties: + monitors: + description: 'Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + items: + type: string + type: array + path: + description: 'Optional: Used as the mounted root, rather than the full Ceph tree, default is /' + type: string + readOnly: + description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: boolean + secretFile: + description: 'Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + secretRef: + description: 'Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + user: + description: 'Optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + required: + - monitors + type: object + cinder: + description: 'Cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + properties: + fsType: + description: 'Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + readOnly: + description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: boolean + secretRef: + description: 'Optional: points to a secret object containing parameters used to connect to OpenStack.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + volumeID: + description: 'volume id used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + required: + - volumeID + type: object + configMap: + description: ConfigMap represents a configMap that should populate this volume + properties: + defaultMode: + description: 'Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + items: + description: If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its keys must be defined + type: boolean + type: object + csi: + description: CSI (Container Storage Interface) represents storage that is handled by an external CSI driver (Alpha feature). + properties: + driver: + description: Driver is the name of the CSI driver that handles this volume. Consult with your admin for the correct name as registered in the cluster. + type: string + fsType: + description: Filesystem type to mount. Ex. "ext4", "xfs", "ntfs". If not provided, the empty value is passed to the associated CSI driver which will determine the default filesystem to apply. + type: string + nodePublishSecretRef: + description: NodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secret references are passed. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + readOnly: + description: Specifies a read-only configuration for the volume. Defaults to false (read/write). + type: boolean + volumeAttributes: + additionalProperties: + type: string + description: VolumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values. + type: object + required: + - driver + type: object + downwardAPI: + description: DownwardAPI represents downward API about the pod that should populate this volume + properties: + defaultMode: + description: 'Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + items: + description: Items is a list of downward API volume file + items: + description: DownwardAPIVolumeFile represents information to create the file containing the pod field + properties: + fieldRef: + description: 'Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.' + properties: + apiVersion: + description: Version of the schema the FieldPath is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified API version. + type: string + required: + - fieldPath + type: object + mode: + description: 'Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative path name of the file to be created. Must not be absolute or contain the ''..'' path. Must be utf-8 encoded. The first item of the relative path must not start with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + emptyDir: + description: 'EmptyDir represents a temporary directory that shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + properties: + medium: + description: 'What type of storage medium should back this directory. The default is "" which means to use the node''s default medium. Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + description: 'Total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir' + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + fc: + description: FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. + properties: + fsType: + description: 'Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + lun: + description: 'Optional: FC target lun number' + format: int32 + type: integer + readOnly: + description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.' + type: boolean + targetWWNs: + description: 'Optional: FC target worldwide names (WWNs)' + items: + type: string + type: array + wwids: + description: 'Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously.' + items: + type: string + type: array + type: object + flexVolume: + description: FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. + properties: + driver: + description: Driver is the name of the driver to use for this volume. + type: string + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script. + type: string + options: + additionalProperties: + type: string + description: 'Optional: Extra command options if any.' + type: object + readOnly: + description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.' + type: boolean + secretRef: + description: 'Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - driver + type: object + flocker: + description: Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running + properties: + datasetName: + description: Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated + type: string + datasetUUID: + description: UUID of the dataset. This is unique identifier of a Flocker dataset + type: string + type: object + gcePersistentDisk: + description: 'GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + properties: + fsType: + description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + partition: + description: 'The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + format: int32 + type: integer + pdName: + description: 'Unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: string + readOnly: + description: 'ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: boolean + required: + - pdName + type: object + gitRepo: + description: 'GitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod''s container.' + properties: + directory: + description: Target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name. + type: string + repository: + description: Repository URL + type: string + revision: + description: Commit hash for the specified revision. + type: string + required: + - repository + type: object + glusterfs: + description: 'Glusterfs represents a Glusterfs mount on the host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md' + properties: + endpoints: + description: 'EndpointsName is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + path: + description: 'Path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + readOnly: + description: 'ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: boolean + required: + - endpoints + - path + type: object + hostPath: + description: 'HostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath --- TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not mount host directories as read/write.' + properties: + path: + description: 'Path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + type: + description: 'Type for HostPath Volume Defaults to "" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + required: + - path + type: object + iscsi: + description: 'ISCSI represents an ISCSI Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' + properties: + chapAuthDiscovery: + description: whether support iSCSI Discovery CHAP authentication + type: boolean + chapAuthSession: + description: whether support iSCSI Session CHAP authentication + type: boolean + fsType: + description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + initiatorName: + description: Custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection. + type: string + iqn: + description: Target iSCSI Qualified Name. + type: string + iscsiInterface: + description: iSCSI Interface Name that uses an iSCSI transport. Defaults to 'default' (tcp). + type: string + lun: + description: iSCSI Target Lun number. + format: int32 + type: integer + portals: + description: iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). + items: + type: string + type: array + readOnly: + description: ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. + type: boolean + secretRef: + description: CHAP Secret for iSCSI target and initiator authentication + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + targetPortal: + description: iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + description: 'Volume''s name. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + nfs: + description: 'NFS represents an NFS mount on the host that shares a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + properties: + path: + description: 'Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + readOnly: + description: 'ReadOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: boolean + server: + description: 'Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + description: 'PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + properties: + claimName: + description: 'ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + type: string + readOnly: + description: Will force the ReadOnly setting in VolumeMounts. Default false. + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + description: PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + pdID: + description: ID that identifies Photon Controller persistent disk + type: string + required: + - pdID + type: object + portworxVolume: + description: PortworxVolume represents a portworx volume attached and mounted on kubelets host machine + properties: + fsType: + description: FSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + volumeID: + description: VolumeID uniquely identifies a Portworx volume + type: string + required: + - volumeID + type: object + projected: + description: Items for all in one resources secrets, configmaps, and downward API + properties: + defaultMode: + description: Mode bits to use on created files by default. Must be a value between 0 and 0777. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. + format: int32 + type: integer + sources: + description: list of volume projections + items: + description: Projection that may be projected along with other supported volume types + properties: + configMap: + description: information about the configMap data to project + properties: + items: + description: If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its keys must be defined + type: boolean + type: object + downwardAPI: + description: information about the downwardAPI data to project + properties: + items: + description: Items is a list of DownwardAPIVolume file + items: + description: DownwardAPIVolumeFile represents information to create the file containing the pod field + properties: + fieldRef: + description: 'Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.' + properties: + apiVersion: + description: Version of the schema the FieldPath is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified API version. + type: string + required: + - fieldPath + type: object + mode: + description: 'Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative path name of the file to be created. Must not be absolute or contain the ''..'' path. Must be utf-8 encoded. The first item of the relative path must not start with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + secret: + description: information about the secret data to project + properties: + items: + description: If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must be defined + type: boolean + type: object + serviceAccountToken: + description: information about the serviceAccountToken data to project + properties: + audience: + description: Audience is the intended audience of the token. A recipient of a token must identify itself with an identifier specified in the audience of the token, and otherwise should reject the token. The audience defaults to the identifier of the apiserver. + type: string + expirationSeconds: + description: ExpirationSeconds is the requested duration of validity of the service account token. As the token approaches expiration, the kubelet volume plugin will proactively rotate the service account token. The kubelet will start trying to rotate the token if the token is older than 80 percent of its time to live or if the token is older than 24 hours.Defaults to 1 hour and must be at least 10 minutes. + format: int64 + type: integer + path: + description: Path is the path relative to the mount point of the file to project the token into. + type: string + required: + - path + type: object + type: object + type: array + required: + - sources + type: object + quobyte: + description: Quobyte represents a Quobyte mount on the host that shares a pod's lifetime + properties: + group: + description: Group to map volume access to Default is no group + type: string + readOnly: + description: ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false. + type: boolean + registry: + description: Registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes + type: string + tenant: + description: Tenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin + type: string + user: + description: User to map volume access to Defaults to serivceaccount user + type: string + volume: + description: Volume is a string that references an already created Quobyte volume by name. + type: string + required: + - registry + - volume + type: object + rbd: + description: 'RBD represents a Rados Block Device mount on the host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md' + properties: + fsType: + description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + image: + description: 'The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + keyring: + description: 'Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + monitors: + description: 'A collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + items: + type: string + type: array + pool: + description: 'The rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + readOnly: + description: 'ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: boolean + secretRef: + description: 'SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + user: + description: 'The rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + required: + - image + - monitors + type: object + scaleIO: + description: ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Default is "xfs". + type: string + gateway: + description: The host address of the ScaleIO API Gateway. + type: string + protectionDomain: + description: The name of the ScaleIO Protection Domain for the configured storage. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + sslEnabled: + description: Flag to enable/disable SSL communication with Gateway, default false + type: boolean + storageMode: + description: Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned. + type: string + storagePool: + description: The ScaleIO Storage Pool associated with the protection domain. + type: string + system: + description: The name of the storage system as configured in ScaleIO. + type: string + volumeName: + description: The name of a volume already created in the ScaleIO system that is associated with this volume source. + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + description: 'Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + properties: + defaultMode: + description: 'Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + items: + description: If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + optional: + description: Specify whether the Secret or its keys must be defined + type: boolean + secretName: + description: 'Name of the secret in the pod''s namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + type: string + type: object + storageos: + description: StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + volumeName: + description: VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace. + type: string + volumeNamespace: + description: VolumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to "default" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created. + type: string + type: object + vsphereVolume: + description: VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + storagePolicyID: + description: Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. + type: string + storagePolicyName: + description: Storage Policy Based Management (SPBM) profile name. + type: string + volumePath: + description: Path that identifies vSphere volume vmdk + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + type: object + tasks: + description: Tasks describes the children steps of serial or parallel node. Only used when Type is TypeSerial or TypeParallel. + items: + type: string + type: array + templateType: + type: string + timeChaos: + description: TimeChaosSpec defines the desired state of TimeChaos + properties: + clockIds: + description: ClockIds defines all affected clock id All available options are ["CLOCK_REALTIME","CLOCK_MONOTONIC","CLOCK_PROCESS_CPUTIME_ID","CLOCK_THREAD_CPUTIME_ID", "CLOCK_MONOTONIC_RAW","CLOCK_REALTIME_COARSE","CLOCK_MONOTONIC_COARSE","CLOCK_BOOTTIME","CLOCK_REALTIME_ALARM", "CLOCK_BOOTTIME_ALARM"] Default value is ["CLOCK_REALTIME"] + items: + type: string + type: array + containerNames: + description: ContainerNames indicates list of the name of affected container. If not set, all containers will be injected + items: + type: string + type: array + duration: + description: Duration represents the duration of the chaos action + type: string + mode: + description: 'Mode defines the mode to run chaos action. Supported mode: one / all / fixed / fixed-percent / random-max-percent' + enum: + - one + - all + - fixed + - fixed-percent + - random-max-percent + type: string + selector: + description: Selector is used to select pods that are used to inject chaos action. + properties: + annotationSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can be used to select objects. A selector based on annotations. + type: object + expressionSelectors: + description: a slice of label selector expressions that can be used to select objects. A list of selectors based on set-based label expressions. + items: + description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + properties: + key: + description: key is the label key that the selector applies to. + type: string + operator: + description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + fieldSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can be used to select objects. A selector based on fields. + type: object + labelSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can be used to select objects. A selector based on labels. + type: object + namespaces: + description: Namespaces is a set of namespace to which objects belong. + items: + type: string + type: array + nodeSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can be used to select nodes. Selector which must match a node's labels, and objects must belong to these selected nodes. + type: object + nodes: + description: Nodes is a set of node name and objects must belong to these nodes. + items: + type: string + type: array + podPhaseSelectors: + description: 'PodPhaseSelectors is a set of condition of a pod at the current time. supported value: Pending / Running / Succeeded / Failed / Unknown' + items: + type: string + type: array + pods: + additionalProperties: + items: + type: string + type: array + description: Pods is a map of string keys and a set values that used to select pods. The key defines the namespace which pods belong, and the each values is a set of pod names. + type: object + type: object + timeOffset: + description: TimeOffset defines the delta time of injected program. It's a possibly signed sequence of decimal numbers, such as "300ms", "-1.5h" or "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". + type: string + value: + description: Value is required when the mode is set to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. If `FixedPodMode`, provide an integer of pods to do chaos action. If `FixedPercentPodMod`, provide a number from 0-100 to specify the percent of pods the server can do chaos action. IF `RandomMaxPercentPodMod`, provide a number from 0-100 to specify the max percent of pods to do chaos action + type: string + required: + - mode + - selector + - timeOffset + type: object + required: + - name + - templateType + type: object + type: array + required: + - entry + - templates + type: object + required: + - schedule + - type + type: object + startTime: format: date-time type: string stressChaos: @@ -5834,112 +7376,1629 @@ spec: type: string description: Map of string keys and values that can be used to select objects. A selector based on annotations. type: object - expressionSelectors: - description: a slice of label selector expressions that can be used to select objects. A list of selectors based on set-based label expressions. + expressionSelectors: + description: a slice of label selector expressions that can be used to select objects. A list of selectors based on set-based label expressions. + items: + description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + properties: + key: + description: key is the label key that the selector applies to. + type: string + operator: + description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + fieldSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can be used to select objects. A selector based on fields. + type: object + labelSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can be used to select objects. A selector based on labels. + type: object + namespaces: + description: Namespaces is a set of namespace to which objects belong. + items: + type: string + type: array + nodeSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can be used to select nodes. Selector which must match a node's labels, and objects must belong to these selected nodes. + type: object + nodes: + description: Nodes is a set of node name and objects must belong to these nodes. + items: + type: string + type: array + podPhaseSelectors: + description: 'PodPhaseSelectors is a set of condition of a pod at the current time. supported value: Pending / Running / Succeeded / Failed / Unknown' + items: + type: string + type: array + pods: + additionalProperties: + items: + type: string + type: array + description: Pods is a map of string keys and a set values that used to select pods. The key defines the namespace which pods belong, and the each values is a set of pod names. + type: object + type: object + stressngStressors: + description: StressngStressors defines plenty of stressors just like `Stressors` except that it's an experimental feature and more powerful. You can define stressors in `stress-ng` (see also `man stress-ng`) dialect, however not all of the supported stressors are well tested. It maybe retired in later releases. You should always use `Stressors` to define the stressors and use this only when you want more stressors unsupported by `Stressors`. When both `StressngStressors` and `Stressors` are defined, `StressngStressors` wins. + type: string + stressors: + description: Stressors defines plenty of stressors supported to stress system components out. You can use one or more of them to make up various kinds of stresses. At least one of the stressors should be specified. + properties: + cpu: + description: CPUStressor stresses CPU out + properties: + load: + description: Load specifies P percent loading per CPU worker. 0 is effectively a sleep (no load) and 100 is full loading. + type: integer + options: + description: extend stress-ng options + items: + type: string + type: array + workers: + description: Workers specifies N workers to apply the stressor. + type: integer + required: + - workers + type: object + memory: + description: MemoryStressor stresses virtual memory out + properties: + options: + description: extend stress-ng options + items: + type: string + type: array + size: + description: Size specifies N bytes consumed per vm worker, default is the total available memory. One can specify the size as % of total available memory or in units of B, KB/KiB, MB/MiB, GB/GiB, TB/TiB. + type: string + workers: + description: Workers specifies N workers to apply the stressor. + type: integer + required: + - workers + type: object + type: object + value: + description: Value is required when the mode is set to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. If `FixedPodMode`, provide an integer of pods to do chaos action. If `FixedPercentPodMod`, provide a number from 0-100 to specify the percent of pods the server can do chaos action. IF `RandomMaxPercentPodMod`, provide a number from 0-100 to specify the max percent of pods to do chaos action + type: string + required: + - mode + - selector + type: object + task: + properties: + container: + description: Container is the main container image to run in the pod + properties: + args: + description: '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. 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. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + command: + description: '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. 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. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + env: + description: List of environment variables to set in the container. Cannot be updated. + items: + description: EnvVar represents an environment variable present in a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: '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 "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: '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.' + properties: + containerName: + description: 'Container name: required for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + description: 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. + items: + description: EnvFromSource represents the source of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object + type: object + type: array + image: + description: '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.' + type: string + imagePullPolicy: + description: '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' + type: string + lifecycle: + description: Actions that the management system should take in response to container lifecycle events. Cannot be updated. + properties: + postStart: + description: 'PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following should be specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + description: 'PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The reason for termination is passed to the handler. The Pod''s termination grace period countdown begins before the PreStop hooked is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod''s termination grace period. Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following should be specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + description: 'Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following should be specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: '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' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: 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. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: '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' + format: int32 + type: integer + type: object + name: + description: Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. + type: string + ports: + description: 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. items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + description: ContainerPort represents a network port in a single container. + properties: + containerPort: + description: Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. + format: int32 + type: integer + hostIP: + description: What host IP to bind the external port to. + type: string + hostPort: + description: Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. + format: int32 + type: integer + name: + description: If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services. + type: string + protocol: + default: TCP + description: Protocol for port. Must be UDP, TCP, or SCTP. Defaults to "TCP". + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + description: 'Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following should be specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: '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' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: 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. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: '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' + format: int32 + type: integer + type: object + resources: + description: 'Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: '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-compute-resources-container/' + type: object + type: object + securityContext: + description: 'Security options the pod should run with. More info: https://kubernetes.io/docs/concepts/policy/security-context/ More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/' + properties: + allowPrivilegeEscalation: + description: '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' + type: boolean + capabilities: + description: The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. + type: boolean + procMount: + description: 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. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only root filesystem. Default is false. + type: boolean + runAsGroup: + description: 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. + format: int64 + type: integer + runAsNonRoot: + description: 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. + type: boolean + runAsUser: + description: 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. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + properties: + level: + description: Level is SELinux level label that applies to the container. + type: string + role: + description: Role is a SELinux role label that applies to the container. + type: string + type: + description: Type is a SELinux type label that applies to the container. + type: string + user: + description: User is a SELinux user label that applies to the container. + type: string + type: object + windowsOptions: + description: The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + properties: + gmsaCredentialSpec: + description: 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. This field is alpha-level and is only honored by servers that enable the WindowsGMSA feature flag. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the GMSA credential spec to use. This field is alpha-level and is only honored by servers that enable the WindowsGMSA feature flag. + type: string + runAsUserName: + description: 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. This field is beta-level and may be disabled with the WindowsRunAsUserName feature flag. + type: string + type: object + type: object + startupProbe: + description: 'StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod''s lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. This is an alpha feature enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following should be specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: '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' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: 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. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: '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' + format: int32 + type: integer + type: object + stdin: + description: 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. + type: boolean + stdinOnce: + description: 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 + type: boolean + terminationMessagePath: + description: '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.' + type: string + terminationMessagePolicy: + description: 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. + type: string + tty: + description: Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false. + type: boolean + volumeDevices: + description: volumeDevices is the list of block devices to be used by the container. This is a beta feature. + items: + description: volumeDevice describes a mapping of a raw block device within a container. + properties: + devicePath: + description: devicePath is the path inside of the container that the device will be mapped to. + type: string + name: + description: name must match the name of a persistentVolumeClaim in the pod + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + description: Pod volumes to mount into the container's filesystem. Cannot be updated. + items: + description: VolumeMount describes a mounting of a Volume within a container. + properties: + mountPath: + description: Path within the container at which the volume should be mounted. Must not contain ':'. + type: string + mountPropagation: + description: 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. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. + type: boolean + subPath: + description: Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). + type: string + subPathExpr: + description: 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. + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: 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. + type: string + required: + - name + type: object + volumes: + description: Volumes is a list of volumes that can be mounted by containers in a template. + items: + description: Volume represents a named volume in a pod that may be accessed by any container in the pod. + properties: + awsElasticBlockStore: + description: 'AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + properties: + fsType: + description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + partition: + description: 'The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty).' + format: int32 + type: integer + readOnly: + description: 'Specify "true" to force and set the ReadOnly property in VolumeMounts to "true". If omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: boolean + volumeID: + description: 'Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: string + required: + - volumeID + type: object + azureDisk: + description: AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. + properties: + cachingMode: + description: 'Host Caching mode: None, Read Only, Read Write.' + type: string + diskName: + description: The Name of the data disk in the blob storage + type: string + diskURI: + description: The URI the data disk in the blob storage + type: string + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + kind: + description: 'Expected values Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared' + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + description: AzureFile represents an Azure File Service mount on the host and bind mount to the pod. + properties: + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretName: + description: the name of secret that contains Azure Storage Account Name and Key + type: string + shareName: + description: Share Name + type: string + required: + - secretName + - shareName + type: object + cephfs: + description: CephFS represents a Ceph FS mount on the host that shares a pod's lifetime + properties: + monitors: + description: 'Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + items: + type: string + type: array + path: + description: 'Optional: Used as the mounted root, rather than the full Ceph tree, default is /' + type: string + readOnly: + description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: boolean + secretFile: + description: 'Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + secretRef: + description: 'Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + user: + description: 'Optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + required: + - monitors + type: object + cinder: + description: 'Cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + properties: + fsType: + description: 'Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + readOnly: + description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: boolean + secretRef: + description: 'Optional: points to a secret object containing parameters used to connect to OpenStack.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + volumeID: + description: 'volume id used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + required: + - volumeID + type: object + configMap: + description: ConfigMap represents a configMap that should populate this volume + properties: + defaultMode: + description: 'Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + items: + description: If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its keys must be defined + type: boolean + type: object + csi: + description: CSI (Container Storage Interface) represents storage that is handled by an external CSI driver (Alpha feature). + properties: + driver: + description: Driver is the name of the CSI driver that handles this volume. Consult with your admin for the correct name as registered in the cluster. + type: string + fsType: + description: Filesystem type to mount. Ex. "ext4", "xfs", "ntfs". If not provided, the empty value is passed to the associated CSI driver which will determine the default filesystem to apply. + type: string + nodePublishSecretRef: + description: NodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secret references are passed. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + readOnly: + description: Specifies a read-only configuration for the volume. Defaults to false (read/write). + type: boolean + volumeAttributes: + additionalProperties: + type: string + description: VolumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values. + type: object + required: + - driver + type: object + downwardAPI: + description: DownwardAPI represents downward API about the pod that should populate this volume + properties: + defaultMode: + description: 'Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + items: + description: Items is a list of downward API volume file + items: + description: DownwardAPIVolumeFile represents information to create the file containing the pod field + properties: + fieldRef: + description: 'Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.' + properties: + apiVersion: + description: Version of the schema the FieldPath is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified API version. + type: string + required: + - fieldPath + type: object + mode: + description: 'Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative path name of the file to be created. Must not be absolute or contain the ''..'' path. Must be utf-8 encoded. The first item of the relative path must not start with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + emptyDir: + description: 'EmptyDir represents a temporary directory that shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + properties: + medium: + description: 'What type of storage medium should back this directory. The default is "" which means to use the node''s default medium. Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + description: 'Total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir' + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + fc: + description: FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. + properties: + fsType: + description: 'Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + lun: + description: 'Optional: FC target lun number' + format: int32 + type: integer + readOnly: + description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.' + type: boolean + targetWWNs: + description: 'Optional: FC target worldwide names (WWNs)' + items: + type: string + type: array + wwids: + description: 'Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously.' + items: + type: string + type: array + type: object + flexVolume: + description: FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. + properties: + driver: + description: Driver is the name of the driver to use for this volume. + type: string + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script. + type: string + options: + additionalProperties: + type: string + description: 'Optional: Extra command options if any.' + type: object + readOnly: + description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.' + type: boolean + secretRef: + description: 'Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - driver + type: object + flocker: + description: Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running properties: - key: - description: key is the label key that the selector applies to. + datasetName: + description: Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. + datasetUUID: + description: UUID of the dataset. This is unique identifier of a Flocker dataset type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. + type: object + gcePersistentDisk: + description: 'GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + properties: + fsType: + description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + partition: + description: 'The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + format: int32 + type: integer + pdName: + description: 'Unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: string + readOnly: + description: 'ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: boolean + required: + - pdName + type: object + gitRepo: + description: 'GitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod''s container.' + properties: + directory: + description: Target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name. + type: string + repository: + description: Repository URL + type: string + revision: + description: Commit hash for the specified revision. + type: string + required: + - repository + type: object + glusterfs: + description: 'Glusterfs represents a Glusterfs mount on the host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md' + properties: + endpoints: + description: 'EndpointsName is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + path: + description: 'Path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + readOnly: + description: 'ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: boolean + required: + - endpoints + - path + type: object + hostPath: + description: 'HostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath --- TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not mount host directories as read/write.' + properties: + path: + description: 'Path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + type: + description: 'Type for HostPath Volume Defaults to "" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + required: + - path + type: object + iscsi: + description: 'ISCSI represents an ISCSI Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' + properties: + chapAuthDiscovery: + description: whether support iSCSI Discovery CHAP authentication + type: boolean + chapAuthSession: + description: whether support iSCSI Session CHAP authentication + type: boolean + fsType: + description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + initiatorName: + description: Custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection. + type: string + iqn: + description: Target iSCSI Qualified Name. + type: string + iscsiInterface: + description: iSCSI Interface Name that uses an iSCSI transport. Defaults to 'default' (tcp). + type: string + lun: + description: iSCSI Target Lun number. + format: int32 + type: integer + portals: + description: iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). items: type: string type: array + readOnly: + description: ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. + type: boolean + secretRef: + description: CHAP Secret for iSCSI target and initiator authentication + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + targetPortal: + description: iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). + type: string required: - - key - - operator + - iqn + - lun + - targetPortal type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to select nodes. Selector which must match a node's labels, and objects must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition of a pod at the current time. supported value: Pending / Running / Succeeded / Failed / Unknown' - items: + name: + description: 'Volume''s name. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values that used to select pods. The key defines the namespace which pods belong, and the each values is a set of pod names. - type: object - type: object - stressngStressors: - description: StressngStressors defines plenty of stressors just like `Stressors` except that it's an experimental feature and more powerful. You can define stressors in `stress-ng` (see also `man stress-ng`) dialect, however not all of the supported stressors are well tested. It maybe retired in later releases. You should always use `Stressors` to define the stressors and use this only when you want more stressors unsupported by `Stressors`. When both `StressngStressors` and `Stressors` are defined, `StressngStressors` wins. - type: string - stressors: - description: Stressors defines plenty of stressors supported to stress system components out. You can use one or more of them to make up various kinds of stresses. At least one of the stressors should be specified. - properties: - cpu: - description: CPUStressor stresses CPU out - properties: - load: - description: Load specifies P percent loading per CPU worker. 0 is effectively a sleep (no load) and 100 is full loading. - type: integer - options: - description: extend stress-ng options - items: + nfs: + description: 'NFS represents an NFS mount on the host that shares a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + properties: + path: + description: 'Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' type: string - type: array - workers: - description: Workers specifies N workers to apply the stressor. - type: integer - required: - - workers - type: object - memory: - description: MemoryStressor stresses virtual memory out - properties: - options: - description: extend stress-ng options + readOnly: + description: 'ReadOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: boolean + server: + description: 'Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + description: 'PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + properties: + claimName: + description: 'ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + type: string + readOnly: + description: Will force the ReadOnly setting in VolumeMounts. Default false. + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + description: PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + pdID: + description: ID that identifies Photon Controller persistent disk + type: string + required: + - pdID + type: object + portworxVolume: + description: PortworxVolume represents a portworx volume attached and mounted on kubelets host machine + properties: + fsType: + description: FSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + volumeID: + description: VolumeID uniquely identifies a Portworx volume + type: string + required: + - volumeID + type: object + projected: + description: Items for all in one resources secrets, configmaps, and downward API + properties: + defaultMode: + description: Mode bits to use on created files by default. Must be a value between 0 and 0777. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. + format: int32 + type: integer + sources: + description: list of volume projections + items: + description: Projection that may be projected along with other supported volume types + properties: + configMap: + description: information about the configMap data to project + properties: + items: + description: If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its keys must be defined + type: boolean + type: object + downwardAPI: + description: information about the downwardAPI data to project + properties: + items: + description: Items is a list of DownwardAPIVolume file + items: + description: DownwardAPIVolumeFile represents information to create the file containing the pod field + properties: + fieldRef: + description: 'Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.' + properties: + apiVersion: + description: Version of the schema the FieldPath is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified API version. + type: string + required: + - fieldPath + type: object + mode: + description: 'Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative path name of the file to be created. Must not be absolute or contain the ''..'' path. Must be utf-8 encoded. The first item of the relative path must not start with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + secret: + description: information about the secret data to project + properties: + items: + description: If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must be defined + type: boolean + type: object + serviceAccountToken: + description: information about the serviceAccountToken data to project + properties: + audience: + description: Audience is the intended audience of the token. A recipient of a token must identify itself with an identifier specified in the audience of the token, and otherwise should reject the token. The audience defaults to the identifier of the apiserver. + type: string + expirationSeconds: + description: ExpirationSeconds is the requested duration of validity of the service account token. As the token approaches expiration, the kubelet volume plugin will proactively rotate the service account token. The kubelet will start trying to rotate the token if the token is older than 80 percent of its time to live or if the token is older than 24 hours.Defaults to 1 hour and must be at least 10 minutes. + format: int64 + type: integer + path: + description: Path is the path relative to the mount point of the file to project the token into. + type: string + required: + - path + type: object + type: object + type: array + required: + - sources + type: object + quobyte: + description: Quobyte represents a Quobyte mount on the host that shares a pod's lifetime + properties: + group: + description: Group to map volume access to Default is no group + type: string + readOnly: + description: ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false. + type: boolean + registry: + description: Registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes + type: string + tenant: + description: Tenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin + type: string + user: + description: User to map volume access to Defaults to serivceaccount user + type: string + volume: + description: Volume is a string that references an already created Quobyte volume by name. + type: string + required: + - registry + - volume + type: object + rbd: + description: 'RBD represents a Rados Block Device mount on the host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md' + properties: + fsType: + description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + image: + description: 'The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + keyring: + description: 'Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + monitors: + description: 'A collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + items: + type: string + type: array + pool: + description: 'The rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + readOnly: + description: 'ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: boolean + secretRef: + description: 'SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + user: + description: 'The rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + required: + - image + - monitors + type: object + scaleIO: + description: ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Default is "xfs". + type: string + gateway: + description: The host address of the ScaleIO API Gateway. + type: string + protectionDomain: + description: The name of the ScaleIO Protection Domain for the configured storage. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + sslEnabled: + description: Flag to enable/disable SSL communication with Gateway, default false + type: boolean + storageMode: + description: Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned. + type: string + storagePool: + description: The ScaleIO Storage Pool associated with the protection domain. + type: string + system: + description: The name of the storage system as configured in ScaleIO. + type: string + volumeName: + description: The name of a volume already created in the ScaleIO system that is associated with this volume source. + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + description: 'Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + properties: + defaultMode: + description: 'Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer items: + description: If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + optional: + description: Specify whether the Secret or its keys must be defined + type: boolean + secretName: + description: 'Name of the secret in the pod''s namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' type: string - type: array - size: - description: Size specifies N bytes consumed per vm worker, default is the total available memory. One can specify the size as % of total available memory or in units of B, KB/KiB, MB/MiB, GB/GiB, TB/TiB. - type: string - workers: - description: Workers specifies N workers to apply the stressor. - type: integer - required: - - workers - type: object - type: object - value: - description: Value is required when the mode is set to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. If `FixedPodMode`, provide an integer of pods to do chaos action. If `FixedPercentPodMod`, provide a number from 0-100 to specify the percent of pods the server can do chaos action. IF `RandomMaxPercentPodMod`, provide a number from 0-100 to specify the max percent of pods to do chaos action - type: string - required: - - mode - - selector + type: object + storageos: + description: StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + volumeName: + description: VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace. + type: string + volumeNamespace: + description: VolumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to "default" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created. + type: string + type: object + vsphereVolume: + description: VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + storagePolicyID: + description: Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. + type: string + storagePolicyName: + description: Storage Policy Based Management (SPBM) profile name. + type: string + volumePath: + description: Path that identifies vSphere volume vmdk + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array type: object tasks: items: @@ -6089,8 +9148,28 @@ spec: - kind - name type: object + conditionalBranches: + description: ConditionalBranches records the evaluation result of each ConditionalTask + properties: + branches: + items: + properties: + run: + type: string + task: + type: string + required: + - run + - task + type: object + type: array + context: + items: + type: string + type: array + type: object conditions: - description: Represents the latest available observations of a worklfow node's current state. + description: Represents the latest available observations of a workflow node's current state. items: properties: reason: diff --git a/helm/chaos-mesh/crds/chaos-mesh.org_workflows.yaml b/helm/chaos-mesh/crds/chaos-mesh.org_workflows.yaml index f71bd6ca78..df88ea34ed 100644 --- a/helm/chaos-mesh/crds/chaos-mesh.org_workflows.yaml +++ b/helm/chaos-mesh/crds/chaos-mesh.org_workflows.yaml @@ -74,6 +74,18 @@ spec: - awsRegion - ec2Instance type: object + conditionalTasks: + description: ConditionalTasks describes the conditional branches of custom tasks. Only used when Type is TypeTask. + items: + properties: + expression: + type: string + task: + type: string + required: + - task + type: object + type: array dnsChaos: description: DNSChaosSpec defines the desired state of DNSChaos properties: @@ -1287,7 +1299,7 @@ spec: - selector type: object schedule: - description: ChaosOnlyScheduleSpec is very similar with ScheduleSpec, but it could not schedule Workflow because we could not resolve nested CRD now + description: Schedule describe the Schedule(describing scheduled chaos) to be injected with chaos nodes. Only used when Type is TypeSchedule. properties: awsChaos: description: AwsChaosSpec is the content of the specification for an AwsChaos @@ -2928,7 +2940,1526 @@ spec: - mode - selector type: object + task: + description: Task describes the behavior of the custom task. Only used when Type is TypeTask. + properties: + container: + description: Container is the main container image to run in the pod + properties: + args: + description: '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. 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. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + command: + description: '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. 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. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + env: + description: List of environment variables to set in the container. Cannot be updated. + items: + description: EnvVar represents an environment variable present in a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: '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 "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: '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.' + properties: + containerName: + description: 'Container name: required for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + description: 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. + items: + description: EnvFromSource represents the source of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object + type: object + type: array + image: + description: '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.' + type: string + imagePullPolicy: + description: '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' + type: string + lifecycle: + description: Actions that the management system should take in response to container lifecycle events. Cannot be updated. + properties: + postStart: + description: 'PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following should be specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + description: 'PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The reason for termination is passed to the handler. The Pod''s termination grace period countdown begins before the PreStop hooked is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod''s termination grace period. Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following should be specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + description: 'Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following should be specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: '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' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: 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. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: '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' + format: int32 + type: integer + type: object + name: + description: Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. + type: string + ports: + description: 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. + items: + description: ContainerPort represents a network port in a single container. + properties: + containerPort: + description: Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. + format: int32 + type: integer + hostIP: + description: What host IP to bind the external port to. + type: string + hostPort: + description: Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. + format: int32 + type: integer + name: + description: If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services. + type: string + protocol: + default: TCP + description: Protocol for port. Must be UDP, TCP, or SCTP. Defaults to "TCP". + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + description: 'Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following should be specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: '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' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: 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. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: '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' + format: int32 + type: integer + type: object + resources: + description: 'Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: '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-compute-resources-container/' + type: object + type: object + securityContext: + description: 'Security options the pod should run with. More info: https://kubernetes.io/docs/concepts/policy/security-context/ More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/' + properties: + allowPrivilegeEscalation: + description: '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' + type: boolean + capabilities: + description: The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. + type: boolean + procMount: + description: 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. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only root filesystem. Default is false. + type: boolean + runAsGroup: + description: 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. + format: int64 + type: integer + runAsNonRoot: + description: 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. + type: boolean + runAsUser: + description: 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. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + properties: + level: + description: Level is SELinux level label that applies to the container. + type: string + role: + description: Role is a SELinux role label that applies to the container. + type: string + type: + description: Type is a SELinux type label that applies to the container. + type: string + user: + description: User is a SELinux user label that applies to the container. + type: string + type: object + windowsOptions: + description: The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + properties: + gmsaCredentialSpec: + description: 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. This field is alpha-level and is only honored by servers that enable the WindowsGMSA feature flag. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the GMSA credential spec to use. This field is alpha-level and is only honored by servers that enable the WindowsGMSA feature flag. + type: string + runAsUserName: + description: 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. This field is beta-level and may be disabled with the WindowsRunAsUserName feature flag. + type: string + type: object + type: object + startupProbe: + description: 'StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod''s lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. This is an alpha feature enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following should be specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: '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' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: 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. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: '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' + format: int32 + type: integer + type: object + stdin: + description: 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. + type: boolean + stdinOnce: + description: 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 + type: boolean + terminationMessagePath: + description: '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.' + type: string + terminationMessagePolicy: + description: 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. + type: string + tty: + description: Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false. + type: boolean + volumeDevices: + description: volumeDevices is the list of block devices to be used by the container. This is a beta feature. + items: + description: volumeDevice describes a mapping of a raw block device within a container. + properties: + devicePath: + description: devicePath is the path inside of the container that the device will be mapped to. + type: string + name: + description: name must match the name of a persistentVolumeClaim in the pod + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + description: Pod volumes to mount into the container's filesystem. Cannot be updated. + items: + description: VolumeMount describes a mounting of a Volume within a container. + properties: + mountPath: + description: Path within the container at which the volume should be mounted. Must not contain ':'. + type: string + mountPropagation: + description: 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. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. + type: boolean + subPath: + description: Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). + type: string + subPathExpr: + description: 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. + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: 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. + type: string + required: + - name + type: object + volumes: + description: Volumes is a list of volumes that can be mounted by containers in a template. + items: + description: Volume represents a named volume in a pod that may be accessed by any container in the pod. + properties: + awsElasticBlockStore: + description: 'AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + properties: + fsType: + description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + partition: + description: 'The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty).' + format: int32 + type: integer + readOnly: + description: 'Specify "true" to force and set the ReadOnly property in VolumeMounts to "true". If omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: boolean + volumeID: + description: 'Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: string + required: + - volumeID + type: object + azureDisk: + description: AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. + properties: + cachingMode: + description: 'Host Caching mode: None, Read Only, Read Write.' + type: string + diskName: + description: The Name of the data disk in the blob storage + type: string + diskURI: + description: The URI the data disk in the blob storage + type: string + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + kind: + description: 'Expected values Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared' + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + description: AzureFile represents an Azure File Service mount on the host and bind mount to the pod. + properties: + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretName: + description: the name of secret that contains Azure Storage Account Name and Key + type: string + shareName: + description: Share Name + type: string + required: + - secretName + - shareName + type: object + cephfs: + description: CephFS represents a Ceph FS mount on the host that shares a pod's lifetime + properties: + monitors: + description: 'Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + items: + type: string + type: array + path: + description: 'Optional: Used as the mounted root, rather than the full Ceph tree, default is /' + type: string + readOnly: + description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: boolean + secretFile: + description: 'Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + secretRef: + description: 'Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + user: + description: 'Optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + required: + - monitors + type: object + cinder: + description: 'Cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + properties: + fsType: + description: 'Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + readOnly: + description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: boolean + secretRef: + description: 'Optional: points to a secret object containing parameters used to connect to OpenStack.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + volumeID: + description: 'volume id used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + required: + - volumeID + type: object + configMap: + description: ConfigMap represents a configMap that should populate this volume + properties: + defaultMode: + description: 'Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + items: + description: If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its keys must be defined + type: boolean + type: object + csi: + description: CSI (Container Storage Interface) represents storage that is handled by an external CSI driver (Alpha feature). + properties: + driver: + description: Driver is the name of the CSI driver that handles this volume. Consult with your admin for the correct name as registered in the cluster. + type: string + fsType: + description: Filesystem type to mount. Ex. "ext4", "xfs", "ntfs". If not provided, the empty value is passed to the associated CSI driver which will determine the default filesystem to apply. + type: string + nodePublishSecretRef: + description: NodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secret references are passed. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + readOnly: + description: Specifies a read-only configuration for the volume. Defaults to false (read/write). + type: boolean + volumeAttributes: + additionalProperties: + type: string + description: VolumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values. + type: object + required: + - driver + type: object + downwardAPI: + description: DownwardAPI represents downward API about the pod that should populate this volume + properties: + defaultMode: + description: 'Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + items: + description: Items is a list of downward API volume file + items: + description: DownwardAPIVolumeFile represents information to create the file containing the pod field + properties: + fieldRef: + description: 'Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.' + properties: + apiVersion: + description: Version of the schema the FieldPath is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified API version. + type: string + required: + - fieldPath + type: object + mode: + description: 'Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative path name of the file to be created. Must not be absolute or contain the ''..'' path. Must be utf-8 encoded. The first item of the relative path must not start with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + emptyDir: + description: 'EmptyDir represents a temporary directory that shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + properties: + medium: + description: 'What type of storage medium should back this directory. The default is "" which means to use the node''s default medium. Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + description: 'Total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir' + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + fc: + description: FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. + properties: + fsType: + description: 'Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + lun: + description: 'Optional: FC target lun number' + format: int32 + type: integer + readOnly: + description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.' + type: boolean + targetWWNs: + description: 'Optional: FC target worldwide names (WWNs)' + items: + type: string + type: array + wwids: + description: 'Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously.' + items: + type: string + type: array + type: object + flexVolume: + description: FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. + properties: + driver: + description: Driver is the name of the driver to use for this volume. + type: string + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script. + type: string + options: + additionalProperties: + type: string + description: 'Optional: Extra command options if any.' + type: object + readOnly: + description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.' + type: boolean + secretRef: + description: 'Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - driver + type: object + flocker: + description: Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running + properties: + datasetName: + description: Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated + type: string + datasetUUID: + description: UUID of the dataset. This is unique identifier of a Flocker dataset + type: string + type: object + gcePersistentDisk: + description: 'GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + properties: + fsType: + description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + partition: + description: 'The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + format: int32 + type: integer + pdName: + description: 'Unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: string + readOnly: + description: 'ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: boolean + required: + - pdName + type: object + gitRepo: + description: 'GitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod''s container.' + properties: + directory: + description: Target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name. + type: string + repository: + description: Repository URL + type: string + revision: + description: Commit hash for the specified revision. + type: string + required: + - repository + type: object + glusterfs: + description: 'Glusterfs represents a Glusterfs mount on the host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md' + properties: + endpoints: + description: 'EndpointsName is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + path: + description: 'Path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + readOnly: + description: 'ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: boolean + required: + - endpoints + - path + type: object + hostPath: + description: 'HostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath --- TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not mount host directories as read/write.' + properties: + path: + description: 'Path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + type: + description: 'Type for HostPath Volume Defaults to "" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + required: + - path + type: object + iscsi: + description: 'ISCSI represents an ISCSI Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' + properties: + chapAuthDiscovery: + description: whether support iSCSI Discovery CHAP authentication + type: boolean + chapAuthSession: + description: whether support iSCSI Session CHAP authentication + type: boolean + fsType: + description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + initiatorName: + description: Custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection. + type: string + iqn: + description: Target iSCSI Qualified Name. + type: string + iscsiInterface: + description: iSCSI Interface Name that uses an iSCSI transport. Defaults to 'default' (tcp). + type: string + lun: + description: iSCSI Target Lun number. + format: int32 + type: integer + portals: + description: iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). + items: + type: string + type: array + readOnly: + description: ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. + type: boolean + secretRef: + description: CHAP Secret for iSCSI target and initiator authentication + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + targetPortal: + description: iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + description: 'Volume''s name. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + nfs: + description: 'NFS represents an NFS mount on the host that shares a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + properties: + path: + description: 'Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + readOnly: + description: 'ReadOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: boolean + server: + description: 'Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + description: 'PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + properties: + claimName: + description: 'ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + type: string + readOnly: + description: Will force the ReadOnly setting in VolumeMounts. Default false. + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + description: PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + pdID: + description: ID that identifies Photon Controller persistent disk + type: string + required: + - pdID + type: object + portworxVolume: + description: PortworxVolume represents a portworx volume attached and mounted on kubelets host machine + properties: + fsType: + description: FSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + volumeID: + description: VolumeID uniquely identifies a Portworx volume + type: string + required: + - volumeID + type: object + projected: + description: Items for all in one resources secrets, configmaps, and downward API + properties: + defaultMode: + description: Mode bits to use on created files by default. Must be a value between 0 and 0777. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. + format: int32 + type: integer + sources: + description: list of volume projections + items: + description: Projection that may be projected along with other supported volume types + properties: + configMap: + description: information about the configMap data to project + properties: + items: + description: If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its keys must be defined + type: boolean + type: object + downwardAPI: + description: information about the downwardAPI data to project + properties: + items: + description: Items is a list of DownwardAPIVolume file + items: + description: DownwardAPIVolumeFile represents information to create the file containing the pod field + properties: + fieldRef: + description: 'Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.' + properties: + apiVersion: + description: Version of the schema the FieldPath is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified API version. + type: string + required: + - fieldPath + type: object + mode: + description: 'Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative path name of the file to be created. Must not be absolute or contain the ''..'' path. Must be utf-8 encoded. The first item of the relative path must not start with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + secret: + description: information about the secret data to project + properties: + items: + description: If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must be defined + type: boolean + type: object + serviceAccountToken: + description: information about the serviceAccountToken data to project + properties: + audience: + description: Audience is the intended audience of the token. A recipient of a token must identify itself with an identifier specified in the audience of the token, and otherwise should reject the token. The audience defaults to the identifier of the apiserver. + type: string + expirationSeconds: + description: ExpirationSeconds is the requested duration of validity of the service account token. As the token approaches expiration, the kubelet volume plugin will proactively rotate the service account token. The kubelet will start trying to rotate the token if the token is older than 80 percent of its time to live or if the token is older than 24 hours.Defaults to 1 hour and must be at least 10 minutes. + format: int64 + type: integer + path: + description: Path is the path relative to the mount point of the file to project the token into. + type: string + required: + - path + type: object + type: object + type: array + required: + - sources + type: object + quobyte: + description: Quobyte represents a Quobyte mount on the host that shares a pod's lifetime + properties: + group: + description: Group to map volume access to Default is no group + type: string + readOnly: + description: ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false. + type: boolean + registry: + description: Registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes + type: string + tenant: + description: Tenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin + type: string + user: + description: User to map volume access to Defaults to serivceaccount user + type: string + volume: + description: Volume is a string that references an already created Quobyte volume by name. + type: string + required: + - registry + - volume + type: object + rbd: + description: 'RBD represents a Rados Block Device mount on the host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md' + properties: + fsType: + description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + image: + description: 'The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + keyring: + description: 'Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + monitors: + description: 'A collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + items: + type: string + type: array + pool: + description: 'The rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + readOnly: + description: 'ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: boolean + secretRef: + description: 'SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + user: + description: 'The rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + required: + - image + - monitors + type: object + scaleIO: + description: ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Default is "xfs". + type: string + gateway: + description: The host address of the ScaleIO API Gateway. + type: string + protectionDomain: + description: The name of the ScaleIO Protection Domain for the configured storage. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + sslEnabled: + description: Flag to enable/disable SSL communication with Gateway, default false + type: boolean + storageMode: + description: Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned. + type: string + storagePool: + description: The ScaleIO Storage Pool associated with the protection domain. + type: string + system: + description: The name of the storage system as configured in ScaleIO. + type: string + volumeName: + description: The name of a volume already created in the ScaleIO system that is associated with this volume source. + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + description: 'Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + properties: + defaultMode: + description: 'Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + items: + description: If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + optional: + description: Specify whether the Secret or its keys must be defined + type: boolean + secretName: + description: 'Name of the secret in the pod''s namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + type: string + type: object + storageos: + description: StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + volumeName: + description: VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace. + type: string + volumeNamespace: + description: VolumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to "default" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created. + type: string + type: object + vsphereVolume: + description: VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + storagePolicyID: + description: Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. + type: string + storagePolicyName: + description: Storage Policy Based Management (SPBM) profile name. + type: string + volumePath: + description: Path that identifies vSphere volume vmdk + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + type: object tasks: + description: Tasks describes the children steps of serial or parallel node. Only used when Type is TypeSerial or TypeParallel. items: type: string type: array diff --git a/helm/chaos-mesh/templates/controller-manager-rbac.yaml b/helm/chaos-mesh/templates/controller-manager-rbac.yaml index 51ac9a0a41..eb6f71ac61 100644 --- a/helm/chaos-mesh/templates/controller-manager-rbac.yaml +++ b/helm/chaos-mesh/templates/controller-manager-rbac.yaml @@ -21,6 +21,18 @@ rules: - apiGroups: [ "" ] resources: [ "pods", "secrets"] verbs: [ "get", "list", "watch", "delete", "update" ] + - apiGroups: + - "" + resources: + - pods + verbs: + - "create" + - apiGroups: + - "" + resources: + - "pods/log" + verbs: + - "get" - apiGroups: - "" resources: @@ -51,10 +63,10 @@ rules: - apiGroups: [ "" ] resources: - nodes -{{- if .Values.clusterScoped }} + {{- if .Values.clusterScoped }} - namespaces - services -{{- end }} + {{- end }} verbs: [ "get", "list", "watch" ] - apiGroups: [ "authorization.k8s.io" ] resources: @@ -118,11 +130,11 @@ subjects: namespace: {{ .Release.Namespace | quote }} --- -{{- if .Values.clusterScoped }} + {{- if .Values.clusterScoped }} kind: ClusterRoleBinding -{{- else }} + {{- else }} kind: RoleBinding -{{- end }} + {{- end }} apiVersion: rbac.authorization.k8s.io/v1 metadata: name: {{ .Release.Name }}-chaos-controller-manager-target-namespace @@ -138,4 +150,4 @@ subjects: - kind: ServiceAccount name: {{ .Values.controllerManager.serviceAccount }} namespace: {{ .Release.Namespace | quote }} -{{- end }} + {{- end }} diff --git a/install.sh b/install.sh index 8ebcb8d433..ed83b76243 100755 --- a/install.sh +++ b/install.sh @@ -644,7 +644,7 @@ install_chaos_mesh() { fi fi - gen_crd_manifests "${crd}" | kubectl apply --validate=false -f - || exit 1 + gen_crd_manifests "${crd}" | kubectl create --validate=false -f - || exit 1 gen_chaos_mesh_manifests "${runtime}" "${k3s}" "${version}" "${timezone}" "${host_network}" "${docker_registry}" "${microk8s}" | kubectl apply -f - || exit 1 } @@ -961,6 +961,18 @@ rules: - apiGroups: [ "" ] resources: [ "pods", "secrets"] verbs: [ "get", "list", "watch", "delete", "update" ] + - apiGroups: + - "" + resources: + - pods + verbs: + - "create" + - apiGroups: + - "" + resources: + - "pods/log" + verbs: + - "get" - apiGroups: - "" resources: diff --git a/manifests/crd-v1beta1.yaml b/manifests/crd-v1beta1.yaml index 23f9228861..68d60ae2f3 100644 --- a/manifests/crd-v1beta1.yaml +++ b/manifests/crd-v1beta1.yaml @@ -5105,6 +5105,19 @@ spec: - awsRegion - ec2Instance type: object + conditionalTasks: + description: ConditionalTasks describes the conditional branches + of custom tasks. Only used when Type is TypeTask. + items: + properties: + expression: + type: string + task: + type: string + required: + - task + type: object + type: array dnsChaos: description: DNSChaosSpec defines the desired state of DNSChaos properties: @@ -6746,9 +6759,9 @@ spec: - selector type: object schedule: - description: ChaosOnlyScheduleSpec is very similar with ScheduleSpec, - but it could not schedule Workflow because we could not - resolve nested CRD now + description: Schedule describe the Schedule(describing scheduled + chaos) to be injected with chaos nodes. Only used when Type + is TypeSchedule. properties: awsChaos: description: AwsChaosSpec is the content of the specification @@ -9046,137 +9059,2663 @@ spec: - mode - selector type: object - tasks: - items: - type: string - type: array - templateType: - type: string - timeChaos: - description: TimeChaosSpec defines the desired state of TimeChaos + task: + description: Task describes the behavior of the custom task. + Only used when Type is TypeTask. properties: - clockIds: - description: ClockIds defines all affected clock id All - available options are ["CLOCK_REALTIME","CLOCK_MONOTONIC","CLOCK_PROCESS_CPUTIME_ID","CLOCK_THREAD_CPUTIME_ID", - "CLOCK_MONOTONIC_RAW","CLOCK_REALTIME_COARSE","CLOCK_MONOTONIC_COARSE","CLOCK_BOOTTIME","CLOCK_REALTIME_ALARM", - "CLOCK_BOOTTIME_ALARM"] Default value is ["CLOCK_REALTIME"] - items: - type: string - type: array - containerNames: - description: ContainerNames indicates list of the name - of affected container. If not set, all containers will - be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of the chaos - action - type: string - mode: - description: 'Mode defines the mode to run chaos action. - Supported mode: one / all / fixed / fixed-percent / - random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - selector: - description: Selector is used to select pods that are - used to inject chaos action. + container: + description: Container is the main container image to + run in the pod properties: - annotationSelectors: - additionalProperties: + args: + description: '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. + 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. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: type: string - description: Map of string keys and values that can - be used to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list of selectors - based on set-based label expressions. + type: array + command: + description: '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. 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. Cannot be + updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. + type: string + type: array + env: + description: List of environment variables to set + in the container. Cannot be updated. + items: + description: EnvVar represents an environment variable + present in a Container. properties: - key: - description: key is the label key that the selector - applies to. + name: + description: Name of the environment variable. + Must be a C_IDENTIFIER. type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, - NotIn, Exists and DoesNotExist. + value: + description: '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 "".' type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values - array must be non-empty. If the operator is - Exists or DoesNotExist, the values array must - be empty. This array is replaced during a - strategic merge patch. - items: - type: string - type: array + valueFrom: + description: Source for the environment variable's + value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap + or its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: + supports metadata.name, metadata.namespace, + metadata.labels, metadata.annotations, + spec.nodeName, spec.serviceAccountName, + status.hostIP, status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema the + FieldPath is written in terms of, + defaults to "v1". + type: string + fieldPath: + description: Path of the field to select + in the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: '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.' + properties: + containerName: + description: 'Container name: required + for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format + of the exposed resources, defaults + to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to + select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in + the pod's namespace + properties: + key: + description: The key of the secret to + select from. Must be a valid secret + key. + type: string + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret + or its key must be defined + type: boolean + required: + - key + type: object + type: object required: - - key - - operator + - name type: object type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which - objects belong. + envFrom: + description: 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. items: - type: string + description: EnvFromSource represents the source + of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap + must be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend + to each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret + must be defined + type: boolean + type: object + type: object type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select nodes. Selector which must match - a node's labels, and objects must belong to these - selected nodes. + image: + description: '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.' + type: string + imagePullPolicy: + description: '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' + type: string + lifecycle: + description: Actions that the management system should + take in response to container lifecycle events. + Cannot be updated. + properties: + postStart: + description: 'PostStart is called immediately + after a container is created. If the handler + fails, the container is terminated and restarted + according to its restart policy. Other management + of the container blocks until the hook completes. + More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following + should be specified. Exec specifies the + action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request + to perform. + properties: + host: + description: Host name to connect to, + defaults to the pod IP. You probably + want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in + the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a + custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP + server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port + to access on the container. Number must + be in the range 1 to 65535. Name must + be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action + involving a TCP port. TCP hooks not yet + supported TODO: implement a realistic TCP + lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect + to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port + to access on the container. Number must + be in the range 1 to 65535. Name must + be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + description: 'PreStop is called immediately before + a container is terminated due to an API request + or management event such as liveness/startup + probe failure, preemption, resource contention, + etc. The handler is not called if the container + crashes or exits. The reason for termination + is passed to the handler. The Pod''s termination + grace period countdown begins before the PreStop + hooked is executed. Regardless of the outcome + of the handler, the container will eventually + terminate within the Pod''s termination grace + period. Other management of the container blocks + until the hook completes or until the termination + grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following + should be specified. Exec specifies the + action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request + to perform. + properties: + host: + description: Host name to connect to, + defaults to the pod IP. You probably + want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in + the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a + custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP + server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port + to access on the container. Number must + be in the range 1 to 65535. Name must + be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action + involving a TCP port. TCP hooks not yet + supported TODO: implement a realistic TCP + lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect + to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port + to access on the container. Number must + be in the range 1 to 65535. Name must + be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object type: object - nodes: - description: Nodes is a set of node name and objects - must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: Pending - / Running / Succeeded / Failed / Unknown' + livenessProbe: + description: 'Periodic probe of container liveness. + Container will be restarted if the probe fails. + Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following + should be specified. Exec specifies the action + to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for + the probe to be considered failed after having + succeeded. Defaults to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request + to perform. + properties: + host: + description: Host name to connect to, defaults + to the pod IP. You probably want to set + "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the + request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom + header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to + access on the container. Number must be + in the range 1 to 65535. Name must be an + IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: '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' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform + the probe. Default to 10 seconds. Minimum value + is 1. + format: int32 + type: integer + successThreshold: + description: 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. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving + a TCP port. TCP hooks not yet supported TODO: + implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect + to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to + access on the container. Number must be + in the range 1 to 65535. Name must be an + IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: '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' + format: int32 + type: integer + type: object + name: + description: Name of the container specified as a + DNS_LABEL. Each container in a pod must have a unique + name (DNS_LABEL). Cannot be updated. + type: string + ports: + description: 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. items: - type: string + description: ContainerPort represents a network + port in a single container. + properties: + containerPort: + description: Number of port to expose on the + pod's IP address. This must be a valid port + number, 0 < x < 65536. + format: int32 + type: integer + hostIP: + description: What host IP to bind the external + port to. + type: string + hostPort: + description: Number of port to expose on the + host. If specified, this must be a valid port + number, 0 < x < 65536. If HostNetwork is specified, + this must match ContainerPort. Most containers + do not need this. + format: int32 + type: integer + name: + description: If specified, this must be an IANA_SVC_NAME + and unique within the pod. Each named port + in a pod must have a unique name. Name for + the port that can be referred to by services. + type: string + protocol: + description: Protocol for port. Must be UDP, + TCP, or SCTP. Defaults to "TCP". + type: string + required: + - containerPort + type: object type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set - values that used to select pods. The key defines - the namespace which pods belong, and the each values - is a set of pod names. - type: object + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + description: 'Periodic probe of container service + readiness. Container will be removed from service + endpoints if the probe fails. Cannot be updated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following + should be specified. Exec specifies the action + to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for + the probe to be considered failed after having + succeeded. Defaults to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request + to perform. + properties: + host: + description: Host name to connect to, defaults + to the pod IP. You probably want to set + "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the + request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom + header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to + access on the container. Number must be + in the range 1 to 65535. Name must be an + IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: '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' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform + the probe. Default to 10 seconds. Minimum value + is 1. + format: int32 + type: integer + successThreshold: + description: 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. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving + a TCP port. TCP hooks not yet supported TODO: + implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect + to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to + access on the container. Number must be + in the range 1 to 65535. Name must be an + IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: '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' + format: int32 + type: integer + type: object + resources: + description: 'Compute Resources required by this container. + Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount + of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: '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-compute-resources-container/' + type: object + type: object + securityContext: + description: 'Security options the pod should run + with. More info: https://kubernetes.io/docs/concepts/policy/security-context/ + More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/' + properties: + allowPrivilegeEscalation: + description: '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' + type: boolean + capabilities: + description: The capabilities to add/drop when + running containers. Defaults to the default + set of capabilities granted by the container + runtime. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX + capabilities type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX + capabilities type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. + Processes in privileged containers are essentially + equivalent to root on the host. Defaults to + false. + type: boolean + procMount: + description: 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. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only + root filesystem. Default is false. + type: boolean + runAsGroup: + description: 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. + format: int64 + type: integer + runAsNonRoot: + description: 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. + type: boolean + runAsUser: + description: 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. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied + to the container. If unspecified, the container + runtime will allocate a random SELinux context + for each container. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes + precedence. + properties: + level: + description: Level is SELinux level label + that applies to the container. + type: string + role: + description: Role is a SELinux role label + that applies to the container. + type: string + type: + description: Type is a SELinux type label + that applies to the container. + type: string + user: + description: User is a SELinux user label + that applies to the container. + type: string + type: object + windowsOptions: + description: The Windows specific settings applied + to all containers. If unspecified, the options + from the PodSecurityContext will be used. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes + precedence. + properties: + gmsaCredentialSpec: + description: 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. This field is alpha-level and is + only honored by servers that enable the + WindowsGMSA feature flag. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the + name of the GMSA credential spec to use. + This field is alpha-level and is only honored + by servers that enable the WindowsGMSA feature + flag. + type: string + runAsUserName: + description: 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. This + field is beta-level and may be disabled + with the WindowsRunAsUserName feature flag. + type: string + type: object + type: object + startupProbe: + description: 'StartupProbe indicates that the Pod + has successfully initialized. If specified, no other + probes are executed until this completes successfully. + If this probe fails, the Pod will be restarted, + just as if the livenessProbe failed. This can be + used to provide different probe parameters at the + beginning of a Pod''s lifecycle, when it might take + a long time to load data or warm a cache, than during + steady-state operation. This cannot be updated. + This is an alpha feature enabled by the StartupProbe + feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following + should be specified. Exec specifies the action + to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for + the probe to be considered failed after having + succeeded. Defaults to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request + to perform. + properties: + host: + description: Host name to connect to, defaults + to the pod IP. You probably want to set + "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the + request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom + header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to + access on the container. Number must be + in the range 1 to 65535. Name must be an + IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: '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' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform + the probe. Default to 10 seconds. Minimum value + is 1. + format: int32 + type: integer + successThreshold: + description: 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. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving + a TCP port. TCP hooks not yet supported TODO: + implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect + to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to + access on the container. Number must be + in the range 1 to 65535. Name must be an + IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: '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' + format: int32 + type: integer + type: object + stdin: + description: 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. + type: boolean + stdinOnce: + description: 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 + type: boolean + terminationMessagePath: + description: '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.' + type: string + terminationMessagePolicy: + description: 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. + type: string + tty: + description: Whether this container should allocate + a TTY for itself, also requires 'stdin' to be true. + Default is false. + type: boolean + volumeDevices: + description: volumeDevices is the list of block devices + to be used by the container. This is a beta feature. + items: + description: volumeDevice describes a mapping of + a raw block device within a container. + properties: + devicePath: + description: devicePath is the path inside of + the container that the device will be mapped + to. + type: string + name: + description: name must match the name of a persistentVolumeClaim + in the pod + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + description: Pod volumes to mount into the container's + filesystem. Cannot be updated. + items: + description: VolumeMount describes a mounting of + a Volume within a container. + properties: + mountPath: + description: Path within the container at which + the volume should be mounted. Must not contain + ':'. + type: string + mountPropagation: + description: 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. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write + otherwise (false or unspecified). Defaults + to false. + type: boolean + subPath: + description: Path within the volume from which + the container's volume should be mounted. + Defaults to "" (volume's root). + type: string + subPathExpr: + description: 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. + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: 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. + type: string + required: + - name + type: object + volumes: + description: Volumes is a list of volumes that can be + mounted by containers in a template. + items: + description: Volume represents a named volume in a pod + that may be accessed by any container in the pod. + properties: + awsElasticBlockStore: + description: 'AWSElasticBlockStore represents an + AWS Disk resource that is attached to a kubelet''s + host machine and then exposed to the pod. More + info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + properties: + fsType: + description: 'Filesystem type of the volume + that you want to mount. Tip: Ensure that the + filesystem type is supported by the host operating + system. Examples: "ext4", "xfs", "ntfs". Implicitly + inferred to be "ext4" if unspecified. More + info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + TODO: how do we prevent errors in the filesystem + from compromising the machine' + type: string + partition: + description: 'The partition in the volume that + you want to mount. If omitted, the default + is to mount by volume name. Examples: For + volume /dev/sda1, you specify the partition + as "1". Similarly, the volume partition for + /dev/sda is "0" (or you can leave the property + empty).' + format: int32 + type: integer + readOnly: + description: 'Specify "true" to force and set + the ReadOnly property in VolumeMounts to "true". + If omitted, the default is "false". More info: + https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: boolean + volumeID: + description: 'Unique ID of the persistent disk + resource in AWS (Amazon EBS volume). More + info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: string + required: + - volumeID + type: object + azureDisk: + description: AzureDisk represents an Azure Data + Disk mount on the host and bind mount to the pod. + properties: + cachingMode: + description: 'Host Caching mode: None, Read + Only, Read Write.' + type: string + diskName: + description: The Name of the data disk in the + blob storage + type: string + diskURI: + description: The URI the data disk in the blob + storage + type: string + fsType: + description: Filesystem type to mount. Must + be a filesystem type supported by the host + operating system. Ex. "ext4", "xfs", "ntfs". + Implicitly inferred to be "ext4" if unspecified. + type: string + kind: + description: 'Expected values Shared: multiple + blob disks per storage account Dedicated: + single blob disk per storage account Managed: + azure managed data disk (only in managed availability + set). defaults to shared' + type: string + readOnly: + description: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting + in VolumeMounts. + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + description: AzureFile represents an Azure File + Service mount on the host and bind mount to the + pod. + properties: + readOnly: + description: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting + in VolumeMounts. + type: boolean + secretName: + description: the name of secret that contains + Azure Storage Account Name and Key + type: string + shareName: + description: Share Name + type: string + required: + - secretName + - shareName + type: object + cephfs: + description: CephFS represents a Ceph FS mount on + the host that shares a pod's lifetime + properties: + monitors: + description: 'Required: Monitors is a collection + of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + items: + type: string + type: array + path: + description: 'Optional: Used as the mounted + root, rather than the full Ceph tree, default + is /' + type: string + readOnly: + description: 'Optional: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting + in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: boolean + secretFile: + description: 'Optional: SecretFile is the path + to key ring for User, default is /etc/ceph/user.secret + More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + secretRef: + description: 'Optional: SecretRef is reference + to the authentication secret for User, default + is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + user: + description: 'Optional: User is the rados user + name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + required: + - monitors + type: object + cinder: + description: 'Cinder represents a cinder volume + attached and mounted on kubelets host machine. + More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + properties: + fsType: + description: 'Filesystem type to mount. Must + be a filesystem type supported by the host + operating system. Examples: "ext4", "xfs", + "ntfs". Implicitly inferred to be "ext4" if + unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + readOnly: + description: 'Optional: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting + in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: boolean + secretRef: + description: 'Optional: points to a secret object + containing parameters used to connect to OpenStack.' + properties: + name: + description: 'Name of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + volumeID: + description: 'volume id used to identify the + volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + required: + - volumeID + type: object + configMap: + description: ConfigMap represents a configMap that + should populate this volume + properties: + defaultMode: + description: 'Optional: mode bits to use on + created files by default. Must be a value + between 0 and 0777. Defaults to 0644. Directories + within the path are not affected by this setting. + This might be in conflict with other options + that affect the file mode, like fsGroup, and + the result can be other mode bits set.' + format: int32 + type: integer + items: + description: If unspecified, each key-value + pair in the Data field of the referenced ConfigMap + will be projected into the volume as a file + whose name is the key and content is the value. + If specified, the listed keys will be projected + into the specified paths, and unlisted keys + will not be present. If a key is specified + which is not present in the ConfigMap, the + volume setup will error unless it is marked + optional. Paths must be relative and may not + contain the '..' path or start with '..'. + items: + description: Maps a string key to a path within + a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use + on this file, must be a value between + 0 and 0777. If not specified, the volume + defaultMode will be used. This might + be in conflict with other options that + affect the file mode, like fsGroup, + and the result can be other mode bits + set.' + format: int32 + type: integer + path: + description: The relative path of the + file to map the key to. May not be an + absolute path. May not contain the path + element '..'. May not start with the + string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or + its keys must be defined + type: boolean + type: object + csi: + description: CSI (Container Storage Interface) represents + storage that is handled by an external CSI driver + (Alpha feature). + properties: + driver: + description: Driver is the name of the CSI driver + that handles this volume. Consult with your + admin for the correct name as registered in + the cluster. + type: string + fsType: + description: Filesystem type to mount. Ex. "ext4", + "xfs", "ntfs". If not provided, the empty + value is passed to the associated CSI driver + which will determine the default filesystem + to apply. + type: string + nodePublishSecretRef: + description: NodePublishSecretRef is a reference + to the secret object containing sensitive + information to pass to the CSI driver to complete + the CSI NodePublishVolume and NodeUnpublishVolume + calls. This field is optional, and may be + empty if no secret is required. If the secret + object contains more than one secret, all + secret references are passed. + properties: + name: + description: 'Name of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + readOnly: + description: Specifies a read-only configuration + for the volume. Defaults to false (read/write). + type: boolean + volumeAttributes: + additionalProperties: + type: string + description: VolumeAttributes stores driver-specific + properties that are passed to the CSI driver. + Consult your driver's documentation for supported + values. + type: object + required: + - driver + type: object + downwardAPI: + description: DownwardAPI represents downward API + about the pod that should populate this volume + properties: + defaultMode: + description: 'Optional: mode bits to use on + created files by default. Must be a value + between 0 and 0777. Defaults to 0644. Directories + within the path are not affected by this setting. + This might be in conflict with other options + that affect the file mode, like fsGroup, and + the result can be other mode bits set.' + format: int32 + type: integer + items: + description: Items is a list of downward API + volume file + items: + description: DownwardAPIVolumeFile represents + information to create the file containing + the pod field + properties: + fieldRef: + description: 'Required: Selects a field + of the pod: only annotations, labels, + name and namespace are supported.' + properties: + apiVersion: + description: Version of the schema + the FieldPath is written in terms + of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to + select in the specified API version. + type: string + required: + - fieldPath + type: object + mode: + description: 'Optional: mode bits to use + on this file, must be a value between + 0 and 0777. If not specified, the volume + defaultMode will be used. This might + be in conflict with other options that + affect the file mode, like fsGroup, + and the result can be other mode bits + set.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative + path name of the file to be created. + Must not be absolute or contain the + ''..'' path. Must be utf-8 encoded. + The first item of the relative path + must not start with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the + container: only resources limits and + requests (limits.cpu, limits.memory, + requests.cpu and requests.memory) are + currently supported.' + properties: + containerName: + description: 'Container name: required + for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output + format of the exposed resources, + defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to + select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + emptyDir: + description: 'EmptyDir represents a temporary directory + that shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + properties: + medium: + description: 'What type of storage medium should + back this directory. The default is "" which + means to use the node''s default medium. Must + be an empty string (default) or Memory. More + info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + description: 'Total amount of local storage + required for this EmptyDir volume. The size + limit is also applicable for memory medium. + The maximum usage on memory medium EmptyDir + would be the minimum value between the SizeLimit + specified here and the sum of memory limits + of all containers in a pod. The default is + nil which means that the limit is undefined. + More info: http://kubernetes.io/docs/user-guide/volumes#emptydir' + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + fc: + description: FC represents a Fibre Channel resource + that is attached to a kubelet's host machine and + then exposed to the pod. + properties: + fsType: + description: 'Filesystem type to mount. Must + be a filesystem type supported by the host + operating system. Ex. "ext4", "xfs", "ntfs". + Implicitly inferred to be "ext4" if unspecified. + TODO: how do we prevent errors in the filesystem + from compromising the machine' + type: string + lun: + description: 'Optional: FC target lun number' + format: int32 + type: integer + readOnly: + description: 'Optional: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting + in VolumeMounts.' + type: boolean + targetWWNs: + description: 'Optional: FC target worldwide + names (WWNs)' + items: + type: string + type: array + wwids: + description: 'Optional: FC volume world wide + identifiers (wwids) Either wwids or combination + of targetWWNs and lun must be set, but not + both simultaneously.' + items: + type: string + type: array + type: object + flexVolume: + description: FlexVolume represents a generic volume + resource that is provisioned/attached using an + exec based plugin. + properties: + driver: + description: Driver is the name of the driver + to use for this volume. + type: string + fsType: + description: Filesystem type to mount. Must + be a filesystem type supported by the host + operating system. Ex. "ext4", "xfs", "ntfs". + The default filesystem depends on FlexVolume + script. + type: string + options: + additionalProperties: + type: string + description: 'Optional: Extra command options + if any.' + type: object + readOnly: + description: 'Optional: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting + in VolumeMounts.' + type: boolean + secretRef: + description: 'Optional: SecretRef is reference + to the secret object containing sensitive + information to pass to the plugin scripts. + This may be empty if no secret object is specified. + If the secret object contains more than one + secret, all secrets are passed to the plugin + scripts.' + properties: + name: + description: 'Name of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + required: + - driver + type: object + flocker: + description: Flocker represents a Flocker volume + attached to a kubelet's host machine. This depends + on the Flocker control service being running + properties: + datasetName: + description: Name of the dataset stored as metadata + -> name on the dataset for Flocker should + be considered as deprecated + type: string + datasetUUID: + description: UUID of the dataset. This is unique + identifier of a Flocker dataset + type: string + type: object + gcePersistentDisk: + description: 'GCEPersistentDisk represents a GCE + Disk resource that is attached to a kubelet''s + host machine and then exposed to the pod. More + info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + properties: + fsType: + description: 'Filesystem type of the volume + that you want to mount. Tip: Ensure that the + filesystem type is supported by the host operating + system. Examples: "ext4", "xfs", "ntfs". Implicitly + inferred to be "ext4" if unspecified. More + info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + TODO: how do we prevent errors in the filesystem + from compromising the machine' + type: string + partition: + description: 'The partition in the volume that + you want to mount. If omitted, the default + is to mount by volume name. Examples: For + volume /dev/sda1, you specify the partition + as "1". Similarly, the volume partition for + /dev/sda is "0" (or you can leave the property + empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + format: int32 + type: integer + pdName: + description: 'Unique name of the PD resource + in GCE. Used to identify the disk in GCE. + More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: string + readOnly: + description: 'ReadOnly here will force the ReadOnly + setting in VolumeMounts. Defaults to false. + More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: boolean + required: + - pdName + type: object + gitRepo: + description: 'GitRepo represents a git repository + at a particular revision. DEPRECATED: GitRepo + is deprecated. To provision a container with a + git repo, mount an EmptyDir into an InitContainer + that clones the repo using git, then mount the + EmptyDir into the Pod''s container.' + properties: + directory: + description: Target directory name. Must not + contain or start with '..'. If '.' is supplied, + the volume directory will be the git repository. Otherwise, + if specified, the volume will contain the + git repository in the subdirectory with the + given name. + type: string + repository: + description: Repository URL + type: string + revision: + description: Commit hash for the specified revision. + type: string + required: + - repository + type: object + glusterfs: + description: 'Glusterfs represents a Glusterfs mount + on the host that shares a pod''s lifetime. More + info: https://examples.k8s.io/volumes/glusterfs/README.md' + properties: + endpoints: + description: 'EndpointsName is the endpoint + name that details Glusterfs topology. More + info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + path: + description: 'Path is the Glusterfs volume path. + More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + readOnly: + description: 'ReadOnly here will force the Glusterfs + volume to be mounted with read-only permissions. + Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: boolean + required: + - endpoints + - path + type: object + hostPath: + description: 'HostPath represents a pre-existing + file or directory on the host machine that is + directly exposed to the container. This is generally + used for system agents or other privileged things + that are allowed to see the host machine. Most + containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath + --- TODO(jonesdl) We need to restrict who can + use host directory mounts and who can/can not + mount host directories as read/write.' + properties: + path: + description: 'Path of the directory on the host. + If the path is a symlink, it will follow the + link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + type: + description: 'Type for HostPath Volume Defaults + to "" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + required: + - path + type: object + iscsi: + description: 'ISCSI represents an ISCSI Disk resource + that is attached to a kubelet''s host machine + and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' + properties: + chapAuthDiscovery: + description: whether support iSCSI Discovery + CHAP authentication + type: boolean + chapAuthSession: + description: whether support iSCSI Session CHAP + authentication + type: boolean + fsType: + description: 'Filesystem type of the volume + that you want to mount. Tip: Ensure that the + filesystem type is supported by the host operating + system. Examples: "ext4", "xfs", "ntfs". Implicitly + inferred to be "ext4" if unspecified. More + info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi + TODO: how do we prevent errors in the filesystem + from compromising the machine' + type: string + initiatorName: + description: Custom iSCSI Initiator Name. If + initiatorName is specified with iscsiInterface + simultaneously, new iSCSI interface : will be created for + the connection. + type: string + iqn: + description: Target iSCSI Qualified Name. + type: string + iscsiInterface: + description: iSCSI Interface Name that uses + an iSCSI transport. Defaults to 'default' + (tcp). + type: string + lun: + description: iSCSI Target Lun number. + format: int32 + type: integer + portals: + description: iSCSI Target Portal List. The portal + is either an IP or ip_addr:port if the port + is other than default (typically TCP ports + 860 and 3260). + items: + type: string + type: array + readOnly: + description: ReadOnly here will force the ReadOnly + setting in VolumeMounts. Defaults to false. + type: boolean + secretRef: + description: CHAP Secret for iSCSI target and + initiator authentication + properties: + name: + description: 'Name of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + targetPortal: + description: iSCSI Target Portal. The Portal + is either an IP or ip_addr:port if the port + is other than default (typically TCP ports + 860 and 3260). + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + description: 'Volume''s name. Must be a DNS_LABEL + and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + nfs: + description: 'NFS represents an NFS mount on the + host that shares a pod''s lifetime More info: + https://kubernetes.io/docs/concepts/storage/volumes#nfs' + properties: + path: + description: 'Path that is exported by the NFS + server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + readOnly: + description: 'ReadOnly here will force the NFS + export to be mounted with read-only permissions. + Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: boolean + server: + description: 'Server is the hostname or IP address + of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + description: 'PersistentVolumeClaimVolumeSource + represents a reference to a PersistentVolumeClaim + in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + properties: + claimName: + description: 'ClaimName is the name of a PersistentVolumeClaim + in the same namespace as the pod using this + volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + type: string + readOnly: + description: Will force the ReadOnly setting + in VolumeMounts. Default false. + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + description: PhotonPersistentDisk represents a PhotonController + persistent disk attached and mounted on kubelets + host machine + properties: + fsType: + description: Filesystem type to mount. Must + be a filesystem type supported by the host + operating system. Ex. "ext4", "xfs", "ntfs". + Implicitly inferred to be "ext4" if unspecified. + type: string + pdID: + description: ID that identifies Photon Controller + persistent disk + type: string + required: + - pdID + type: object + portworxVolume: + description: PortworxVolume represents a portworx + volume attached and mounted on kubelets host machine + properties: + fsType: + description: FSType represents the filesystem + type to mount Must be a filesystem type supported + by the host operating system. Ex. "ext4", + "xfs". Implicitly inferred to be "ext4" if + unspecified. + type: string + readOnly: + description: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting + in VolumeMounts. + type: boolean + volumeID: + description: VolumeID uniquely identifies a + Portworx volume + type: string + required: + - volumeID + type: object + projected: + description: Items for all in one resources secrets, + configmaps, and downward API + properties: + defaultMode: + description: Mode bits to use on created files + by default. Must be a value between 0 and + 0777. Directories within the path are not + affected by this setting. This might be in + conflict with other options that affect the + file mode, like fsGroup, and the result can + be other mode bits set. + format: int32 + type: integer + sources: + description: list of volume projections + items: + description: Projection that may be projected + along with other supported volume types + properties: + configMap: + description: information about the configMap + data to project + properties: + items: + description: If unspecified, each + key-value pair in the Data field + of the referenced ConfigMap will + be projected into the volume as + a file whose name is the key and + content is the value. If specified, + the listed keys will be projected + into the specified paths, and unlisted + keys will not be present. If a key + is specified which is not present + in the ConfigMap, the volume setup + will error unless it is marked optional. + Paths must be relative and may not + contain the '..' path or start with + '..'. + items: + description: Maps a string key to + a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode + bits to use on this file, + must be a value between 0 + and 0777. If not specified, + the volume defaultMode will + be used. This might be in + conflict with other options + that affect the file mode, + like fsGroup, and the result + can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path + of the file to map the key + to. May not be an absolute + path. May not contain the + path element '..'. May not + start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap + or its keys must be defined + type: boolean + type: object + downwardAPI: + description: information about the downwardAPI + data to project + properties: + items: + description: Items is a list of DownwardAPIVolume + file + items: + description: DownwardAPIVolumeFile + represents information to create + the file containing the pod field + properties: + fieldRef: + description: 'Required: Selects + a field of the pod: only annotations, + labels, name and namespace + are supported.' + properties: + apiVersion: + description: Version of + the schema the FieldPath + is written in terms of, + defaults to "v1". + type: string + fieldPath: + description: Path of the + field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + mode: + description: 'Optional: mode + bits to use on this file, + must be a value between 0 + and 0777. If not specified, + the volume defaultMode will + be used. This might be in + conflict with other options + that affect the file mode, + like fsGroup, and the result + can be other mode bits set.' + format: int32 + type: integer + path: + description: 'Required: Path + is the relative path name + of the file to be created. + Must not be absolute or contain + the ''..'' path. Must be utf-8 + encoded. The first item of + the relative path must not + start with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource + of the container: only resources + limits and requests (limits.cpu, + limits.memory, requests.cpu + and requests.memory) are currently + supported.' + properties: + containerName: + description: 'Container + name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the + output format of the exposed + resources, defaults to + "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: + resource to select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + secret: + description: information about the secret + data to project + properties: + items: + description: If unspecified, each + key-value pair in the Data field + of the referenced Secret will be + projected into the volume as a file + whose name is the key and content + is the value. If specified, the + listed keys will be projected into + the specified paths, and unlisted + keys will not be present. If a key + is specified which is not present + in the Secret, the volume setup + will error unless it is marked optional. + Paths must be relative and may not + contain the '..' path or start with + '..'. + items: + description: Maps a string key to + a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode + bits to use on this file, + must be a value between 0 + and 0777. If not specified, + the volume defaultMode will + be used. This might be in + conflict with other options + that affect the file mode, + like fsGroup, and the result + can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path + of the file to map the key + to. May not be an absolute + path. May not contain the + path element '..'. May not + start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret + or its key must be defined + type: boolean + type: object + serviceAccountToken: + description: information about the serviceAccountToken + data to project + properties: + audience: + description: Audience is the intended + audience of the token. A recipient + of a token must identify itself + with an identifier specified in + the audience of the token, and otherwise + should reject the token. The audience + defaults to the identifier of the + apiserver. + type: string + expirationSeconds: + description: ExpirationSeconds is + the requested duration of validity + of the service account token. As + the token approaches expiration, + the kubelet volume plugin will proactively + rotate the service account token. + The kubelet will start trying to + rotate the token if the token is + older than 80 percent of its time + to live or if the token is older + than 24 hours.Defaults to 1 hour + and must be at least 10 minutes. + format: int64 + type: integer + path: + description: Path is the path relative + to the mount point of the file to + project the token into. + type: string + required: + - path + type: object + type: object + type: array + required: + - sources + type: object + quobyte: + description: Quobyte represents a Quobyte mount + on the host that shares a pod's lifetime + properties: + group: + description: Group to map volume access to Default + is no group + type: string + readOnly: + description: ReadOnly here will force the Quobyte + volume to be mounted with read-only permissions. + Defaults to false. + type: boolean + registry: + description: Registry represents a single or + multiple Quobyte Registry services specified + as a string as host:port pair (multiple entries + are separated with commas) which acts as the + central registry for volumes + type: string + tenant: + description: Tenant owning the given Quobyte + volume in the Backend Used with dynamically + provisioned Quobyte volumes, value is set + by the plugin + type: string + user: + description: User to map volume access to Defaults + to serivceaccount user + type: string + volume: + description: Volume is a string that references + an already created Quobyte volume by name. + type: string + required: + - registry + - volume + type: object + rbd: + description: 'RBD represents a Rados Block Device + mount on the host that shares a pod''s lifetime. + More info: https://examples.k8s.io/volumes/rbd/README.md' + properties: + fsType: + description: 'Filesystem type of the volume + that you want to mount. Tip: Ensure that the + filesystem type is supported by the host operating + system. Examples: "ext4", "xfs", "ntfs". Implicitly + inferred to be "ext4" if unspecified. More + info: https://kubernetes.io/docs/concepts/storage/volumes#rbd + TODO: how do we prevent errors in the filesystem + from compromising the machine' + type: string + image: + description: 'The rados image name. More info: + https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + keyring: + description: 'Keyring is the path to key ring + for RBDUser. Default is /etc/ceph/keyring. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + monitors: + description: 'A collection of Ceph monitors. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + items: + type: string + type: array + pool: + description: 'The rados pool name. Default is + rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + readOnly: + description: 'ReadOnly here will force the ReadOnly + setting in VolumeMounts. Defaults to false. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: boolean + secretRef: + description: 'SecretRef is name of the authentication + secret for RBDUser. If provided overrides + keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + user: + description: 'The rados user name. Default is + admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + required: + - image + - monitors + type: object + scaleIO: + description: ScaleIO represents a ScaleIO persistent + volume attached and mounted on Kubernetes nodes. + properties: + fsType: + description: Filesystem type to mount. Must + be a filesystem type supported by the host + operating system. Ex. "ext4", "xfs", "ntfs". + Default is "xfs". + type: string + gateway: + description: The host address of the ScaleIO + API Gateway. + type: string + protectionDomain: + description: The name of the ScaleIO Protection + Domain for the configured storage. + type: string + readOnly: + description: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting + in VolumeMounts. + type: boolean + secretRef: + description: SecretRef references to the secret + for ScaleIO user and other sensitive information. + If this is not provided, Login operation will + fail. + properties: + name: + description: 'Name of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + sslEnabled: + description: Flag to enable/disable SSL communication + with Gateway, default false + type: boolean + storageMode: + description: Indicates whether the storage for + a volume should be ThickProvisioned or ThinProvisioned. + Default is ThinProvisioned. + type: string + storagePool: + description: The ScaleIO Storage Pool associated + with the protection domain. + type: string + system: + description: The name of the storage system + as configured in ScaleIO. + type: string + volumeName: + description: The name of a volume already created + in the ScaleIO system that is associated with + this volume source. + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + description: 'Secret represents a secret that should + populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + properties: + defaultMode: + description: 'Optional: mode bits to use on + created files by default. Must be a value + between 0 and 0777. Defaults to 0644. Directories + within the path are not affected by this setting. + This might be in conflict with other options + that affect the file mode, like fsGroup, and + the result can be other mode bits set.' + format: int32 + type: integer + items: + description: If unspecified, each key-value + pair in the Data field of the referenced Secret + will be projected into the volume as a file + whose name is the key and content is the value. + If specified, the listed keys will be projected + into the specified paths, and unlisted keys + will not be present. If a key is specified + which is not present in the Secret, the volume + setup will error unless it is marked optional. + Paths must be relative and may not contain + the '..' path or start with '..'. + items: + description: Maps a string key to a path within + a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use + on this file, must be a value between + 0 and 0777. If not specified, the volume + defaultMode will be used. This might + be in conflict with other options that + affect the file mode, like fsGroup, + and the result can be other mode bits + set.' + format: int32 + type: integer + path: + description: The relative path of the + file to map the key to. May not be an + absolute path. May not contain the path + element '..'. May not start with the + string '..'. + type: string + required: + - key + - path + type: object + type: array + optional: + description: Specify whether the Secret or its + keys must be defined + type: boolean + secretName: + description: 'Name of the secret in the pod''s + namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + type: string + type: object + storageos: + description: StorageOS represents a StorageOS volume + attached and mounted on Kubernetes nodes. + properties: + fsType: + description: Filesystem type to mount. Must + be a filesystem type supported by the host + operating system. Ex. "ext4", "xfs", "ntfs". + Implicitly inferred to be "ext4" if unspecified. + type: string + readOnly: + description: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting + in VolumeMounts. + type: boolean + secretRef: + description: SecretRef specifies the secret + to use for obtaining the StorageOS API credentials. If + not specified, default values will be attempted. + properties: + name: + description: 'Name of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + volumeName: + description: VolumeName is the human-readable + name of the StorageOS volume. Volume names + are only unique within a namespace. + type: string + volumeNamespace: + description: VolumeNamespace specifies the scope + of the volume within StorageOS. If no namespace + is specified then the Pod's namespace will + be used. This allows the Kubernetes name + scoping to be mirrored within StorageOS for + tighter integration. Set VolumeName to any + name to override the default behaviour. Set + to "default" if you are not using namespaces + within StorageOS. Namespaces that do not pre-exist + within StorageOS will be created. + type: string + type: object + vsphereVolume: + description: VsphereVolume represents a vSphere + volume attached and mounted on kubelets host machine + properties: + fsType: + description: Filesystem type to mount. Must + be a filesystem type supported by the host + operating system. Ex. "ext4", "xfs", "ntfs". + Implicitly inferred to be "ext4" if unspecified. + type: string + storagePolicyID: + description: Storage Policy Based Management + (SPBM) profile ID associated with the StoragePolicyName. + type: string + storagePolicyName: + description: Storage Policy Based Management + (SPBM) profile name. + type: string + volumePath: + description: Path that identifies vSphere volume + vmdk + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + type: object + tasks: + description: Tasks describes the children steps of serial + or parallel node. Only used when Type is TypeSerial or TypeParallel. + items: + type: string + type: array + templateType: + type: string + timeChaos: + description: TimeChaosSpec defines the desired state of TimeChaos + properties: + clockIds: + description: ClockIds defines all affected clock id All + available options are ["CLOCK_REALTIME","CLOCK_MONOTONIC","CLOCK_PROCESS_CPUTIME_ID","CLOCK_THREAD_CPUTIME_ID", + "CLOCK_MONOTONIC_RAW","CLOCK_REALTIME_COARSE","CLOCK_MONOTONIC_COARSE","CLOCK_BOOTTIME","CLOCK_REALTIME_ALARM", + "CLOCK_BOOTTIME_ALARM"] Default value is ["CLOCK_REALTIME"] + items: + type: string + type: array + containerNames: + description: ContainerNames indicates list of the name + of affected container. If not set, all containers will + be injected + items: + type: string + type: array + duration: + description: Duration represents the duration of the chaos + action + type: string + mode: + description: 'Mode defines the mode to run chaos action. + Supported mode: one / all / fixed / fixed-percent / + random-max-percent' + enum: + - one + - all + - fixed + - fixed-percent + - random-max-percent + type: string + selector: + description: Selector is used to select pods that are + used to inject chaos action. + properties: + annotationSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can + be used to select objects. A selector based on annotations. + type: object + expressionSelectors: + description: a slice of label selector expressions + that can be used to select objects. A list of selectors + based on set-based label expressions. + items: + description: A label selector requirement is a selector + that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label key that the selector + applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are In, + NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. + If the operator is In or NotIn, the values + array must be non-empty. If the operator is + Exists or DoesNotExist, the values array must + be empty. This array is replaced during a + strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + fieldSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can + be used to select objects. A selector based on fields. + type: object + labelSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can + be used to select objects. A selector based on labels. + type: object + namespaces: + description: Namespaces is a set of namespace to which + objects belong. + items: + type: string + type: array + nodeSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can + be used to select nodes. Selector which must match + a node's labels, and objects must belong to these + selected nodes. + type: object + nodes: + description: Nodes is a set of node name and objects + must belong to these nodes. + items: + type: string + type: array + podPhaseSelectors: + description: 'PodPhaseSelectors is a set of condition + of a pod at the current time. supported value: Pending + / Running / Succeeded / Failed / Unknown' + items: + type: string + type: array + pods: + additionalProperties: + items: + type: string + type: array + description: Pods is a map of string keys and a set + values that used to select pods. The key defines + the namespace which pods belong, and the each values + is a set of pod names. + type: object type: object timeOffset: description: TimeOffset defines the delta time of injected @@ -9871,6 +12410,17 @@ spec: - awsRegion - ec2Instance type: object + conditionalTasks: + items: + properties: + expression: + type: string + task: + type: string + required: + - task + type: object + type: array deadline: format: date-time type: string @@ -13426,39 +15976,580 @@ spec: description: Duration represents the duration of the chaos action. type: string - ec2Instance: - description: Ec2Instance indicates the ID of the ec2 - instance. + ec2Instance: + description: Ec2Instance indicates the ID of the ec2 + instance. + type: string + endpoint: + description: Endpoint indicates the endpoint of the + aws server. Just used it in test now. + type: string + secretName: + description: SecretName defines the name of kubernetes + secret. + type: string + volumeID: + description: EbsVolume indicates the ID of the EBS + volume. Needed in detach-volume. + type: string + required: + - action + - awsRegion + - ec2Instance + type: object + conditionalTasks: + description: ConditionalTasks describes the conditional + branches of custom tasks. Only used when Type is TypeTask. + items: + properties: + expression: + type: string + task: + type: string + required: + - task + type: object + type: array + dnsChaos: + description: DNSChaosSpec defines the desired state of + DNSChaos + properties: + action: + description: 'Action defines the specific DNS chaos + action. Supported action: error, random Default + action: error' + enum: + - error + - random + type: string + containerNames: + description: ContainerNames indicates list of the + name of affected container. If not set, all containers + will be injected + items: + type: string + type: array + duration: + description: Duration represents the duration of the + chaos action + type: string + mode: + description: 'Mode defines the mode to run chaos action. + Supported mode: one / all / fixed / fixed-percent + / random-max-percent' + enum: + - one + - all + - fixed + - fixed-percent + - random-max-percent + type: string + patterns: + description: "Choose which domain names to take effect, + support the placeholder ? and wildcard *, or the + Specified domain name. Note: 1. The wildcard + * must be at the end of the string. For example, + chaos-*.org is invalid. 2. if the patterns + is empty, will take effect on all the domain names. + For example: \t\tThe value is [\"google.com\", \"github.*\", + \"chaos-mes?.org\"], \t\twill take effect on \"google.com\", + \"github.com\" and \"chaos-mesh.org\"" + items: + type: string + type: array + selector: + description: Selector is used to select pods that + are used to inject chaos action. + properties: + annotationSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select objects. A selector based + on annotations. + type: object + expressionSelectors: + description: a slice of label selector expressions + that can be used to select objects. A list of + selectors based on set-based label expressions. + items: + description: A label selector requirement is + a selector that contains values, a key, and + an operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If + the operator is Exists or DoesNotExist, + the values array must be empty. This array + is replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + fieldSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select objects. A selector based + on fields. + type: object + labelSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select objects. A selector based + on labels. + type: object + namespaces: + description: Namespaces is a set of namespace + to which objects belong. + items: + type: string + type: array + nodeSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select nodes. Selector which + must match a node's labels, and objects must + belong to these selected nodes. + type: object + nodes: + description: Nodes is a set of node name and objects + must belong to these nodes. + items: + type: string + type: array + podPhaseSelectors: + description: 'PodPhaseSelectors is a set of condition + of a pod at the current time. supported value: + Pending / Running / Succeeded / Failed / Unknown' + items: + type: string + type: array + pods: + additionalProperties: + items: + type: string + type: array + description: Pods is a map of string keys and + a set values that used to select pods. The key + defines the namespace which pods belong, and + the each values is a set of pod names. + type: object + type: object + value: + description: Value is required when the mode is set + to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. + If `FixedPodMode`, provide an integer of pods to + do chaos action. If `FixedPercentPodMod`, provide + a number from 0-100 to specify the percent of pods + the server can do chaos action. IF `RandomMaxPercentPodMod`, provide + a number from 0-100 to specify the max percent of + pods to do chaos action + type: string + required: + - action + - mode + - selector + type: object + duration: + type: string + gcpChaos: + description: GcpChaosSpec is the content of the specification + for a GcpChaos + properties: + action: + description: 'Action defines the specific gcp chaos + action. Supported action: node-stop / node-reset + / disk-loss Default action: node-stop' + enum: + - node-stop + - node-reset + - disk-loss + type: string + deviceNames: + description: The device name of disks to detach. Needed + in disk-loss. + items: + type: string + type: array + duration: + description: Duration represents the duration of the + chaos action. + type: string + instance: + description: Instance defines the name of the instance + type: string + project: + description: Project defines the name of gcp project. + type: string + secretName: + description: SecretName defines the name of kubernetes + secret. It is used for GCP credentials. + type: string + zone: + description: Zone defines the zone of gcp project. + type: string + required: + - action + - instance + - project + - zone + type: object + httpChaos: + properties: + abort: + description: Abort is a rule to abort a http session. + type: boolean + code: + description: Code is a rule to select target by http + status code in response. + format: int32 + type: integer + delay: + description: Delay represents the delay of the target + request/response. A duration string is a possibly + unsigned sequence of decimal numbers, each with + optional fraction and a unit suffix, such as "300ms", + "2h45m". Valid time units are "ns", "us" (or "µs"), + "ms", "s", "m", "h". + type: string + duration: + description: Duration represents the duration of the + chaos action. + type: string + method: + description: Method is a rule to select target by + http method in request. type: string - endpoint: - description: Endpoint indicates the endpoint of the - aws server. Just used it in test now. + mode: + description: 'Mode defines the mode to run chaos action. + Supported mode: one / all / fixed / fixed-percent + / random-max-percent' + enum: + - one + - all + - fixed + - fixed-percent + - random-max-percent type: string - secretName: - description: SecretName defines the name of kubernetes - secret. + patch: + description: Patch is a rule to patch some contents + in target. + properties: + body: + description: Body is a rule to patch message body + of target. + properties: + type: + description: Type represents the patch type, + only support `JSON` as [merge patch json](https://tools.ietf.org/html/rfc7396) + currently. + type: string + value: + description: Value is the patch contents. + type: string + required: + - type + - value + type: object + headers: + description: 'Headers is a rule to append http + headers of target. For example: `[["Set-Cookie", + ""], ["Set-Cookie", ""]]`.' + items: + items: + type: string + type: array + type: array + queries: + description: 'Queries is a rule to append uri + queries of target(Request only). For example: + `[["foo", "bar"], ["foo", "unknown"]]`.' + items: + items: + type: string + type: array + type: array + type: object + path: + description: Path is a rule to select target by uri + path in http request. type: string - volumeID: - description: EbsVolume indicates the ID of the EBS - volume. Needed in detach-volume. + port: + description: Port represents the target port to be + proxy of. + format: int32 + type: integer + replace: + description: Replace is a rule to replace some contents + in target. + properties: + body: + description: Body is a rule to replace http message + body in target. + format: byte + type: string + code: + description: Code is a rule to replace http status + code in response. + format: int32 + type: integer + headers: + additionalProperties: + type: string + description: Headers is a rule to replace http + headers of target. The key-value pairs represent + header name and header value pairs. + type: object + method: + description: Method is a rule to replace http + method in request. + type: string + path: + description: Path is rule to to replace uri path + in http request. + type: string + queries: + additionalProperties: + type: string + description: 'Queries is a rule to replace uri + queries in http request. For example, with value + `{ "foo": "unknown" }`, the `/?foo=bar` will + be altered to `/?foo=unknown`,' + type: object + type: object + request_headers: + additionalProperties: + type: string + description: RequestHeaders is a rule to select target + by http headers in request. The key-value pairs + represent header name and header value pairs. + type: object + response_headers: + additionalProperties: + type: string + description: ResponseHeaders is a rule to select target + by http headers in response. The key-value pairs + represent header name and header value pairs. + type: object + selector: + description: Selector is used to select pods that + are used to inject chaos action. + properties: + annotationSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select objects. A selector based + on annotations. + type: object + expressionSelectors: + description: a slice of label selector expressions + that can be used to select objects. A list of + selectors based on set-based label expressions. + items: + description: A label selector requirement is + a selector that contains values, a key, and + an operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If + the operator is Exists or DoesNotExist, + the values array must be empty. This array + is replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + fieldSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select objects. A selector based + on fields. + type: object + labelSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select objects. A selector based + on labels. + type: object + namespaces: + description: Namespaces is a set of namespace + to which objects belong. + items: + type: string + type: array + nodeSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select nodes. Selector which + must match a node's labels, and objects must + belong to these selected nodes. + type: object + nodes: + description: Nodes is a set of node name and objects + must belong to these nodes. + items: + type: string + type: array + podPhaseSelectors: + description: 'PodPhaseSelectors is a set of condition + of a pod at the current time. supported value: + Pending / Running / Succeeded / Failed / Unknown' + items: + type: string + type: array + pods: + additionalProperties: + items: + type: string + type: array + description: Pods is a map of string keys and + a set values that used to select pods. The key + defines the namespace which pods belong, and + the each values is a set of pod names. + type: object + type: object + target: + description: Target is the object to be selected and + injected. + enum: + - Request + - Response + type: string + value: + description: Value is required when the mode is set + to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. + If `FixedPodMode`, provide an integer of pods to + do chaos action. If `FixedPercentPodMod`, provide + a number from 0-100 to specify the percent of pods + the server can do chaos action. IF `RandomMaxPercentPodMod`, provide + a number from 0-100 to specify the max percent of + pods to do chaos action type: string required: - - action - - awsRegion - - ec2Instance + - mode + - selector + - target type: object - dnsChaos: - description: DNSChaosSpec defines the desired state of - DNSChaos + ioChaos: + description: IOChaosSpec defines the desired state of + IOChaos properties: action: - description: 'Action defines the specific DNS chaos - action. Supported action: error, random Default - action: error' + description: 'Action defines the specific pod chaos + action. Supported action: latency / fault / attrOverride + / mistake' enum: - - error - - random + - latency + - fault + - attrOverride + - mistake type: string + attr: + description: Attr defines the overrided attribution + properties: + atime: + description: Timespec represents a time + properties: + nsec: + format: int64 + type: integer + sec: + format: int64 + type: integer + required: + - nsec + - sec + type: object + blocks: + format: int64 + type: integer + ctime: + description: Timespec represents a time + properties: + nsec: + format: int64 + type: integer + sec: + format: int64 + type: integer + required: + - nsec + - sec + type: object + gid: + format: int32 + type: integer + ino: + format: int64 + type: integer + kind: + description: FileType represents type of a file + type: string + mtime: + description: Timespec represents a time + properties: + nsec: + format: int64 + type: integer + sec: + format: int64 + type: integer + required: + - nsec + - sec + type: object + nlink: + format: int32 + type: integer + perm: + type: integer + rdev: + format: int32 + type: integer + size: + format: int64 + type: integer + uid: + format: int32 + type: integer + type: object containerNames: description: ContainerNames indicates list of the name of affected container. If not set, all containers @@ -13466,10 +16557,58 @@ spec: items: type: string type: array + delay: + description: Delay defines the value of I/O chaos + action delay. A delay string is a possibly signed + sequence of decimal numbers, each with optional + fraction and a unit suffix, such as "300ms". Valid + time units are "ns", "us" (or "µs"), "ms", "s", + "m", "h". + type: string duration: description: Duration represents the duration of the - chaos action + chaos action. It is required when the action is + `PodFailureAction`. A duration string is a possibly + signed sequence of decimal numbers, each with optional + fraction and a unit suffix, such as "300ms", "-1.5h" + or "2h45m". Valid time units are "ns", "us" (or + "µs"), "ms", "s", "m", "h". type: string + errno: + description: 'Errno defines the error code that returned + by I/O action. refer to: https://www-numi.fnal.gov/offline_software/srt_public_context/WebDocs/Errors/unix_system_errors.html' + format: int32 + type: integer + methods: + description: 'Methods defines the I/O methods for + injecting I/O chaos action. default: all I/O methods.' + items: + type: string + type: array + mistake: + description: Mistake defines what types of incorrectness + are injected to IO operations + properties: + filling: + description: Filling determines what is filled + in the miskate data. + enum: + - zero + - random + type: string + maxLength: + description: Max length of each wrong data segment + in bytes + format: int64 + minimum: 1 + type: integer + maxOccurrences: + description: There will be [1, MaxOccurrences] + segments of wrong data. + format: int64 + minimum: 1 + type: integer + type: object mode: description: 'Mode defines the mode to run chaos action. Supported mode: one / all / fixed / fixed-percent @@ -13481,19 +16620,15 @@ spec: - fixed-percent - random-max-percent type: string - patterns: - description: "Choose which domain names to take effect, - support the placeholder ? and wildcard *, or the - Specified domain name. Note: 1. The wildcard - * must be at the end of the string. For example, - chaos-*.org is invalid. 2. if the patterns - is empty, will take effect on all the domain names. - For example: \t\tThe value is [\"google.com\", \"github.*\", - \"chaos-mes?.org\"], \t\twill take effect on \"google.com\", - \"github.com\" and \"chaos-mesh.org\"" - items: - type: string - type: array + path: + description: Path defines the path of files for injecting + I/O chaos action. + type: string + percent: + description: 'Percent defines the percentage of injection + errors and provides a number from 0-100. default: + 100.' + type: integer selector: description: Selector is used to select pods that are used to inject chaos action. @@ -13600,81 +16735,57 @@ spec: a number from 0-100 to specify the max percent of pods to do chaos action type: string + volumePath: + description: VolumePath represents the mount path + of injected volume + type: string required: - action - mode - selector + - volumePath type: object - duration: - type: string - gcpChaos: - description: GcpChaosSpec is the content of the specification - for a GcpChaos + jvmChaos: + description: JVMChaosSpec defines the desired state of + JVMChaos properties: action: - description: 'Action defines the specific gcp chaos - action. Supported action: node-stop / node-reset - / disk-loss Default action: node-stop' + description: 'Action defines the specific jvm chaos + action. Supported action: delay;return;script;cfl;oom;ccf;tce;cpf;tde;tpf' enum: - - node-stop - - node-reset - - disk-loss + - delay + - return + - script + - cfl + - oom + - ccf + - tce + - cpf + - tde + - tpf type: string - deviceNames: - description: The device name of disks to detach. Needed - in disk-loss. + containerNames: + description: ContainerNames indicates list of the + name of affected container. If not set, all containers + will be injected items: type: string type: array duration: description: Duration represents the duration of the - chaos action. - type: string - instance: - description: Instance defines the name of the instance - type: string - project: - description: Project defines the name of gcp project. - type: string - secretName: - description: SecretName defines the name of kubernetes - secret. It is used for GCP credentials. - type: string - zone: - description: Zone defines the zone of gcp project. - type: string - required: - - action - - instance - - project - - zone - type: object - httpChaos: - properties: - abort: - description: Abort is a rule to abort a http session. - type: boolean - code: - description: Code is a rule to select target by http - status code in response. - format: int32 - type: integer - delay: - description: Delay represents the delay of the target - request/response. A duration string is a possibly - unsigned sequence of decimal numbers, each with - optional fraction and a unit suffix, such as "300ms", - "2h45m". Valid time units are "ns", "us" (or "µs"), - "ms", "s", "m", "h". - type: string - duration: - description: Duration represents the duration of the - chaos action. - type: string - method: - description: Method is a rule to select target by - http method in request. + chaos action type: string + flags: + additionalProperties: + type: string + description: Flags represents the flags of action + type: object + matchers: + additionalProperties: + type: string + description: Matchers represents the matching rules + for the target + type: object mode: description: 'Mode defines the mode to run chaos action. Supported mode: one / all / fixed / fixed-percent @@ -13686,106 +16797,6 @@ spec: - fixed-percent - random-max-percent type: string - patch: - description: Patch is a rule to patch some contents - in target. - properties: - body: - description: Body is a rule to patch message body - of target. - properties: - type: - description: Type represents the patch type, - only support `JSON` as [merge patch json](https://tools.ietf.org/html/rfc7396) - currently. - type: string - value: - description: Value is the patch contents. - type: string - required: - - type - - value - type: object - headers: - description: 'Headers is a rule to append http - headers of target. For example: `[["Set-Cookie", - ""], ["Set-Cookie", ""]]`.' - items: - items: - type: string - type: array - type: array - queries: - description: 'Queries is a rule to append uri - queries of target(Request only). For example: - `[["foo", "bar"], ["foo", "unknown"]]`.' - items: - items: - type: string - type: array - type: array - type: object - path: - description: Path is a rule to select target by uri - path in http request. - type: string - port: - description: Port represents the target port to be - proxy of. - format: int32 - type: integer - replace: - description: Replace is a rule to replace some contents - in target. - properties: - body: - description: Body is a rule to replace http message - body in target. - format: byte - type: string - code: - description: Code is a rule to replace http status - code in response. - format: int32 - type: integer - headers: - additionalProperties: - type: string - description: Headers is a rule to replace http - headers of target. The key-value pairs represent - header name and header value pairs. - type: object - method: - description: Method is a rule to replace http - method in request. - type: string - path: - description: Path is rule to to replace uri path - in http request. - type: string - queries: - additionalProperties: - type: string - description: 'Queries is a rule to replace uri - queries in http request. For example, with value - `{ "foo": "unknown" }`, the `/?foo=bar` will - be altered to `/?foo=unknown`,' - type: object - type: object - request_headers: - additionalProperties: - type: string - description: RequestHeaders is a rule to select target - by http headers in request. The key-value pairs - represent header name and header value pairs. - type: object - response_headers: - additionalProperties: - type: string - description: ResponseHeaders is a rule to select target - by http headers in response. The key-value pairs - represent header name and header value pairs. - type: object selector: description: Selector is used to select pods that are used to inject chaos action. @@ -13883,11 +16894,22 @@ spec: type: object type: object target: - description: Target is the object to be selected and - injected. + description: 'Target defines the specific jvm chaos + target. Supported target: servlet;psql;jvm;jedis;http;dubbo;rocketmq;tars;mysql;druid;redisson;rabbitmq;mongodb' enum: - - Request - - Response + - servlet + - psql + - jvm + - jedis + - http + - dubbo + - rocketmq + - tars + - mysql + - druid + - redisson + - rabbitmq + - mongodb type: string value: description: Value is required when the mode is set @@ -13900,151 +16922,96 @@ spec: pods to do chaos action type: string required: + - action - mode - selector - target type: object - ioChaos: - description: IOChaosSpec defines the desired state of - IOChaos + kernelChaos: + description: KernelChaosSpec defines the desired state + of KernelChaos properties: - action: - description: 'Action defines the specific pod chaos - action. Supported action: latency / fault / attrOverride - / mistake' - enum: - - latency - - fault - - attrOverride - - mistake + duration: + description: Duration represents the duration of the + chaos action type: string - attr: - description: Attr defines the overrided attribution + failKernRequest: + description: FailKernRequest defines the request of + kernel injection properties: - atime: - description: Timespec represents a time - properties: - nsec: - format: int64 - type: integer - sec: - format: int64 - type: integer - required: - - nsec - - sec - type: object - blocks: - format: int64 - type: integer - ctime: - description: Timespec represents a time - properties: - nsec: - format: int64 - type: integer - sec: - format: int64 - type: integer - required: - - nsec - - sec - type: object - gid: - format: int32 - type: integer - ino: - format: int64 - type: integer - kind: - description: FileType represents type of a file - type: string - mtime: - description: Timespec represents a time - properties: - nsec: - format: int64 - type: integer - sec: - format: int64 - type: integer - required: - - nsec - - sec - type: object - nlink: + callchain: + description: 'Callchain indicate a special call + chain, such as: ext4_mount -> mount_subtree -> + ... -> should_failslab With an optional + set of predicates and an optional set of parameters, + which used with predicates. You can read call + chan and predicate examples from https://github.com/chaos-mesh/bpfki/tree/develop/examples + to learn more. If no special call chain, just + keep Callchain empty, which means it will fail + at any call chain with slab alloc (eg: kmalloc).' + items: + description: Frame defines the function signature + and predicate in function's body + properties: + funcname: + description: Funcname can be find from kernel + source or `/proc/kallsyms`, such as `ext4_mount` + type: string + parameters: + description: Parameters is used with predicate, + for example, if you want to inject slab + error in `d_alloc_parallel(struct dentry + *parent, const struct qstr *name)` with + a special name `bananas`, you need to + set it to `struct dentry *parent, const + struct qstr *name` otherwise omit it. + type: string + predicate: + description: Predicate will access the arguments + of this Frame, example with Parameters's, + you can set it to `STRNCMP(name->name, + "bananas", 8)` to make inject only with + it, or omit it to inject for all d_alloc_parallel + call chain. + type: string + type: object + type: array + failtype: + description: 'FailType indicates what to fail, + can be set to ''0'' / ''1'' / ''2'' If `0`, + indicates slab to fail (should_failslab) If + `1`, indicates alloc_page to fail (should_fail_alloc_page) + If `2`, indicates bio to fail (should_fail_bio) + You can read: 1. https://www.kernel.org/doc/html/latest/fault-injection/fault-injection.html 2. + http://github.com/iovisor/bcc/blob/master/tools/inject_example.txt + to learn more' format: int32 + maximum: 2 + minimum: 0 type: integer - perm: - type: integer - rdev: + headers: + description: 'Headers indicates the appropriate + kernel headers you need. Eg: "linux/mmzone.h", + "linux/blkdev.h" and so on' + items: + type: string + type: array + probability: + description: Probability indicates the fails with + probability. If you want 1%, please set this + field with 1. format: int32 + maximum: 100 + minimum: 0 type: integer - size: - format: int64 - type: integer - uid: + times: + description: Times indicates the max times of + fails. format: int32 + minimum: 0 type: integer - type: object - containerNames: - description: ContainerNames indicates list of the - name of affected container. If not set, all containers - will be injected - items: - type: string - type: array - delay: - description: Delay defines the value of I/O chaos - action delay. A delay string is a possibly signed - sequence of decimal numbers, each with optional - fraction and a unit suffix, such as "300ms". Valid - time units are "ns", "us" (or "µs"), "ms", "s", - "m", "h". - type: string - duration: - description: Duration represents the duration of the - chaos action. It is required when the action is - `PodFailureAction`. A duration string is a possibly - signed sequence of decimal numbers, each with optional - fraction and a unit suffix, such as "300ms", "-1.5h" - or "2h45m". Valid time units are "ns", "us" (or - "µs"), "ms", "s", "m", "h". - type: string - errno: - description: 'Errno defines the error code that returned - by I/O action. refer to: https://www-numi.fnal.gov/offline_software/srt_public_context/WebDocs/Errors/unix_system_errors.html' - format: int32 - type: integer - methods: - description: 'Methods defines the I/O methods for - injecting I/O chaos action. default: all I/O methods.' - items: - type: string - type: array - mistake: - description: Mistake defines what types of incorrectness - are injected to IO operations - properties: - filling: - description: Filling determines what is filled - in the miskate data. - enum: - - zero - - random - type: string - maxLength: - description: Max length of each wrong data segment - in bytes - format: int64 - minimum: 1 - type: integer - maxOccurrences: - description: There will be [1, MaxOccurrences] - segments of wrong data. - format: int64 - minimum: 1 - type: integer + required: + - failtype type: object mode: description: 'Mode defines the mode to run chaos action. @@ -14057,15 +17024,6 @@ spec: - fixed-percent - random-max-percent type: string - path: - description: Path defines the path of files for injecting - I/O chaos action. - type: string - percent: - description: 'Percent defines the percentage of injection - errors and provides a number from 0-100. default: - 100.' - type: integer selector: description: Selector is used to select pods that are used to inject chaos action. @@ -14172,56 +17130,158 @@ spec: a number from 0-100 to specify the max percent of pods to do chaos action type: string - volumePath: - description: VolumePath represents the mount path - of injected volume - type: string required: - - action + - failKernRequest - mode - selector - - volumePath type: object - jvmChaos: - description: JVMChaosSpec defines the desired state of - JVMChaos + name: + type: string + networkChaos: + description: NetworkChaosSpec defines the desired state + of NetworkChaos properties: action: - description: 'Action defines the specific jvm chaos - action. Supported action: delay;return;script;cfl;oom;ccf;tce;cpf;tde;tpf' + description: 'Action defines the specific network + chaos action. Supported action: partition, netem, + delay, loss, duplicate, corrupt Default action: + delay' enum: + - netem - delay - - return - - script - - cfl - - oom - - ccf - - tce - - cpf - - tde - - tpf + - loss + - duplicate + - corrupt + - partition + - bandwidth type: string - containerNames: - description: ContainerNames indicates list of the - name of affected container. If not set, all containers - will be injected - items: - type: string - type: array + bandwidth: + description: Bandwidth represents the detail about + bandwidth control action + properties: + buffer: + description: Buffer is the maximum amount of bytes + that tokens can be available for instantaneously. + format: int32 + minimum: 1 + type: integer + limit: + description: Limit is the number of bytes that + can be queued waiting for tokens to become available. + format: int32 + minimum: 1 + type: integer + minburst: + description: Minburst specifies the size of the + peakrate bucket. For perfect accuracy, should + be set to the MTU of the interface. If a peakrate + is needed, but some burstiness is acceptable, + this size can be raised. A 3000 byte minburst + allows around 3mbit/s of peakrate, given 1000 + byte packets. + format: int32 + minimum: 0 + type: integer + peakrate: + description: Peakrate is the maximum depletion + rate of the bucket. The peakrate does not need + to be set, it is only necessary if perfect millisecond + timescale shaping is required. + format: int64 + minimum: 0 + type: integer + rate: + description: Rate is the speed knob. Allows bps, + kbps, mbps, gbps, tbps unit. bps means bytes + per second. + type: string + required: + - buffer + - limit + - rate + type: object + corrupt: + description: Corrupt represents the detail about corrupt + action + properties: + correlation: + type: string + corrupt: + type: string + required: + - correlation + - corrupt + type: object + delay: + description: Delay represents the detail about delay + action + properties: + correlation: + type: string + jitter: + type: string + latency: + type: string + reorder: + description: ReorderSpec defines details of packet + reorder. + properties: + correlation: + type: string + gap: + type: integer + reorder: + type: string + required: + - correlation + - gap + - reorder + type: object + required: + - latency + type: object + direction: + description: Direction represents the direction, this + applies on netem and network partition action + enum: + - to + - from + - both + - "" + type: string + duplicate: + description: DuplicateSpec represents the detail about + loss action + properties: + correlation: + type: string + duplicate: + type: string + required: + - correlation + - duplicate + type: object duration: description: Duration represents the duration of the chaos action type: string - flags: - additionalProperties: - type: string - description: Flags represents the flags of action - type: object - matchers: - additionalProperties: + externalTargets: + description: ExternalTargets represents network targets + outside k8s + items: type: string - description: Matchers represents the matching rules - for the target + type: array + loss: + description: Loss represents the detail about loss + action + properties: + correlation: + type: string + loss: + type: string + required: + - correlation + - loss type: object mode: description: 'Mode defines the mode to run chaos action. @@ -14331,23 +17391,136 @@ spec: type: object type: object target: - description: 'Target defines the specific jvm chaos - target. Supported target: servlet;psql;jvm;jedis;http;dubbo;rocketmq;tars;mysql;druid;redisson;rabbitmq;mongodb' - enum: - - servlet - - psql - - jvm - - jedis - - http - - dubbo - - rocketmq - - tars - - mysql - - druid - - redisson - - rabbitmq - - mongodb - type: string + description: Target represents network target, this + applies on netem and network partition action + properties: + mode: + description: 'Mode defines the mode to run chaos + action. Supported mode: one / all / fixed / + fixed-percent / random-max-percent' + enum: + - one + - all + - fixed + - fixed-percent + - random-max-percent + type: string + selector: + description: Selector is used to select pods that + are used to inject chaos action. + properties: + annotationSelectors: + additionalProperties: + type: string + description: Map of string keys and values + that can be used to select objects. A selector + based on annotations. + type: object + expressionSelectors: + description: a slice of label selector expressions + that can be used to select objects. A list + of selectors based on set-based label expressions. + items: + description: A label selector requirement + is a selector that contains values, a + key, and an operator that relates the + key and values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + fieldSelectors: + additionalProperties: + type: string + description: Map of string keys and values + that can be used to select objects. A selector + based on fields. + type: object + labelSelectors: + additionalProperties: + type: string + description: Map of string keys and values + that can be used to select objects. A selector + based on labels. + type: object + namespaces: + description: Namespaces is a set of namespace + to which objects belong. + items: + type: string + type: array + nodeSelectors: + additionalProperties: + type: string + description: Map of string keys and values + that can be used to select nodes. Selector + which must match a node's labels, and objects + must belong to these selected nodes. + type: object + nodes: + description: Nodes is a set of node name and + objects must belong to these nodes. + items: + type: string + type: array + podPhaseSelectors: + description: 'PodPhaseSelectors is a set of + condition of a pod at the current time. + supported value: Pending / Running / Succeeded + / Failed / Unknown' + items: + type: string + type: array + pods: + additionalProperties: + items: + type: string + type: array + description: Pods is a map of string keys + and a set values that used to select pods. + The key defines the namespace which pods + belong, and the each values is a set of + pod names. + type: object + type: object + value: + description: Value is required when the mode is + set to `FixedPodMode` / `FixedPercentPodMod` + / `RandomMaxPercentPodMod`. If `FixedPodMode`, + provide an integer of pods to do chaos action. + If `FixedPercentPodMod`, provide a number from + 0-100 to specify the percent of pods the server + can do chaos action. IF `RandomMaxPercentPodMod`, provide + a number from 0-100 to specify the max percent + of pods to do chaos action + type: string + required: + - mode + - selector + type: object value: description: Value is required when the mode is set to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. @@ -14362,94 +17535,45 @@ spec: - action - mode - selector - - target type: object - kernelChaos: - description: KernelChaosSpec defines the desired state - of KernelChaos + podChaos: + description: PodChaosSpec defines the attributes that + a user creates on a chaos experiment about pods. properties: + action: + description: 'Action defines the specific pod chaos + action. Supported action: pod-kill / pod-failure + / container-kill Default action: pod-kill' + enum: + - pod-kill + - pod-failure + - container-kill + type: string + containerNames: + description: ContainerNames indicates list of the + name of affected container. If not set, all containers + will be injected + items: + type: string + type: array duration: description: Duration represents the duration of the - chaos action - type: string - failKernRequest: - description: FailKernRequest defines the request of - kernel injection - properties: - callchain: - description: 'Callchain indicate a special call - chain, such as: ext4_mount -> mount_subtree -> - ... -> should_failslab With an optional - set of predicates and an optional set of parameters, - which used with predicates. You can read call - chan and predicate examples from https://github.com/chaos-mesh/bpfki/tree/develop/examples - to learn more. If no special call chain, just - keep Callchain empty, which means it will fail - at any call chain with slab alloc (eg: kmalloc).' - items: - description: Frame defines the function signature - and predicate in function's body - properties: - funcname: - description: Funcname can be find from kernel - source or `/proc/kallsyms`, such as `ext4_mount` - type: string - parameters: - description: Parameters is used with predicate, - for example, if you want to inject slab - error in `d_alloc_parallel(struct dentry - *parent, const struct qstr *name)` with - a special name `bananas`, you need to - set it to `struct dentry *parent, const - struct qstr *name` otherwise omit it. - type: string - predicate: - description: Predicate will access the arguments - of this Frame, example with Parameters's, - you can set it to `STRNCMP(name->name, - "bananas", 8)` to make inject only with - it, or omit it to inject for all d_alloc_parallel - call chain. - type: string - type: object - type: array - failtype: - description: 'FailType indicates what to fail, - can be set to ''0'' / ''1'' / ''2'' If `0`, - indicates slab to fail (should_failslab) If - `1`, indicates alloc_page to fail (should_fail_alloc_page) - If `2`, indicates bio to fail (should_fail_bio) - You can read: 1. https://www.kernel.org/doc/html/latest/fault-injection/fault-injection.html 2. - http://github.com/iovisor/bcc/blob/master/tools/inject_example.txt - to learn more' - format: int32 - maximum: 2 - minimum: 0 - type: integer - headers: - description: 'Headers indicates the appropriate - kernel headers you need. Eg: "linux/mmzone.h", - "linux/blkdev.h" and so on' - items: - type: string - type: array - probability: - description: Probability indicates the fails with - probability. If you want 1%, please set this - field with 1. - format: int32 - maximum: 100 - minimum: 0 - type: integer - times: - description: Times indicates the max times of - fails. - format: int32 - minimum: 0 - type: integer - required: - - failtype - type: object + chaos action. It is required when the action is + `PodFailureAction`. A duration string is a possibly + signed sequence of decimal numbers, each with optional + fraction and a unit suffix, such as "300ms", "-1.5h" + or "2h45m". Valid time units are "ns", "us" (or + "µs"), "ms", "s", "m", "h". + type: string + gracePeriod: + description: GracePeriod is used in pod-kill action. + It represents the duration in seconds before the + pod should be deleted. Value must be non-negative + integer. The default value is zero that indicates + delete immediately. + format: int64 + minimum: 0 + type: integer mode: description: 'Mode defines the mode to run chaos action. Supported mode: one / all / fixed / fixed-percent @@ -14485,352 +17609,769 @@ spec: description: key is the label key that the selector applies to. type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and DoesNotExist. + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If + the operator is Exists or DoesNotExist, + the values array must be empty. This array + is replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + fieldSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select objects. A selector based + on fields. + type: object + labelSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select objects. A selector based + on labels. + type: object + namespaces: + description: Namespaces is a set of namespace + to which objects belong. + items: + type: string + type: array + nodeSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select nodes. Selector which + must match a node's labels, and objects must + belong to these selected nodes. + type: object + nodes: + description: Nodes is a set of node name and objects + must belong to these nodes. + items: + type: string + type: array + podPhaseSelectors: + description: 'PodPhaseSelectors is a set of condition + of a pod at the current time. supported value: + Pending / Running / Succeeded / Failed / Unknown' + items: + type: string + type: array + pods: + additionalProperties: + items: + type: string + type: array + description: Pods is a map of string keys and + a set values that used to select pods. The key + defines the namespace which pods belong, and + the each values is a set of pod names. + type: object + type: object + value: + description: Value is required when the mode is set + to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. + If `FixedPodMode`, provide an integer of pods to + do chaos action. If `FixedPercentPodMod`, provide + a number from 0-100 to specify the percent of pods + the server can do chaos action. IF `RandomMaxPercentPodMod`, provide + a number from 0-100 to specify the max percent of + pods to do chaos action + type: string + required: + - action + - mode + - selector + type: object + schedule: + description: Schedule describe the Schedule(describing + scheduled chaos) to be injected with chaos nodes. Only + used when Type is TypeSchedule. + properties: + awsChaos: + description: AwsChaosSpec is the content of the specification + for an AwsChaos + properties: + action: + description: 'Action defines the specific aws + chaos action. Supported action: ec2-stop / ec2-restart + / detach-volume Default action: ec2-stop' + enum: + - ec2-stop + - ec2-restart + - detach-volume + type: string + awsRegion: + description: AwsRegion defines the region of aws. + type: string + deviceName: + description: DeviceName indicates the name of + the device. Needed in detach-volume. + type: string + duration: + description: Duration represents the duration + of the chaos action. + type: string + ec2Instance: + description: Ec2Instance indicates the ID of the + ec2 instance. + type: string + endpoint: + description: Endpoint indicates the endpoint of + the aws server. Just used it in test now. + type: string + secretName: + description: SecretName defines the name of kubernetes + secret. + type: string + volumeID: + description: EbsVolume indicates the ID of the + EBS volume. Needed in detach-volume. + type: string + required: + - action + - awsRegion + - ec2Instance + type: object + concurrencyPolicy: + enum: + - Forbid + - Allow + type: string + dnsChaos: + description: DNSChaosSpec defines the desired state + of DNSChaos + properties: + action: + description: 'Action defines the specific DNS + chaos action. Supported action: error, random + Default action: error' + enum: + - error + - random + type: string + containerNames: + description: ContainerNames indicates list of + the name of affected container. If not set, + all containers will be injected + items: + type: string + type: array + duration: + description: Duration represents the duration + of the chaos action + type: string + mode: + description: 'Mode defines the mode to run chaos + action. Supported mode: one / all / fixed / + fixed-percent / random-max-percent' + enum: + - one + - all + - fixed + - fixed-percent + - random-max-percent + type: string + patterns: + description: "Choose which domain names to take + effect, support the placeholder ? and wildcard + *, or the Specified domain name. Note: 1. + The wildcard * must be at the end of the string. + For example, chaos-*.org is invalid. 2. + if the patterns is empty, will take effect on + all the domain names. For example: \t\tThe value + is [\"google.com\", \"github.*\", \"chaos-mes?.org\"], + \t\twill take effect on \"google.com\", \"github.com\" + and \"chaos-mesh.org\"" + items: + type: string + type: array + selector: + description: Selector is used to select pods that + are used to inject chaos action. + properties: + annotationSelectors: + additionalProperties: + type: string + description: Map of string keys and values + that can be used to select objects. A selector + based on annotations. + type: object + expressionSelectors: + description: a slice of label selector expressions + that can be used to select objects. A list + of selectors based on set-based label expressions. + items: + description: A label selector requirement + is a selector that contains values, a + key, and an operator that relates the + key and values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + fieldSelectors: + additionalProperties: + type: string + description: Map of string keys and values + that can be used to select objects. A selector + based on fields. + type: object + labelSelectors: + additionalProperties: + type: string + description: Map of string keys and values + that can be used to select objects. A selector + based on labels. + type: object + namespaces: + description: Namespaces is a set of namespace + to which objects belong. + items: type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If - the operator is Exists or DoesNotExist, - the values array must be empty. This array - is replaced during a strategic merge patch. + type: array + nodeSelectors: + additionalProperties: + type: string + description: Map of string keys and values + that can be used to select nodes. Selector + which must match a node's labels, and objects + must belong to these selected nodes. + type: object + nodes: + description: Nodes is a set of node name and + objects must belong to these nodes. + items: + type: string + type: array + podPhaseSelectors: + description: 'PodPhaseSelectors is a set of + condition of a pod at the current time. + supported value: Pending / Running / Succeeded + / Failed / Unknown' + items: + type: string + type: array + pods: + additionalProperties: items: type: string type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which - must match a node's labels, and objects must - belong to these selected nodes. + description: Pods is a map of string keys + and a set values that used to select pods. + The key defines the namespace which pods + belong, and the each values is a set of + pod names. + type: object type: object - nodes: - description: Nodes is a set of node name and objects - must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: - Pending / Running / Succeeded / Failed / Unknown' + value: + description: Value is required when the mode is + set to `FixedPodMode` / `FixedPercentPodMod` + / `RandomMaxPercentPodMod`. If `FixedPodMode`, + provide an integer of pods to do chaos action. + If `FixedPercentPodMod`, provide a number from + 0-100 to specify the percent of pods the server + can do chaos action. IF `RandomMaxPercentPodMod`, provide + a number from 0-100 to specify the max percent + of pods to do chaos action + type: string + required: + - action + - mode + - selector + type: object + gcpChaos: + description: GcpChaosSpec is the content of the specification + for a GcpChaos + properties: + action: + description: 'Action defines the specific gcp + chaos action. Supported action: node-stop / + node-reset / disk-loss Default action: node-stop' + enum: + - node-stop + - node-reset + - disk-loss + type: string + deviceNames: + description: The device name of disks to detach. + Needed in disk-loss. items: type: string type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and - a set values that used to select pods. The key - defines the namespace which pods belong, and - the each values is a set of pod names. - type: object - type: object - value: - description: Value is required when the mode is set - to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. - If `FixedPodMode`, provide an integer of pods to - do chaos action. If `FixedPercentPodMod`, provide - a number from 0-100 to specify the percent of pods - the server can do chaos action. IF `RandomMaxPercentPodMod`, provide - a number from 0-100 to specify the max percent of - pods to do chaos action - type: string - required: - - failKernRequest - - mode - - selector - type: object - name: - type: string - networkChaos: - description: NetworkChaosSpec defines the desired state - of NetworkChaos - properties: - action: - description: 'Action defines the specific network - chaos action. Supported action: partition, netem, - delay, loss, duplicate, corrupt Default action: - delay' - enum: - - netem - - delay - - loss - - duplicate - - corrupt - - partition - - bandwidth - type: string - bandwidth: - description: Bandwidth represents the detail about - bandwidth control action - properties: - buffer: - description: Buffer is the maximum amount of bytes - that tokens can be available for instantaneously. - format: int32 - minimum: 1 - type: integer - limit: - description: Limit is the number of bytes that - can be queued waiting for tokens to become available. - format: int32 - minimum: 1 - type: integer - minburst: - description: Minburst specifies the size of the - peakrate bucket. For perfect accuracy, should - be set to the MTU of the interface. If a peakrate - is needed, but some burstiness is acceptable, - this size can be raised. A 3000 byte minburst - allows around 3mbit/s of peakrate, given 1000 - byte packets. - format: int32 - minimum: 0 - type: integer - peakrate: - description: Peakrate is the maximum depletion - rate of the bucket. The peakrate does not need - to be set, it is only necessary if perfect millisecond - timescale shaping is required. - format: int64 - minimum: 0 - type: integer - rate: - description: Rate is the speed knob. Allows bps, - kbps, mbps, gbps, tbps unit. bps means bytes - per second. + duration: + description: Duration represents the duration + of the chaos action. + type: string + instance: + description: Instance defines the name of the + instance + type: string + project: + description: Project defines the name of gcp project. + type: string + secretName: + description: SecretName defines the name of kubernetes + secret. It is used for GCP credentials. + type: string + zone: + description: Zone defines the zone of gcp project. type: string required: - - buffer - - limit - - rate + - action + - instance + - project + - zone type: object - corrupt: - description: Corrupt represents the detail about corrupt - action + historyLimit: + minimum: 1 + type: integer + httpChaos: properties: - correlation: + abort: + description: Abort is a rule to abort a http session. + type: boolean + code: + description: Code is a rule to select target by + http status code in response. + format: int32 + type: integer + delay: + description: Delay represents the delay of the + target request/response. A duration string is + a possibly unsigned sequence of decimal numbers, + each with optional fraction and a unit suffix, + such as "300ms", "2h45m". Valid time units are + "ns", "us" (or "µs"), "ms", "s", "m", "h". type: string - corrupt: + duration: + description: Duration represents the duration + of the chaos action. type: string - required: - - correlation - - corrupt - type: object - delay: - description: Delay represents the detail about delay - action - properties: - correlation: + method: + description: Method is a rule to select target + by http method in request. type: string - jitter: + mode: + description: 'Mode defines the mode to run chaos + action. Supported mode: one / all / fixed / + fixed-percent / random-max-percent' + enum: + - one + - all + - fixed + - fixed-percent + - random-max-percent type: string - latency: + patch: + description: Patch is a rule to patch some contents + in target. + properties: + body: + description: Body is a rule to patch message + body of target. + properties: + type: + description: Type represents the patch + type, only support `JSON` as [merge + patch json](https://tools.ietf.org/html/rfc7396) + currently. + type: string + value: + description: Value is the patch contents. + type: string + required: + - type + - value + type: object + headers: + description: 'Headers is a rule to append + http headers of target. For example: `[["Set-Cookie", + ""], ["Set-Cookie", ""]]`.' + items: + items: + type: string + type: array + type: array + queries: + description: 'Queries is a rule to append + uri queries of target(Request only). For + example: `[["foo", "bar"], ["foo", "unknown"]]`.' + items: + items: + type: string + type: array + type: array + type: object + path: + description: Path is a rule to select target by + uri path in http request. type: string - reorder: - description: ReorderSpec defines details of packet - reorder. + port: + description: Port represents the target port to + be proxy of. + format: int32 + type: integer + replace: + description: Replace is a rule to replace some + contents in target. properties: - correlation: + body: + description: Body is a rule to replace http + message body in target. + format: byte type: string - gap: + code: + description: Code is a rule to replace http + status code in response. + format: int32 type: integer - reorder: + headers: + additionalProperties: + type: string + description: Headers is a rule to replace + http headers of target. The key-value pairs + represent header name and header value pairs. + type: object + method: + description: Method is a rule to replace http + method in request. type: string - required: - - correlation - - gap - - reorder + path: + description: Path is rule to to replace uri + path in http request. + type: string + queries: + additionalProperties: + type: string + description: 'Queries is a rule to replace + uri queries in http request. For example, + with value `{ "foo": "unknown" }`, the `/?foo=bar` + will be altered to `/?foo=unknown`,' + type: object type: object - required: - - latency - type: object - direction: - description: Direction represents the direction, this - applies on netem and network partition action - enum: - - to - - from - - both - - "" - type: string - duplicate: - description: DuplicateSpec represents the detail about - loss action - properties: - correlation: - type: string - duplicate: - type: string - required: - - correlation - - duplicate - type: object - duration: - description: Duration represents the duration of the - chaos action - type: string - externalTargets: - description: ExternalTargets represents network targets - outside k8s - items: - type: string - type: array - loss: - description: Loss represents the detail about loss - action - properties: - correlation: - type: string - loss: - type: string - required: - - correlation - - loss - type: object - mode: - description: 'Mode defines the mode to run chaos action. - Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - selector: - description: Selector is used to select pods that - are used to inject chaos action. - properties: - annotationSelectors: + request_headers: additionalProperties: type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on annotations. + description: RequestHeaders is a rule to select + target by http headers in request. The key-value + pairs represent header name and header value + pairs. type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list of - selectors based on set-based label expressions. - items: - description: A label selector requirement is - a selector that contains values, a key, and - an operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. + response_headers: + additionalProperties: + type: string + description: ResponseHeaders is a rule to select + target by http headers in response. The key-value + pairs represent header name and header value + pairs. + type: object + selector: + description: Selector is used to select pods that + are used to inject chaos action. + properties: + annotationSelectors: + additionalProperties: + type: string + description: Map of string keys and values + that can be used to select objects. A selector + based on annotations. + type: object + expressionSelectors: + description: a slice of label selector expressions + that can be used to select objects. A list + of selectors based on set-based label expressions. + items: + description: A label selector requirement + is a selector that contains values, a + key, and an operator that relates the + key and values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + fieldSelectors: + additionalProperties: type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and DoesNotExist. + description: Map of string keys and values + that can be used to select objects. A selector + based on fields. + type: object + labelSelectors: + additionalProperties: type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If - the operator is Exists or DoesNotExist, - the values array must be empty. This array - is replaced during a strategic merge patch. + description: Map of string keys and values + that can be used to select objects. A selector + based on labels. + type: object + namespaces: + description: Namespaces is a set of namespace + to which objects belong. + items: + type: string + type: array + nodeSelectors: + additionalProperties: + type: string + description: Map of string keys and values + that can be used to select nodes. Selector + which must match a node's labels, and objects + must belong to these selected nodes. + type: object + nodes: + description: Nodes is a set of node name and + objects must belong to these nodes. + items: + type: string + type: array + podPhaseSelectors: + description: 'PodPhaseSelectors is a set of + condition of a pod at the current time. + supported value: Pending / Running / Succeeded + / Failed / Unknown' + items: + type: string + type: array + pods: + additionalProperties: items: type: string type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on labels. + description: Pods is a map of string keys + and a set values that used to select pods. + The key defines the namespace which pods + belong, and the each values is a set of + pod names. + type: object type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which - must match a node's labels, and objects must - belong to these selected nodes. + target: + description: Target is the object to be selected + and injected. + enum: + - Request + - Response + type: string + value: + description: Value is required when the mode is + set to `FixedPodMode` / `FixedPercentPodMod` + / `RandomMaxPercentPodMod`. If `FixedPodMode`, + provide an integer of pods to do chaos action. + If `FixedPercentPodMod`, provide a number from + 0-100 to specify the percent of pods the server + can do chaos action. IF `RandomMaxPercentPodMod`, provide + a number from 0-100 to specify the max percent + of pods to do chaos action + type: string + required: + - mode + - selector + - target + type: object + ioChaos: + description: IOChaosSpec defines the desired state + of IOChaos + properties: + action: + description: 'Action defines the specific pod + chaos action. Supported action: latency / fault + / attrOverride / mistake' + enum: + - latency + - fault + - attrOverride + - mistake + type: string + attr: + description: Attr defines the overrided attribution + properties: + atime: + description: Timespec represents a time + properties: + nsec: + format: int64 + type: integer + sec: + format: int64 + type: integer + required: + - nsec + - sec + type: object + blocks: + format: int64 + type: integer + ctime: + description: Timespec represents a time + properties: + nsec: + format: int64 + type: integer + sec: + format: int64 + type: integer + required: + - nsec + - sec + type: object + gid: + format: int32 + type: integer + ino: + format: int64 + type: integer + kind: + description: FileType represents type of a + file + type: string + mtime: + description: Timespec represents a time + properties: + nsec: + format: int64 + type: integer + sec: + format: int64 + type: integer + required: + - nsec + - sec + type: object + nlink: + format: int32 + type: integer + perm: + type: integer + rdev: + format: int32 + type: integer + size: + format: int64 + type: integer + uid: + format: int32 + type: integer type: object - nodes: - description: Nodes is a set of node name and objects - must belong to these nodes. + containerNames: + description: ContainerNames indicates list of + the name of affected container. If not set, + all containers will be injected items: type: string type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: - Pending / Running / Succeeded / Failed / Unknown' + delay: + description: Delay defines the value of I/O chaos + action delay. A delay string is a possibly signed + sequence of decimal numbers, each with optional + fraction and a unit suffix, such as "300ms". + Valid time units are "ns", "us" (or "µs"), "ms", + "s", "m", "h". + type: string + duration: + description: Duration represents the duration + of the chaos action. It is required when the + action is `PodFailureAction`. A duration string + is a possibly signed sequence of decimal numbers, + each with optional fraction and a unit suffix, + such as "300ms", "-1.5h" or "2h45m". Valid time + units are "ns", "us" (or "µs"), "ms", "s", "m", + "h". + type: string + errno: + description: 'Errno defines the error code that + returned by I/O action. refer to: https://www-numi.fnal.gov/offline_software/srt_public_context/WebDocs/Errors/unix_system_errors.html' + format: int32 + type: integer + methods: + description: 'Methods defines the I/O methods + for injecting I/O chaos action. default: all + I/O methods.' items: type: string type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and - a set values that used to select pods. The key - defines the namespace which pods belong, and - the each values is a set of pod names. + mistake: + description: Mistake defines what types of incorrectness + are injected to IO operations + properties: + filling: + description: Filling determines what is filled + in the miskate data. + enum: + - zero + - random + type: string + maxLength: + description: Max length of each wrong data + segment in bytes + format: int64 + minimum: 1 + type: integer + maxOccurrences: + description: There will be [1, MaxOccurrences] + segments of wrong data. + format: int64 + minimum: 1 + type: integer type: object - type: object - target: - description: Target represents network target, this - applies on netem and network partition action - properties: mode: description: 'Mode defines the mode to run chaos action. Supported mode: one / all / fixed / @@ -14842,6 +18383,15 @@ spec: - fixed-percent - random-max-percent type: string + path: + description: Path defines the path of files for + injecting I/O chaos action. + type: string + percent: + description: 'Percent defines the percentage of + injection errors and provides a number from + 0-100. default: 100.' + type: integer selector: description: Selector is used to select pods that are used to inject chaos action. @@ -14954,263 +18504,295 @@ spec: a number from 0-100 to specify the max percent of pods to do chaos action type: string + volumePath: + description: VolumePath represents the mount path + of injected volume + type: string required: + - action - mode - selector + - volumePath type: object - value: - description: Value is required when the mode is set - to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. - If `FixedPodMode`, provide an integer of pods to - do chaos action. If `FixedPercentPodMod`, provide - a number from 0-100 to specify the percent of pods - the server can do chaos action. IF `RandomMaxPercentPodMod`, provide - a number from 0-100 to specify the max percent of - pods to do chaos action - type: string - required: - - action - - mode - - selector - type: object - podChaos: - description: PodChaosSpec defines the attributes that - a user creates on a chaos experiment about pods. - properties: - action: - description: 'Action defines the specific pod chaos - action. Supported action: pod-kill / pod-failure - / container-kill Default action: pod-kill' - enum: - - pod-kill - - pod-failure - - container-kill - type: string - containerNames: - description: ContainerNames indicates list of the - name of affected container. If not set, all containers - will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of the - chaos action. It is required when the action is - `PodFailureAction`. A duration string is a possibly - signed sequence of decimal numbers, each with optional - fraction and a unit suffix, such as "300ms", "-1.5h" - or "2h45m". Valid time units are "ns", "us" (or - "µs"), "ms", "s", "m", "h". - type: string - gracePeriod: - description: GracePeriod is used in pod-kill action. - It represents the duration in seconds before the - pod should be deleted. Value must be non-negative - integer. The default value is zero that indicates - delete immediately. - format: int64 - minimum: 0 - type: integer - mode: - description: 'Mode defines the mode to run chaos action. - Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - selector: - description: Selector is used to select pods that - are used to inject chaos action. + jvmChaos: + description: JVMChaosSpec defines the desired state + of JVMChaos properties: - annotationSelectors: + action: + description: 'Action defines the specific jvm + chaos action. Supported action: delay;return;script;cfl;oom;ccf;tce;cpf;tde;tpf' + enum: + - delay + - return + - script + - cfl + - oom + - ccf + - tce + - cpf + - tde + - tpf + type: string + containerNames: + description: ContainerNames indicates list of + the name of affected container. If not set, + all containers will be injected + items: + type: string + type: array + duration: + description: Duration represents the duration + of the chaos action + type: string + flags: additionalProperties: type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on annotations. + description: Flags represents the flags of action type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list of - selectors based on set-based label expressions. - items: - description: A label selector requirement is - a selector that contains values, a key, and - an operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. + matchers: + additionalProperties: + type: string + description: Matchers represents the matching + rules for the target + type: object + mode: + description: 'Mode defines the mode to run chaos + action. Supported mode: one / all / fixed / + fixed-percent / random-max-percent' + enum: + - one + - all + - fixed + - fixed-percent + - random-max-percent + type: string + selector: + description: Selector is used to select pods that + are used to inject chaos action. + properties: + annotationSelectors: + additionalProperties: type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and DoesNotExist. + description: Map of string keys and values + that can be used to select objects. A selector + based on annotations. + type: object + expressionSelectors: + description: a slice of label selector expressions + that can be used to select objects. A list + of selectors based on set-based label expressions. + items: + description: A label selector requirement + is a selector that contains values, a + key, and an operator that relates the + key and values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + fieldSelectors: + additionalProperties: type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If - the operator is Exists or DoesNotExist, - the values array must be empty. This array - is replaced during a strategic merge patch. + description: Map of string keys and values + that can be used to select objects. A selector + based on fields. + type: object + labelSelectors: + additionalProperties: + type: string + description: Map of string keys and values + that can be used to select objects. A selector + based on labels. + type: object + namespaces: + description: Namespaces is a set of namespace + to which objects belong. + items: + type: string + type: array + nodeSelectors: + additionalProperties: + type: string + description: Map of string keys and values + that can be used to select nodes. Selector + which must match a node's labels, and objects + must belong to these selected nodes. + type: object + nodes: + description: Nodes is a set of node name and + objects must belong to these nodes. + items: + type: string + type: array + podPhaseSelectors: + description: 'PodPhaseSelectors is a set of + condition of a pod at the current time. + supported value: Pending / Running / Succeeded + / Failed / Unknown' + items: + type: string + type: array + pods: + additionalProperties: items: type: string type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which - must match a node's labels, and objects must - belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects - must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: - Pending / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and - a set values that used to select pods. The key - defines the namespace which pods belong, and - the each values is a set of pod names. + description: Pods is a map of string keys + and a set values that used to select pods. + The key defines the namespace which pods + belong, and the each values is a set of + pod names. + type: object type: object - type: object - value: - description: Value is required when the mode is set - to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. - If `FixedPodMode`, provide an integer of pods to - do chaos action. If `FixedPercentPodMod`, provide - a number from 0-100 to specify the percent of pods - the server can do chaos action. IF `RandomMaxPercentPodMod`, provide - a number from 0-100 to specify the max percent of - pods to do chaos action - type: string - required: - - action - - mode - - selector - type: object - schedule: - description: ChaosOnlyScheduleSpec is very similar with - ScheduleSpec, but it could not schedule Workflow because - we could not resolve nested CRD now - properties: - awsChaos: - description: AwsChaosSpec is the content of the specification - for an AwsChaos - properties: - action: - description: 'Action defines the specific aws - chaos action. Supported action: ec2-stop / ec2-restart - / detach-volume Default action: ec2-stop' + target: + description: 'Target defines the specific jvm + chaos target. Supported target: servlet;psql;jvm;jedis;http;dubbo;rocketmq;tars;mysql;druid;redisson;rabbitmq;mongodb' enum: - - ec2-stop - - ec2-restart - - detach-volume - type: string - awsRegion: - description: AwsRegion defines the region of aws. - type: string - deviceName: - description: DeviceName indicates the name of - the device. Needed in detach-volume. - type: string - duration: - description: Duration represents the duration - of the chaos action. - type: string - ec2Instance: - description: Ec2Instance indicates the ID of the - ec2 instance. - type: string - endpoint: - description: Endpoint indicates the endpoint of - the aws server. Just used it in test now. - type: string - secretName: - description: SecretName defines the name of kubernetes - secret. + - servlet + - psql + - jvm + - jedis + - http + - dubbo + - rocketmq + - tars + - mysql + - druid + - redisson + - rabbitmq + - mongodb type: string - volumeID: - description: EbsVolume indicates the ID of the - EBS volume. Needed in detach-volume. + value: + description: Value is required when the mode is + set to `FixedPodMode` / `FixedPercentPodMod` + / `RandomMaxPercentPodMod`. If `FixedPodMode`, + provide an integer of pods to do chaos action. + If `FixedPercentPodMod`, provide a number from + 0-100 to specify the percent of pods the server + can do chaos action. IF `RandomMaxPercentPodMod`, provide + a number from 0-100 to specify the max percent + of pods to do chaos action type: string required: - action - - awsRegion - - ec2Instance + - mode + - selector + - target type: object - concurrencyPolicy: - enum: - - Forbid - - Allow - type: string - dnsChaos: - description: DNSChaosSpec defines the desired state - of DNSChaos + kernelChaos: + description: KernelChaosSpec defines the desired state + of KernelChaos properties: - action: - description: 'Action defines the specific DNS - chaos action. Supported action: error, random - Default action: error' - enum: - - error - - random - type: string - containerNames: - description: ContainerNames indicates list of - the name of affected container. If not set, - all containers will be injected - items: - type: string - type: array duration: description: Duration represents the duration of the chaos action type: string + failKernRequest: + description: FailKernRequest defines the request + of kernel injection + properties: + callchain: + description: 'Callchain indicate a special + call chain, such as: ext4_mount -> + mount_subtree -> ... -> + should_failslab With an optional set of + predicates and an optional set of parameters, + which used with predicates. You can read + call chan and predicate examples from https://github.com/chaos-mesh/bpfki/tree/develop/examples + to learn more. If no special call chain, + just keep Callchain empty, which means it + will fail at any call chain with slab alloc + (eg: kmalloc).' + items: + description: Frame defines the function + signature and predicate in function's + body + properties: + funcname: + description: Funcname can be find from + kernel source or `/proc/kallsyms`, + such as `ext4_mount` + type: string + parameters: + description: Parameters is used with + predicate, for example, if you want + to inject slab error in `d_alloc_parallel(struct + dentry *parent, const struct qstr + *name)` with a special name `bananas`, + you need to set it to `struct dentry + *parent, const struct qstr *name` + otherwise omit it. + type: string + predicate: + description: Predicate will access the + arguments of this Frame, example with + Parameters's, you can set it to `STRNCMP(name->name, + "bananas", 8)` to make inject only + with it, or omit it to inject for + all d_alloc_parallel call chain. + type: string + type: object + type: array + failtype: + description: 'FailType indicates what to fail, + can be set to ''0'' / ''1'' / ''2'' If `0`, + indicates slab to fail (should_failslab) + If `1`, indicates alloc_page to fail (should_fail_alloc_page) + If `2`, indicates bio to fail (should_fail_bio) + You can read: 1. https://www.kernel.org/doc/html/latest/fault-injection/fault-injection.html 2. + http://github.com/iovisor/bcc/blob/master/tools/inject_example.txt + to learn more' + format: int32 + maximum: 2 + minimum: 0 + type: integer + headers: + description: 'Headers indicates the appropriate + kernel headers you need. Eg: "linux/mmzone.h", + "linux/blkdev.h" and so on' + items: + type: string + type: array + probability: + description: Probability indicates the fails + with probability. If you want 1%, please + set this field with 1. + format: int32 + maximum: 100 + minimum: 0 + type: integer + times: + description: Times indicates the max times + of fails. + format: int32 + minimum: 0 + type: integer + required: + - failtype + type: object mode: description: 'Mode defines the mode to run chaos action. Supported mode: one / all / fixed / @@ -15222,20 +18804,6 @@ spec: - fixed-percent - random-max-percent type: string - patterns: - description: "Choose which domain names to take - effect, support the placeholder ? and wildcard - *, or the Specified domain name. Note: 1. - The wildcard * must be at the end of the string. - For example, chaos-*.org is invalid. 2. - if the patterns is empty, will take effect on - all the domain names. For example: \t\tThe value - is [\"google.com\", \"github.*\", \"chaos-mes?.org\"], - \t\twill take effect on \"google.com\", \"github.com\" - and \"chaos-mesh.org\"" - items: - type: string - type: array selector: description: Selector is used to select pods that are used to inject chaos action. @@ -15349,82 +18917,160 @@ spec: of pods to do chaos action type: string required: - - action + - failKernRequest - mode - selector type: object - gcpChaos: - description: GcpChaosSpec is the content of the specification - for a GcpChaos + networkChaos: + description: NetworkChaosSpec defines the desired + state of NetworkChaos properties: action: - description: 'Action defines the specific gcp - chaos action. Supported action: node-stop / - node-reset / disk-loss Default action: node-stop' + description: 'Action defines the specific network + chaos action. Supported action: partition, netem, + delay, loss, duplicate, corrupt Default action: + delay' enum: - - node-stop - - node-reset - - disk-loss - type: string - deviceNames: - description: The device name of disks to detach. - Needed in disk-loss. - items: - type: string - type: array - duration: - description: Duration represents the duration - of the chaos action. - type: string - instance: - description: Instance defines the name of the - instance - type: string - project: - description: Project defines the name of gcp project. - type: string - secretName: - description: SecretName defines the name of kubernetes - secret. It is used for GCP credentials. - type: string - zone: - description: Zone defines the zone of gcp project. + - netem + - delay + - loss + - duplicate + - corrupt + - partition + - bandwidth type: string - required: - - action - - instance - - project - - zone - type: object - historyLimit: - minimum: 1 - type: integer - httpChaos: - properties: - abort: - description: Abort is a rule to abort a http session. - type: boolean - code: - description: Code is a rule to select target by - http status code in response. - format: int32 - type: integer + bandwidth: + description: Bandwidth represents the detail about + bandwidth control action + properties: + buffer: + description: Buffer is the maximum amount + of bytes that tokens can be available for + instantaneously. + format: int32 + minimum: 1 + type: integer + limit: + description: Limit is the number of bytes + that can be queued waiting for tokens to + become available. + format: int32 + minimum: 1 + type: integer + minburst: + description: Minburst specifies the size of + the peakrate bucket. For perfect accuracy, + should be set to the MTU of the interface. If + a peakrate is needed, but some burstiness + is acceptable, this size can be raised. + A 3000 byte minburst allows around 3mbit/s + of peakrate, given 1000 byte packets. + format: int32 + minimum: 0 + type: integer + peakrate: + description: Peakrate is the maximum depletion + rate of the bucket. The peakrate does not + need to be set, it is only necessary if + perfect millisecond timescale shaping is + required. + format: int64 + minimum: 0 + type: integer + rate: + description: Rate is the speed knob. Allows + bps, kbps, mbps, gbps, tbps unit. bps means + bytes per second. + type: string + required: + - buffer + - limit + - rate + type: object + corrupt: + description: Corrupt represents the detail about + corrupt action + properties: + correlation: + type: string + corrupt: + type: string + required: + - correlation + - corrupt + type: object delay: - description: Delay represents the delay of the - target request/response. A duration string is - a possibly unsigned sequence of decimal numbers, - each with optional fraction and a unit suffix, - such as "300ms", "2h45m". Valid time units are - "ns", "us" (or "µs"), "ms", "s", "m", "h". + description: Delay represents the detail about + delay action + properties: + correlation: + type: string + jitter: + type: string + latency: + type: string + reorder: + description: ReorderSpec defines details of + packet reorder. + properties: + correlation: + type: string + gap: + type: integer + reorder: + type: string + required: + - correlation + - gap + - reorder + type: object + required: + - latency + type: object + direction: + description: Direction represents the direction, + this applies on netem and network partition + action + enum: + - to + - from + - both + - "" type: string + duplicate: + description: DuplicateSpec represents the detail + about loss action + properties: + correlation: + type: string + duplicate: + type: string + required: + - correlation + - duplicate + type: object duration: description: Duration represents the duration - of the chaos action. - type: string - method: - description: Method is a rule to select target - by http method in request. + of the chaos action type: string + externalTargets: + description: ExternalTargets represents network + targets outside k8s + items: + type: string + type: array + loss: + description: Loss represents the detail about + loss action + properties: + correlation: + type: string + loss: + type: string + required: + - correlation + - loss + type: object mode: description: 'Mode defines the mode to run chaos action. Supported mode: one / all / fixed / @@ -15436,110 +19082,308 @@ spec: - fixed-percent - random-max-percent type: string - patch: - description: Patch is a rule to patch some contents - in target. + selector: + description: Selector is used to select pods that + are used to inject chaos action. properties: - body: - description: Body is a rule to patch message - body of target. - properties: - type: - description: Type represents the patch - type, only support `JSON` as [merge - patch json](https://tools.ietf.org/html/rfc7396) - currently. - type: string - value: - description: Value is the patch contents. - type: string - required: - - type - - value + annotationSelectors: + additionalProperties: + type: string + description: Map of string keys and values + that can be used to select objects. A selector + based on annotations. type: object - headers: - description: 'Headers is a rule to append - http headers of target. For example: `[["Set-Cookie", - ""], ["Set-Cookie", ""]]`.' + expressionSelectors: + description: a slice of label selector expressions + that can be used to select objects. A list + of selectors based on set-based label expressions. items: - items: - type: string - type: array + description: A label selector requirement + is a selector that contains values, a + key, and an operator that relates the + key and values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object type: array - queries: - description: 'Queries is a rule to append - uri queries of target(Request only). For - example: `[["foo", "bar"], ["foo", "unknown"]]`.' + fieldSelectors: + additionalProperties: + type: string + description: Map of string keys and values + that can be used to select objects. A selector + based on fields. + type: object + labelSelectors: + additionalProperties: + type: string + description: Map of string keys and values + that can be used to select objects. A selector + based on labels. + type: object + namespaces: + description: Namespaces is a set of namespace + to which objects belong. items: + type: string + type: array + nodeSelectors: + additionalProperties: + type: string + description: Map of string keys and values + that can be used to select nodes. Selector + which must match a node's labels, and objects + must belong to these selected nodes. + type: object + nodes: + description: Nodes is a set of node name and + objects must belong to these nodes. + items: + type: string + type: array + podPhaseSelectors: + description: 'PodPhaseSelectors is a set of + condition of a pod at the current time. + supported value: Pending / Running / Succeeded + / Failed / Unknown' + items: + type: string + type: array + pods: + additionalProperties: items: type: string type: array - type: array + description: Pods is a map of string keys + and a set values that used to select pods. + The key defines the namespace which pods + belong, and the each values is a set of + pod names. + type: object type: object - path: - description: Path is a rule to select target by - uri path in http request. - type: string - port: - description: Port represents the target port to - be proxy of. - format: int32 - type: integer - replace: - description: Replace is a rule to replace some - contents in target. + target: + description: Target represents network target, + this applies on netem and network partition + action properties: - body: - description: Body is a rule to replace http - message body in target. - format: byte - type: string - code: - description: Code is a rule to replace http - status code in response. - format: int32 - type: integer - headers: - additionalProperties: - type: string - description: Headers is a rule to replace - http headers of target. The key-value pairs - represent header name and header value pairs. - type: object - method: - description: Method is a rule to replace http - method in request. - type: string - path: - description: Path is rule to to replace uri - path in http request. + mode: + description: 'Mode defines the mode to run + chaos action. Supported mode: one / all + / fixed / fixed-percent / random-max-percent' + enum: + - one + - all + - fixed + - fixed-percent + - random-max-percent type: string - queries: - additionalProperties: - type: string - description: 'Queries is a rule to replace - uri queries in http request. For example, - with value `{ "foo": "unknown" }`, the `/?foo=bar` - will be altered to `/?foo=unknown`,' + selector: + description: Selector is used to select pods + that are used to inject chaos action. + properties: + annotationSelectors: + additionalProperties: + type: string + description: Map of string keys and values + that can be used to select objects. + A selector based on annotations. + type: object + expressionSelectors: + description: a slice of label selector + expressions that can be used to select + objects. A list of selectors based on + set-based label expressions. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + fieldSelectors: + additionalProperties: + type: string + description: Map of string keys and values + that can be used to select objects. + A selector based on fields. + type: object + labelSelectors: + additionalProperties: + type: string + description: Map of string keys and values + that can be used to select objects. + A selector based on labels. + type: object + namespaces: + description: Namespaces is a set of namespace + to which objects belong. + items: + type: string + type: array + nodeSelectors: + additionalProperties: + type: string + description: Map of string keys and values + that can be used to select nodes. Selector + which must match a node's labels, and + objects must belong to these selected + nodes. + type: object + nodes: + description: Nodes is a set of node name + and objects must belong to these nodes. + items: + type: string + type: array + podPhaseSelectors: + description: 'PodPhaseSelectors is a set + of condition of a pod at the current + time. supported value: Pending / Running + / Succeeded / Failed / Unknown' + items: + type: string + type: array + pods: + additionalProperties: + items: + type: string + type: array + description: Pods is a map of string keys + and a set values that used to select + pods. The key defines the namespace + which pods belong, and the each values + is a set of pod names. + type: object type: object + value: + description: Value is required when the mode + is set to `FixedPodMode` / `FixedPercentPodMod` + / `RandomMaxPercentPodMod`. If `FixedPodMode`, + provide an integer of pods to do chaos action. + If `FixedPercentPodMod`, provide a number + from 0-100 to specify the percent of pods + the server can do chaos action. IF `RandomMaxPercentPodMod`, provide + a number from 0-100 to specify the max percent + of pods to do chaos action + type: string + required: + - mode + - selector type: object - request_headers: - additionalProperties: - type: string - description: RequestHeaders is a rule to select - target by http headers in request. The key-value - pairs represent header name and header value - pairs. - type: object - response_headers: - additionalProperties: + value: + description: Value is required when the mode is + set to `FixedPodMode` / `FixedPercentPodMod` + / `RandomMaxPercentPodMod`. If `FixedPodMode`, + provide an integer of pods to do chaos action. + If `FixedPercentPodMod`, provide a number from + 0-100 to specify the percent of pods the server + can do chaos action. IF `RandomMaxPercentPodMod`, provide + a number from 0-100 to specify the max percent + of pods to do chaos action + type: string + required: + - action + - mode + - selector + type: object + podChaos: + description: PodChaosSpec defines the attributes that + a user creates on a chaos experiment about pods. + properties: + action: + description: 'Action defines the specific pod + chaos action. Supported action: pod-kill / pod-failure + / container-kill Default action: pod-kill' + enum: + - pod-kill + - pod-failure + - container-kill + type: string + containerNames: + description: ContainerNames indicates list of + the name of affected container. If not set, + all containers will be injected + items: type: string - description: ResponseHeaders is a rule to select - target by http headers in response. The key-value - pairs represent header name and header value - pairs. - type: object + type: array + duration: + description: Duration represents the duration + of the chaos action. It is required when the + action is `PodFailureAction`. A duration string + is a possibly signed sequence of decimal numbers, + each with optional fraction and a unit suffix, + such as "300ms", "-1.5h" or "2h45m". Valid time + units are "ns", "us" (or "µs"), "ms", "s", "m", + "h". + type: string + gracePeriod: + description: GracePeriod is used in pod-kill action. + It represents the duration in seconds before + the pod should be deleted. Value must be non-negative + integer. The default value is zero that indicates + delete immediately. + format: int64 + minimum: 0 + type: integer + mode: + description: 'Mode defines the mode to run chaos + action. Supported mode: one / all / fixed / + fixed-percent / random-max-percent' + enum: + - one + - all + - fixed + - fixed-percent + - random-max-percent + type: string selector: description: Selector is used to select pods that are used to inject chaos action. @@ -15641,13 +19485,6 @@ spec: pod names. type: object type: object - target: - description: Target is the object to be selected - and injected. - enum: - - Request - - Response - type: string value: description: Value is required when the mode is set to `FixedPodMode` / `FixedPercentPodMod` @@ -15660,94 +19497,21 @@ spec: of pods to do chaos action type: string required: + - action - mode - selector - - target type: object - ioChaos: - description: IOChaosSpec defines the desired state - of IOChaos + schedule: + type: string + startingDeadlineSeconds: + format: int64 + minimum: 0 + nullable: true + type: integer + stressChaos: + description: StressChaosSpec defines the desired state + of StressChaos properties: - action: - description: 'Action defines the specific pod - chaos action. Supported action: latency / fault - / attrOverride / mistake' - enum: - - latency - - fault - - attrOverride - - mistake - type: string - attr: - description: Attr defines the overrided attribution - properties: - atime: - description: Timespec represents a time - properties: - nsec: - format: int64 - type: integer - sec: - format: int64 - type: integer - required: - - nsec - - sec - type: object - blocks: - format: int64 - type: integer - ctime: - description: Timespec represents a time - properties: - nsec: - format: int64 - type: integer - sec: - format: int64 - type: integer - required: - - nsec - - sec - type: object - gid: - format: int32 - type: integer - ino: - format: int64 - type: integer - kind: - description: FileType represents type of a - file - type: string - mtime: - description: Timespec represents a time - properties: - nsec: - format: int64 - type: integer - sec: - format: int64 - type: integer - required: - - nsec - - sec - type: object - nlink: - format: int32 - type: integer - perm: - type: integer - rdev: - format: int32 - type: integer - size: - format: int64 - type: integer - uid: - format: int32 - type: integer - type: object containerNames: description: ContainerNames indicates list of the name of affected container. If not set, @@ -15755,60 +19519,10 @@ spec: items: type: string type: array - delay: - description: Delay defines the value of I/O chaos - action delay. A delay string is a possibly signed - sequence of decimal numbers, each with optional - fraction and a unit suffix, such as "300ms". - Valid time units are "ns", "us" (or "µs"), "ms", - "s", "m", "h". - type: string duration: description: Duration represents the duration - of the chaos action. It is required when the - action is `PodFailureAction`. A duration string - is a possibly signed sequence of decimal numbers, - each with optional fraction and a unit suffix, - such as "300ms", "-1.5h" or "2h45m". Valid time - units are "ns", "us" (or "µs"), "ms", "s", "m", - "h". + of the chaos action type: string - errno: - description: 'Errno defines the error code that - returned by I/O action. refer to: https://www-numi.fnal.gov/offline_software/srt_public_context/WebDocs/Errors/unix_system_errors.html' - format: int32 - type: integer - methods: - description: 'Methods defines the I/O methods - for injecting I/O chaos action. default: all - I/O methods.' - items: - type: string - type: array - mistake: - description: Mistake defines what types of incorrectness - are injected to IO operations - properties: - filling: - description: Filling determines what is filled - in the miskate data. - enum: - - zero - - random - type: string - maxLength: - description: Max length of each wrong data - segment in bytes - format: int64 - minimum: 1 - type: integer - maxOccurrences: - description: There will be [1, MaxOccurrences] - segments of wrong data. - format: int64 - minimum: 1 - type: integer - type: object mode: description: 'Mode defines the mode to run chaos action. Supported mode: one / all / fixed / @@ -15816,19 +19530,10 @@ spec: enum: - one - all - - fixed - - fixed-percent - - random-max-percent - type: string - path: - description: Path defines the path of files for - injecting I/O chaos action. + - fixed + - fixed-percent + - random-max-percent type: string - percent: - description: 'Percent defines the percentage of - injection errors and provides a number from - 0-100. default: 100.' - type: integer selector: description: Selector is used to select pods that are used to inject chaos action. @@ -15930,6 +19635,72 @@ spec: pod names. type: object type: object + stressngStressors: + description: StressngStressors defines plenty + of stressors just like `Stressors` except that + it's an experimental feature and more powerful. + You can define stressors in `stress-ng` (see + also `man stress-ng`) dialect, however not all + of the supported stressors are well tested. + It maybe retired in later releases. You should + always use `Stressors` to define the stressors + and use this only when you want more stressors + unsupported by `Stressors`. When both `StressngStressors` + and `Stressors` are defined, `StressngStressors` + wins. + type: string + stressors: + description: Stressors defines plenty of stressors + supported to stress system components out. You + can use one or more of them to make up various + kinds of stresses. At least one of the stressors + should be specified. + properties: + cpu: + description: CPUStressor stresses CPU out + properties: + load: + description: Load specifies P percent + loading per CPU worker. 0 is effectively + a sleep (no load) and 100 is full loading. + type: integer + options: + description: extend stress-ng options + items: + type: string + type: array + workers: + description: Workers specifies N workers + to apply the stressor. + type: integer + required: + - workers + type: object + memory: + description: MemoryStressor stresses virtual + memory out + properties: + options: + description: extend stress-ng options + items: + type: string + type: array + size: + description: Size specifies N bytes consumed + per vm worker, default is the total + available memory. One can specify the + size as % of total available memory + or in units of B, KB/KiB, MB/MiB, GB/GiB, + TB/TiB. + type: string + workers: + description: Workers specifies N workers + to apply the stressor. + type: integer + required: + - workers + type: object + type: object value: description: Value is required when the mode is set to `FixedPodMode` / `FixedPercentPodMod` @@ -15941,35 +19712,22 @@ spec: a number from 0-100 to specify the max percent of pods to do chaos action type: string - volumePath: - description: VolumePath represents the mount path - of injected volume - type: string required: - - action - mode - selector - - volumePath type: object - jvmChaos: - description: JVMChaosSpec defines the desired state - of JVMChaos + timeChaos: + description: TimeChaosSpec defines the desired state + of TimeChaos properties: - action: - description: 'Action defines the specific jvm - chaos action. Supported action: delay;return;script;cfl;oom;ccf;tce;cpf;tde;tpf' - enum: - - delay - - return - - script - - cfl - - oom - - ccf - - tce - - cpf - - tde - - tpf - type: string + clockIds: + description: ClockIds defines all affected clock + id All available options are ["CLOCK_REALTIME","CLOCK_MONOTONIC","CLOCK_PROCESS_CPUTIME_ID","CLOCK_THREAD_CPUTIME_ID", + "CLOCK_MONOTONIC_RAW","CLOCK_REALTIME_COARSE","CLOCK_MONOTONIC_COARSE","CLOCK_BOOTTIME","CLOCK_REALTIME_ALARM", + "CLOCK_BOOTTIME_ALARM"] Default value is ["CLOCK_REALTIME"] + items: + type: string + type: array containerNames: description: ContainerNames indicates list of the name of affected container. If not set, @@ -15981,17 +19739,6 @@ spec: description: Duration represents the duration of the chaos action type: string - flags: - additionalProperties: - type: string - description: Flags represents the flags of action - type: object - matchers: - additionalProperties: - type: string - description: Matchers represents the matching - rules for the target - type: object mode: description: 'Mode defines the mode to run chaos action. Supported mode: one / all / fixed / @@ -16084,1794 +19831,5550 @@ spec: items: type: string type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of - condition of a pod at the current time. - supported value: Pending / Running / Succeeded - / Failed / Unknown' + podPhaseSelectors: + description: 'PodPhaseSelectors is a set of + condition of a pod at the current time. + supported value: Pending / Running / Succeeded + / Failed / Unknown' + items: + type: string + type: array + pods: + additionalProperties: + items: + type: string + type: array + description: Pods is a map of string keys + and a set values that used to select pods. + The key defines the namespace which pods + belong, and the each values is a set of + pod names. + type: object + type: object + timeOffset: + description: TimeOffset defines the delta time + of injected program. It's a possibly signed + sequence of decimal numbers, such as "300ms", + "-1.5h" or "2h45m". Valid time units are "ns", + "us" (or "µs"), "ms", "s", "m", "h". + type: string + value: + description: Value is required when the mode is + set to `FixedPodMode` / `FixedPercentPodMod` + / `RandomMaxPercentPodMod`. If `FixedPodMode`, + provide an integer of pods to do chaos action. + If `FixedPercentPodMod`, provide a number from + 0-100 to specify the percent of pods the server + can do chaos action. IF `RandomMaxPercentPodMod`, provide + a number from 0-100 to specify the max percent + of pods to do chaos action + type: string + required: + - mode + - selector + - timeOffset + type: object + type: + description: 'TODO: use a custom type, as `TemplateType` + contains other possible values' + type: string + required: + - schedule + - type + type: object + stressChaos: + description: StressChaosSpec defines the desired state + of StressChaos + properties: + containerNames: + description: ContainerNames indicates list of the + name of affected container. If not set, all containers + will be injected + items: + type: string + type: array + duration: + description: Duration represents the duration of the + chaos action + type: string + mode: + description: 'Mode defines the mode to run chaos action. + Supported mode: one / all / fixed / fixed-percent + / random-max-percent' + enum: + - one + - all + - fixed + - fixed-percent + - random-max-percent + type: string + selector: + description: Selector is used to select pods that + are used to inject chaos action. + properties: + annotationSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select objects. A selector based + on annotations. + type: object + expressionSelectors: + description: a slice of label selector expressions + that can be used to select objects. A list of + selectors based on set-based label expressions. + items: + description: A label selector requirement is + a selector that contains values, a key, and + an operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If + the operator is Exists or DoesNotExist, + the values array must be empty. This array + is replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + fieldSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select objects. A selector based + on fields. + type: object + labelSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select objects. A selector based + on labels. + type: object + namespaces: + description: Namespaces is a set of namespace + to which objects belong. + items: + type: string + type: array + nodeSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select nodes. Selector which + must match a node's labels, and objects must + belong to these selected nodes. + type: object + nodes: + description: Nodes is a set of node name and objects + must belong to these nodes. + items: + type: string + type: array + podPhaseSelectors: + description: 'PodPhaseSelectors is a set of condition + of a pod at the current time. supported value: + Pending / Running / Succeeded / Failed / Unknown' + items: + type: string + type: array + pods: + additionalProperties: + items: + type: string + type: array + description: Pods is a map of string keys and + a set values that used to select pods. The key + defines the namespace which pods belong, and + the each values is a set of pod names. + type: object + type: object + stressngStressors: + description: StressngStressors defines plenty of stressors + just like `Stressors` except that it's an experimental + feature and more powerful. You can define stressors + in `stress-ng` (see also `man stress-ng`) dialect, + however not all of the supported stressors are well + tested. It maybe retired in later releases. You + should always use `Stressors` to define the stressors + and use this only when you want more stressors unsupported + by `Stressors`. When both `StressngStressors` and + `Stressors` are defined, `StressngStressors` wins. + type: string + stressors: + description: Stressors defines plenty of stressors + supported to stress system components out. You can + use one or more of them to make up various kinds + of stresses. At least one of the stressors should + be specified. + properties: + cpu: + description: CPUStressor stresses CPU out + properties: + load: + description: Load specifies P percent loading + per CPU worker. 0 is effectively a sleep + (no load) and 100 is full loading. + type: integer + options: + description: extend stress-ng options + items: + type: string + type: array + workers: + description: Workers specifies N workers to + apply the stressor. + type: integer + required: + - workers + type: object + memory: + description: MemoryStressor stresses virtual memory + out + properties: + options: + description: extend stress-ng options items: type: string type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys - and a set values that used to select pods. - The key defines the namespace which pods - belong, and the each values is a set of - pod names. - type: object + size: + description: Size specifies N bytes consumed + per vm worker, default is the total available + memory. One can specify the size as % of + total available memory or in units of B, + KB/KiB, MB/MiB, GB/GiB, TB/TiB. + type: string + workers: + description: Workers specifies N workers to + apply the stressor. + type: integer + required: + - workers type: object - target: - description: 'Target defines the specific jvm - chaos target. Supported target: servlet;psql;jvm;jedis;http;dubbo;rocketmq;tars;mysql;druid;redisson;rabbitmq;mongodb' - enum: - - servlet - - psql - - jvm - - jedis - - http - - dubbo - - rocketmq - - tars - - mysql - - druid - - redisson - - rabbitmq - - mongodb - type: string - value: - description: Value is required when the mode is - set to `FixedPodMode` / `FixedPercentPodMod` - / `RandomMaxPercentPodMod`. If `FixedPodMode`, - provide an integer of pods to do chaos action. - If `FixedPercentPodMod`, provide a number from - 0-100 to specify the percent of pods the server - can do chaos action. IF `RandomMaxPercentPodMod`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action - type: string - required: - - action - - mode - - selector - - target type: object - kernelChaos: - description: KernelChaosSpec defines the desired state - of KernelChaos + value: + description: Value is required when the mode is set + to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. + If `FixedPodMode`, provide an integer of pods to + do chaos action. If `FixedPercentPodMod`, provide + a number from 0-100 to specify the percent of pods + the server can do chaos action. IF `RandomMaxPercentPodMod`, provide + a number from 0-100 to specify the max percent of + pods to do chaos action + type: string + required: + - mode + - selector + type: object + task: + description: Task describes the behavior of the custom + task. Only used when Type is TypeTask. + properties: + container: + description: Container is the main container image + to run in the pod properties: - duration: - description: Duration represents the duration - of the chaos action - type: string - failKernRequest: - description: FailKernRequest defines the request - of kernel injection - properties: - callchain: - description: 'Callchain indicate a special - call chain, such as: ext4_mount -> - mount_subtree -> ... -> - should_failslab With an optional set of - predicates and an optional set of parameters, - which used with predicates. You can read - call chan and predicate examples from https://github.com/chaos-mesh/bpfki/tree/develop/examples - to learn more. If no special call chain, - just keep Callchain empty, which means it - will fail at any call chain with slab alloc - (eg: kmalloc).' - items: - description: Frame defines the function - signature and predicate in function's - body + args: + description: '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. 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. Cannot + be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + command: + description: '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. + 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. Cannot be updated. + More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + env: + description: List of environment variables to + set in the container. Cannot be updated. + items: + description: EnvVar represents an environment + variable present in a Container. + properties: + name: + description: Name of the environment variable. + Must be a C_IDENTIFIER. + type: string + value: + description: '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 "".' + type: string + valueFrom: + description: Source for the environment + variable's value. Cannot be used if value + is not empty. properties: - funcname: - description: Funcname can be find from - kernel source or `/proc/kallsyms`, - such as `ext4_mount` + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. + apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the + ConfigMap or its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the + pod: supports metadata.name, metadata.namespace, + metadata.labels, metadata.annotations, + spec.nodeName, spec.serviceAccountName, + status.hostIP, status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema + the FieldPath is written in terms + of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to + select in the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: '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.' + properties: + containerName: + description: 'Container name: required + for volumes, optional for env + vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output + format of the exposed resources, + defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource + to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret + in the pod's namespace + properties: + key: + description: The key of the secret + to select from. Must be a valid + secret key. + type: string + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. + apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the + Secret or its key must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + description: 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. + items: + description: EnvFromSource represents the source + of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' type: string - parameters: - description: Parameters is used with - predicate, for example, if you want - to inject slab error in `d_alloc_parallel(struct - dentry *parent, const struct qstr - *name)` with a special name `bananas`, - you need to set it to `struct dentry - *parent, const struct qstr *name` - otherwise omit it. + optional: + description: Specify whether the ConfigMap + must be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend + to each key in the ConfigMap. Must be + a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' type: string - predicate: - description: Predicate will access the - arguments of this Frame, example with - Parameters's, you can set it to `STRNCMP(name->name, - "bananas", 8)` to make inject only - with it, or omit it to inject for - all d_alloc_parallel call chain. + optional: + description: Specify whether the Secret + must be defined + type: boolean + type: object + type: object + type: array + image: + description: '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.' + type: string + imagePullPolicy: + description: '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' + type: string + lifecycle: + description: Actions that the management system + should take in response to container lifecycle + events. Cannot be updated. + properties: + postStart: + description: 'PostStart is called immediately + after a container is created. If the handler + fails, the container is terminated and restarted + according to its restart policy. Other management + of the container blocks until the hook completes. + More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following + should be specified. Exec specifies + the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http + request to perform. + properties: + host: + description: Host name to connect + to, defaults to the pod IP. You + probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set + in the request. HTTP allows repeated + headers. + items: + description: HTTPHeader describes + a custom header to be used in + HTTP probes + properties: + name: + description: The header field + name + type: string + value: + description: The header field + value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the + HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the + port to access on the container. + Number must be in the range 1 to + 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action + involving a TCP port. TCP hooks not + yet supported TODO: implement a realistic + TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name + to connect to, defaults to the pod + IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the + port to access on the container. + Number must be in the range 1 to + 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + description: 'PreStop is called immediately + before a container is terminated due to + an API request or management event such + as liveness/startup probe failure, preemption, + resource contention, etc. The handler is + not called if the container crashes or exits. + The reason for termination is passed to + the handler. The Pod''s termination grace + period countdown begins before the PreStop + hooked is executed. Regardless of the outcome + of the handler, the container will eventually + terminate within the Pod''s termination + grace period. Other management of the container + blocks until the hook completes or until + the termination grace period is reached. + More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following + should be specified. Exec specifies + the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http + request to perform. + properties: + host: + description: Host name to connect + to, defaults to the pod IP. You + probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set + in the request. HTTP allows repeated + headers. + items: + description: HTTPHeader describes + a custom header to be used in + HTTP probes + properties: + name: + description: The header field + name + type: string + value: + description: The header field + value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the + HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the + port to access on the container. + Number must be in the range 1 to + 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action + involving a TCP port. TCP hooks not + yet supported TODO: implement a realistic + TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name + to connect to, defaults to the pod + IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the + port to access on the container. + Number must be in the range 1 to + 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + description: 'Periodic probe of container liveness. + Container will be restarted if the probe fails. + Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following + should be specified. Exec specifies the + action to take. + properties: + command: + description: 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. + items: type: string - type: object - type: array - failtype: - description: 'FailType indicates what to fail, - can be set to ''0'' / ''1'' / ''2'' If `0`, - indicates slab to fail (should_failslab) - If `1`, indicates alloc_page to fail (should_fail_alloc_page) - If `2`, indicates bio to fail (should_fail_bio) - You can read: 1. https://www.kernel.org/doc/html/latest/fault-injection/fault-injection.html 2. - http://github.com/iovisor/bcc/blob/master/tools/inject_example.txt - to learn more' + type: array + type: object + failureThreshold: + description: Minimum consecutive failures + for the probe to be considered failed after + having succeeded. Defaults to 3. Minimum + value is 1. format: int32 - maximum: 2 - minimum: 0 type: integer - headers: - description: 'Headers indicates the appropriate - kernel headers you need. Eg: "linux/mmzone.h", - "linux/blkdev.h" and so on' - items: - type: string - type: array - probability: - description: Probability indicates the fails - with probability. If you want 1%, please - set this field with 1. + httpGet: + description: HTTPGet specifies the http request + to perform. + properties: + host: + description: Host name to connect to, + defaults to the pod IP. You probably + want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in + the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a + custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP + server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port + to access on the container. Number must + be in the range 1 to 65535. Name must + be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: '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' format: int32 - maximum: 100 - minimum: 0 type: integer - times: - description: Times indicates the max times - of fails. + periodSeconds: + description: How often (in seconds) to perform + the probe. Default to 10 seconds. Minimum + value is 1. + format: int32 + type: integer + successThreshold: + description: 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. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action + involving a TCP port. TCP hooks not yet + supported TODO: implement a realistic TCP + lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect + to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port + to access on the container. Number must + be in the range 1 to 65535. Name must + be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: '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' format: int32 - minimum: 0 type: integer - required: - - failtype type: object - mode: - description: 'Mode defines the mode to run chaos - action. Supported mode: one / all / fixed / - fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent + name: + description: Name of the container specified as + a DNS_LABEL. Each container in a pod must have + a unique name (DNS_LABEL). Cannot be updated. type: string - selector: - description: Selector is used to select pods that - are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select objects. A selector - based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list - of selectors based on set-based label expressions. - items: - description: A label selector requirement - is a selector that contains values, a - key, and an operator that relates the - key and values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. This - array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select objects. A selector - based on fields. - type: object - labelSelectors: - additionalProperties: + ports: + description: 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. + items: + description: ContainerPort represents a network + port in a single container. + properties: + containerPort: + description: Number of port to expose on + the pod's IP address. This must be a valid + port number, 0 < x < 65536. + format: int32 + type: integer + hostIP: + description: What host IP to bind the external + port to. type: string - description: Map of string keys and values - that can be used to select objects. A selector - based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: + hostPort: + description: Number of port to expose on + the host. If specified, this must be a + valid port number, 0 < x < 65536. If HostNetwork + is specified, this must match ContainerPort. + Most containers do not need this. + format: int32 + type: integer + name: + description: If specified, this must be + an IANA_SVC_NAME and unique within the + pod. Each named port in a pod must have + a unique name. Name for the port that + can be referred to by services. type: string - type: array - nodeSelectors: - additionalProperties: + protocol: + description: Protocol for port. Must be + UDP, TCP, or SCTP. Defaults to "TCP". type: string - description: Map of string keys and values - that can be used to select nodes. Selector - which must match a node's labels, and objects - must belong to these selected nodes. + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + description: 'Periodic probe of container service + readiness. Container will be removed from service + endpoints if the probe fails. Cannot be updated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following + should be specified. Exec specifies the + action to take. + properties: + command: + description: 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. + items: + type: string + type: array type: object - nodes: - description: Nodes is a set of node name and - objects must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of - condition of a pod at the current time. - supported value: Pending / Running / Succeeded - / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: + failureThreshold: + description: Minimum consecutive failures + for the probe to be considered failed after + having succeeded. Defaults to 3. Minimum + value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request + to perform. + properties: + host: + description: Host name to connect to, + defaults to the pod IP. You probably + want to set "Host" in httpHeaders instead. type: string - type: array - description: Pods is a map of string keys - and a set values that used to select pods. - The key defines the namespace which pods - belong, and the each values is a set of - pod names. + httpHeaders: + description: Custom headers to set in + the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a + custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP + server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port + to access on the container. Number must + be in the range 1 to 65535. Name must + be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. + type: string + required: + - port type: object - type: object - value: - description: Value is required when the mode is - set to `FixedPodMode` / `FixedPercentPodMod` - / `RandomMaxPercentPodMod`. If `FixedPodMode`, - provide an integer of pods to do chaos action. - If `FixedPercentPodMod`, provide a number from - 0-100 to specify the percent of pods the server - can do chaos action. IF `RandomMaxPercentPodMod`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action - type: string - required: - - failKernRequest - - mode - - selector - type: object - networkChaos: - description: NetworkChaosSpec defines the desired - state of NetworkChaos - properties: - action: - description: 'Action defines the specific network - chaos action. Supported action: partition, netem, - delay, loss, duplicate, corrupt Default action: - delay' - enum: - - netem - - delay - - loss - - duplicate - - corrupt - - partition - - bandwidth - type: string - bandwidth: - description: Bandwidth represents the detail about - bandwidth control action - properties: - buffer: - description: Buffer is the maximum amount - of bytes that tokens can be available for - instantaneously. + initialDelaySeconds: + description: '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' format: int32 - minimum: 1 - type: integer - limit: - description: Limit is the number of bytes - that can be queued waiting for tokens to - become available. + type: integer + periodSeconds: + description: How often (in seconds) to perform + the probe. Default to 10 seconds. Minimum + value is 1. format: int32 - minimum: 1 type: integer - minburst: - description: Minburst specifies the size of - the peakrate bucket. For perfect accuracy, - should be set to the MTU of the interface. If - a peakrate is needed, but some burstiness - is acceptable, this size can be raised. - A 3000 byte minburst allows around 3mbit/s - of peakrate, given 1000 byte packets. + successThreshold: + description: 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. format: int32 - minimum: 0 type: integer - peakrate: - description: Peakrate is the maximum depletion - rate of the bucket. The peakrate does not - need to be set, it is only necessary if - perfect millisecond timescale shaping is - required. - format: int64 - minimum: 0 + tcpSocket: + description: 'TCPSocket specifies an action + involving a TCP port. TCP hooks not yet + supported TODO: implement a realistic TCP + lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect + to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port + to access on the container. Number must + be in the range 1 to 65535. Name must + be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: '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' + format: int32 type: integer - rate: - description: Rate is the speed knob. Allows - bps, kbps, mbps, gbps, tbps unit. bps means - bytes per second. - type: string - required: - - buffer - - limit - - rate type: object - corrupt: - description: Corrupt represents the detail about - corrupt action + resources: + description: 'Compute Resources required by this + container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' properties: - correlation: - type: string - corrupt: - type: string - required: - - correlation - - corrupt + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum + amount of compute resources allowed. More + info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: '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-compute-resources-container/' + type: object type: object - delay: - description: Delay represents the detail about - delay action + securityContext: + description: 'Security options the pod should + run with. More info: https://kubernetes.io/docs/concepts/policy/security-context/ + More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/' properties: - correlation: - type: string - jitter: - type: string - latency: + allowPrivilegeEscalation: + description: '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' + type: boolean + capabilities: + description: The capabilities to add/drop + when running containers. Defaults to the + default set of capabilities granted by the + container runtime. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX + capabilities type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX + capabilities type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. + Processes in privileged containers are essentially + equivalent to root on the host. Defaults + to false. + type: boolean + procMount: + description: 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. type: string - reorder: - description: ReorderSpec defines details of - packet reorder. + readOnlyRootFilesystem: + description: Whether this container has a + read-only root filesystem. Default is false. + type: boolean + runAsGroup: + description: 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. + format: int64 + type: integer + runAsNonRoot: + description: 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. + type: boolean + runAsUser: + description: 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. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied + to the container. If unspecified, the container + runtime will allocate a random SELinux context + for each container. May also be set in + PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified + in SecurityContext takes precedence. properties: - correlation: + level: + description: Level is SELinux level label + that applies to the container. type: string - gap: - type: integer - reorder: + role: + description: Role is a SELinux role label + that applies to the container. + type: string + type: + description: Type is a SELinux type label + that applies to the container. + type: string + user: + description: User is a SELinux user label + that applies to the container. + type: string + type: object + windowsOptions: + description: The Windows specific settings + applied to all containers. If unspecified, + the options from the PodSecurityContext + will be used. If set in both SecurityContext + and PodSecurityContext, the value specified + in SecurityContext takes precedence. + properties: + gmsaCredentialSpec: + description: 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. This field is alpha-level and + is only honored by servers that enable + the WindowsGMSA feature flag. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is + the name of the GMSA credential spec + to use. This field is alpha-level and + is only honored by servers that enable + the WindowsGMSA feature flag. + type: string + runAsUserName: + description: 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. This field is beta-level + and may be disabled with the WindowsRunAsUserName + feature flag. type: string - required: - - correlation - - gap - - reorder type: object - required: - - latency type: object - direction: - description: Direction represents the direction, - this applies on netem and network partition - action - enum: - - to - - from - - both - - "" - type: string - duplicate: - description: DuplicateSpec represents the detail - about loss action + startupProbe: + description: 'StartupProbe indicates that the + Pod has successfully initialized. If specified, + no other probes are executed until this completes + successfully. If this probe fails, the Pod will + be restarted, just as if the livenessProbe failed. + This can be used to provide different probe + parameters at the beginning of a Pod''s lifecycle, + when it might take a long time to load data + or warm a cache, than during steady-state operation. + This cannot be updated. This is an alpha feature + enabled by the StartupProbe feature flag. More + info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' properties: - correlation: - type: string - duplicate: - type: string - required: - - correlation - - duplicate + exec: + description: One and only one of the following + should be specified. Exec specifies the + action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures + for the probe to be considered failed after + having succeeded. Defaults to 3. Minimum + value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request + to perform. + properties: + host: + description: Host name to connect to, + defaults to the pod IP. You probably + want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in + the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a + custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP + server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port + to access on the container. Number must + be in the range 1 to 65535. Name must + be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: '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' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform + the probe. Default to 10 seconds. Minimum + value is 1. + format: int32 + type: integer + successThreshold: + description: 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. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action + involving a TCP port. TCP hooks not yet + supported TODO: implement a realistic TCP + lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect + to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port + to access on the container. Number must + be in the range 1 to 65535. Name must + be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: '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' + format: int32 + type: integer type: object - duration: - description: Duration represents the duration - of the chaos action + stdin: + description: 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. + type: boolean + stdinOnce: + description: 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 + type: boolean + terminationMessagePath: + description: '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.' type: string - externalTargets: - description: ExternalTargets represents network - targets outside k8s + terminationMessagePolicy: + description: 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. + type: string + tty: + description: Whether this container should allocate + a TTY for itself, also requires 'stdin' to be + true. Default is false. + type: boolean + volumeDevices: + description: volumeDevices is the list of block + devices to be used by the container. This is + a beta feature. items: - type: string + description: volumeDevice describes a mapping + of a raw block device within a container. + properties: + devicePath: + description: devicePath is the path inside + of the container that the device will + be mapped to. + type: string + name: + description: name must match the name of + a persistentVolumeClaim in the pod + type: string + required: + - devicePath + - name + type: object type: array - loss: - description: Loss represents the detail about - loss action - properties: - correlation: - type: string - loss: - type: string - required: - - correlation - - loss - type: object - mode: - description: 'Mode defines the mode to run chaos - action. Supported mode: one / all / fixed / - fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent + volumeMounts: + description: Pod volumes to mount into the container's + filesystem. Cannot be updated. + items: + description: VolumeMount describes a mounting + of a Volume within a container. + properties: + mountPath: + description: Path within the container at + which the volume should be mounted. Must + not contain ':'. + type: string + mountPropagation: + description: 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. + type: string + name: + description: This must match the Name of + a Volume. + type: string + readOnly: + description: Mounted read-only if true, + read-write otherwise (false or unspecified). + Defaults to false. + type: boolean + subPath: + description: Path within the volume from + which the container's volume should be + mounted. Defaults to "" (volume's root). + type: string + subPathExpr: + description: 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. + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: 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. type: string - selector: - description: Selector is used to select pods that - are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: + required: + - name + type: object + volumes: + description: Volumes is a list of volumes that can + be mounted by containers in a template. + items: + description: Volume represents a named volume in + a pod that may be accessed by any container in + the pod. + properties: + awsElasticBlockStore: + description: 'AWSElasticBlockStore represents + an AWS Disk resource that is attached to a + kubelet''s host machine and then exposed to + the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + properties: + fsType: + description: 'Filesystem type of the volume + that you want to mount. Tip: Ensure that + the filesystem type is supported by the + host operating system. Examples: "ext4", + "xfs", "ntfs". Implicitly inferred to + be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + TODO: how do we prevent errors in the + filesystem from compromising the machine' type: string - description: Map of string keys and values - that can be used to select objects. A selector - based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list - of selectors based on set-based label expressions. + partition: + description: 'The partition in the volume + that you want to mount. If omitted, the + default is to mount by volume name. Examples: + For volume /dev/sda1, you specify the + partition as "1". Similarly, the volume + partition for /dev/sda is "0" (or you + can leave the property empty).' + format: int32 + type: integer + readOnly: + description: 'Specify "true" to force and + set the ReadOnly property in VolumeMounts + to "true". If omitted, the default is + "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: boolean + volumeID: + description: 'Unique ID of the persistent + disk resource in AWS (Amazon EBS volume). + More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: string + required: + - volumeID + type: object + azureDisk: + description: AzureDisk represents an Azure Data + Disk mount on the host and bind mount to the + pod. + properties: + cachingMode: + description: 'Host Caching mode: None, Read + Only, Read Write.' + type: string + diskName: + description: The Name of the data disk in + the blob storage + type: string + diskURI: + description: The URI the data disk in the + blob storage + type: string + fsType: + description: Filesystem type to mount. Must + be a filesystem type supported by the + host operating system. Ex. "ext4", "xfs", + "ntfs". Implicitly inferred to be "ext4" + if unspecified. + type: string + kind: + description: 'Expected values Shared: multiple + blob disks per storage account Dedicated: + single blob disk per storage account Managed: + azure managed data disk (only in managed + availability set). defaults to shared' + type: string + readOnly: + description: Defaults to false (read/write). + ReadOnly here will force the ReadOnly + setting in VolumeMounts. + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + description: AzureFile represents an Azure File + Service mount on the host and bind mount to + the pod. + properties: + readOnly: + description: Defaults to false (read/write). + ReadOnly here will force the ReadOnly + setting in VolumeMounts. + type: boolean + secretName: + description: the name of secret that contains + Azure Storage Account Name and Key + type: string + shareName: + description: Share Name + type: string + required: + - secretName + - shareName + type: object + cephfs: + description: CephFS represents a Ceph FS mount + on the host that shares a pod's lifetime + properties: + monitors: + description: 'Required: Monitors is a collection + of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + items: + type: string + type: array + path: + description: 'Optional: Used as the mounted + root, rather than the full Ceph tree, + default is /' + type: string + readOnly: + description: 'Optional: Defaults to false + (read/write). ReadOnly here will force + the ReadOnly setting in VolumeMounts. + More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: boolean + secretFile: + description: 'Optional: SecretFile is the + path to key ring for User, default is + /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + secretRef: + description: 'Optional: SecretRef is reference + to the authentication secret for User, + default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + user: + description: 'Optional: User is the rados + user name, default is admin More info: + https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + required: + - monitors + type: object + cinder: + description: 'Cinder represents a cinder volume + attached and mounted on kubelets host machine. + More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + properties: + fsType: + description: 'Filesystem type to mount. + Must be a filesystem type supported by + the host operating system. Examples: "ext4", + "xfs", "ntfs". Implicitly inferred to + be "ext4" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + readOnly: + description: 'Optional: Defaults to false + (read/write). ReadOnly here will force + the ReadOnly setting in VolumeMounts. + More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: boolean + secretRef: + description: 'Optional: points to a secret + object containing parameters used to connect + to OpenStack.' + properties: + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + volumeID: + description: 'volume id used to identify + the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + required: + - volumeID + type: object + configMap: + description: ConfigMap represents a configMap + that should populate this volume + properties: + defaultMode: + description: 'Optional: mode bits to use + on created files by default. Must be a + value between 0 and 0777. Defaults to + 0644. Directories within the path are + not affected by this setting. This might + be in conflict with other options that + affect the file mode, like fsGroup, and + the result can be other mode bits set.' + format: int32 + type: integer items: - description: A label selector requirement - is a selector that contains values, a - key, and an operator that relates the - key and values. + description: If unspecified, each key-value + pair in the Data field of the referenced + ConfigMap will be projected into the volume + as a file whose name is the key and content + is the value. If specified, the listed + keys will be projected into the specified + paths, and unlisted keys will not be present. + If a key is specified which is not present + in the ConfigMap, the volume setup will + error unless it is marked optional. Paths + must be relative and may not contain the + '..' path or start with '..'. + items: + description: Maps a string key to a path + within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits + to use on this file, must be a value + between 0 and 0777. If not specified, + the volume defaultMode will be used. + This might be in conflict with other + options that affect the file mode, + like fsGroup, and the result can + be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of + the file to map the key to. May + not be an absolute path. May not + contain the path element '..'. May + not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap + or its keys must be defined + type: boolean + type: object + csi: + description: CSI (Container Storage Interface) + represents storage that is handled by an external + CSI driver (Alpha feature). + properties: + driver: + description: Driver is the name of the CSI + driver that handles this volume. Consult + with your admin for the correct name as + registered in the cluster. + type: string + fsType: + description: Filesystem type to mount. Ex. + "ext4", "xfs", "ntfs". If not provided, + the empty value is passed to the associated + CSI driver which will determine the default + filesystem to apply. + type: string + nodePublishSecretRef: + description: NodePublishSecretRef is a reference + to the secret object containing sensitive + information to pass to the CSI driver + to complete the CSI NodePublishVolume + and NodeUnpublishVolume calls. This field + is optional, and may be empty if no secret + is required. If the secret object contains + more than one secret, all secret references + are passed. properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. This - array is replaced during a strategic - merge patch. - items: + type: object + readOnly: + description: Specifies a read-only configuration + for the volume. Defaults to false (read/write). + type: boolean + volumeAttributes: + additionalProperties: + type: string + description: VolumeAttributes stores driver-specific + properties that are passed to the CSI + driver. Consult your driver's documentation + for supported values. + type: object + required: + - driver + type: object + downwardAPI: + description: DownwardAPI represents downward + API about the pod that should populate this + volume + properties: + defaultMode: + description: 'Optional: mode bits to use + on created files by default. Must be a + value between 0 and 0777. Defaults to + 0644. Directories within the path are + not affected by this setting. This might + be in conflict with other options that + affect the file mode, like fsGroup, and + the result can be other mode bits set.' + format: int32 + type: integer + items: + description: Items is a list of downward + API volume file + items: + description: DownwardAPIVolumeFile represents + information to create the file containing + the pod field + properties: + fieldRef: + description: 'Required: Selects a + field of the pod: only annotations, + labels, name and namespace are supported.' + properties: + apiVersion: + description: Version of the schema + the FieldPath is written in + terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field + to select in the specified API + version. + type: string + required: + - fieldPath + type: object + mode: + description: 'Optional: mode bits + to use on this file, must be a value + between 0 and 0777. If not specified, + the volume defaultMode will be used. + This might be in conflict with other + options that affect the file mode, + like fsGroup, and the result can + be other mode bits set.' + format: int32 + type: integer + path: + description: 'Required: Path is the + relative path name of the file to + be created. Must not be absolute + or contain the ''..'' path. Must + be utf-8 encoded. The first item + of the relative path must not start + with ''..''' type: string - type: array - required: - - key - - operator + resourceFieldRef: + description: 'Selects a resource of + the container: only resources limits + and requests (limits.cpu, limits.memory, + requests.cpu and requests.memory) + are currently supported.' + properties: + containerName: + description: 'Container name: + required for volumes, optional + for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output + format of the exposed resources, + defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource + to select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + emptyDir: + description: 'EmptyDir represents a temporary + directory that shares a pod''s lifetime. More + info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + properties: + medium: + description: 'What type of storage medium + should back this directory. The default + is "" which means to use the node''s default + medium. Must be an empty string (default) + or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + description: 'Total amount of local storage + required for this EmptyDir volume. The + size limit is also applicable for memory + medium. The maximum usage on memory medium + EmptyDir would be the minimum value between + the SizeLimit specified here and the sum + of memory limits of all containers in + a pod. The default is nil which means + that the limit is undefined. More info: + http://kubernetes.io/docs/user-guide/volumes#emptydir' + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + fc: + description: FC represents a Fibre Channel resource + that is attached to a kubelet's host machine + and then exposed to the pod. + properties: + fsType: + description: 'Filesystem type to mount. + Must be a filesystem type supported by + the host operating system. Ex. "ext4", + "xfs", "ntfs". Implicitly inferred to + be "ext4" if unspecified. TODO: how do + we prevent errors in the filesystem from + compromising the machine' + type: string + lun: + description: 'Optional: FC target lun number' + format: int32 + type: integer + readOnly: + description: 'Optional: Defaults to false + (read/write). ReadOnly here will force + the ReadOnly setting in VolumeMounts.' + type: boolean + targetWWNs: + description: 'Optional: FC target worldwide + names (WWNs)' + items: + type: string + type: array + wwids: + description: 'Optional: FC volume world + wide identifiers (wwids) Either wwids + or combination of targetWWNs and lun must + be set, but not both simultaneously.' + items: + type: string + type: array + type: object + flexVolume: + description: FlexVolume represents a generic + volume resource that is provisioned/attached + using an exec based plugin. + properties: + driver: + description: Driver is the name of the driver + to use for this volume. + type: string + fsType: + description: Filesystem type to mount. Must + be a filesystem type supported by the + host operating system. Ex. "ext4", "xfs", + "ntfs". The default filesystem depends + on FlexVolume script. + type: string + options: + additionalProperties: + type: string + description: 'Optional: Extra command options + if any.' type: object - type: array - fieldSelectors: - additionalProperties: + readOnly: + description: 'Optional: Defaults to false + (read/write). ReadOnly here will force + the ReadOnly setting in VolumeMounts.' + type: boolean + secretRef: + description: 'Optional: SecretRef is reference + to the secret object containing sensitive + information to pass to the plugin scripts. + This may be empty if no secret object + is specified. If the secret object contains + more than one secret, all secrets are + passed to the plugin scripts.' + properties: + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + required: + - driver + type: object + flocker: + description: Flocker represents a Flocker volume + attached to a kubelet's host machine. This + depends on the Flocker control service being + running + properties: + datasetName: + description: Name of the dataset stored + as metadata -> name on the dataset for + Flocker should be considered as deprecated type: string - description: Map of string keys and values - that can be used to select objects. A selector - based on fields. - type: object - labelSelectors: - additionalProperties: + datasetUUID: + description: UUID of the dataset. This is + unique identifier of a Flocker dataset type: string - description: Map of string keys and values - that can be used to select objects. A selector - based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: + type: object + gcePersistentDisk: + description: 'GCEPersistentDisk represents a + GCE Disk resource that is attached to a kubelet''s + host machine and then exposed to the pod. + More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + properties: + fsType: + description: 'Filesystem type of the volume + that you want to mount. Tip: Ensure that + the filesystem type is supported by the + host operating system. Examples: "ext4", + "xfs", "ntfs". Implicitly inferred to + be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + TODO: how do we prevent errors in the + filesystem from compromising the machine' type: string - type: array - nodeSelectors: - additionalProperties: + partition: + description: 'The partition in the volume + that you want to mount. If omitted, the + default is to mount by volume name. Examples: + For volume /dev/sda1, you specify the + partition as "1". Similarly, the volume + partition for /dev/sda is "0" (or you + can leave the property empty). More info: + https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + format: int32 + type: integer + pdName: + description: 'Unique name of the PD resource + in GCE. Used to identify the disk in GCE. + More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' type: string - description: Map of string keys and values - that can be used to select nodes. Selector - which must match a node's labels, and objects - must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and - objects must belong to these nodes. - items: + readOnly: + description: 'ReadOnly here will force the + ReadOnly setting in VolumeMounts. Defaults + to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: boolean + required: + - pdName + type: object + gitRepo: + description: 'GitRepo represents a git repository + at a particular revision. DEPRECATED: GitRepo + is deprecated. To provision a container with + a git repo, mount an EmptyDir into an InitContainer + that clones the repo using git, then mount + the EmptyDir into the Pod''s container.' + properties: + directory: + description: Target directory name. Must + not contain or start with '..'. If '.' + is supplied, the volume directory will + be the git repository. Otherwise, if + specified, the volume will contain the + git repository in the subdirectory with + the given name. type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of - condition of a pod at the current time. - supported value: Pending / Running / Succeeded - / Failed / Unknown' - items: + repository: + description: Repository URL type: string - type: array - pods: - additionalProperties: + revision: + description: Commit hash for the specified + revision. + type: string + required: + - repository + type: object + glusterfs: + description: 'Glusterfs represents a Glusterfs + mount on the host that shares a pod''s lifetime. + More info: https://examples.k8s.io/volumes/glusterfs/README.md' + properties: + endpoints: + description: 'EndpointsName is the endpoint + name that details Glusterfs topology. + More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + path: + description: 'Path is the Glusterfs volume + path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + readOnly: + description: 'ReadOnly here will force the + Glusterfs volume to be mounted with read-only + permissions. Defaults to false. More info: + https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: boolean + required: + - endpoints + - path + type: object + hostPath: + description: 'HostPath represents a pre-existing + file or directory on the host machine that + is directly exposed to the container. This + is generally used for system agents or other + privileged things that are allowed to see + the host machine. Most containers will NOT + need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath + --- TODO(jonesdl) We need to restrict who + can use host directory mounts and who can/can + not mount host directories as read/write.' + properties: + path: + description: 'Path of the directory on the + host. If the path is a symlink, it will + follow the link to the real path. More + info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + type: + description: 'Type for HostPath Volume Defaults + to "" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + required: + - path + type: object + iscsi: + description: 'ISCSI represents an ISCSI Disk + resource that is attached to a kubelet''s + host machine and then exposed to the pod. + More info: https://examples.k8s.io/volumes/iscsi/README.md' + properties: + chapAuthDiscovery: + description: whether support iSCSI Discovery + CHAP authentication + type: boolean + chapAuthSession: + description: whether support iSCSI Session + CHAP authentication + type: boolean + fsType: + description: 'Filesystem type of the volume + that you want to mount. Tip: Ensure that + the filesystem type is supported by the + host operating system. Examples: "ext4", + "xfs", "ntfs". Implicitly inferred to + be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi + TODO: how do we prevent errors in the + filesystem from compromising the machine' + type: string + initiatorName: + description: Custom iSCSI Initiator Name. + If initiatorName is specified with iscsiInterface + simultaneously, new iSCSI interface : will be created + for the connection. + type: string + iqn: + description: Target iSCSI Qualified Name. + type: string + iscsiInterface: + description: iSCSI Interface Name that uses + an iSCSI transport. Defaults to 'default' + (tcp). + type: string + lun: + description: iSCSI Target Lun number. + format: int32 + type: integer + portals: + description: iSCSI Target Portal List. The + portal is either an IP or ip_addr:port + if the port is other than default (typically + TCP ports 860 and 3260). items: type: string type: array - description: Pods is a map of string keys - and a set values that used to select pods. - The key defines the namespace which pods - belong, and the each values is a set of - pod names. - type: object - type: object - target: - description: Target represents network target, - this applies on netem and network partition - action - properties: - mode: - description: 'Mode defines the mode to run - chaos action. Supported mode: one / all - / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - selector: - description: Selector is used to select pods - that are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: + readOnly: + description: ReadOnly here will force the + ReadOnly setting in VolumeMounts. Defaults + to false. + type: boolean + secretRef: + description: CHAP Secret for iSCSI target + and initiator authentication + properties: + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' type: string - description: Map of string keys and values - that can be used to select objects. - A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector - expressions that can be used to select - objects. A list of selectors based on - set-based label expressions. - items: - description: A label selector requirement - is a selector that contains values, - a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: operator represents - a key's relationship to a set - of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array - of string values. If the operator - is In or NotIn, the values array - must be non-empty. If the operator - is Exists or DoesNotExist, the - values array must be empty. This - array is replaced during a strategic - merge patch. + type: object + targetPortal: + description: iSCSI Target Portal. The Portal + is either an IP or ip_addr:port if the + port is other than default (typically + TCP ports 860 and 3260). + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + description: 'Volume''s name. Must be a DNS_LABEL + and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + nfs: + description: 'NFS represents an NFS mount on + the host that shares a pod''s lifetime More + info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + properties: + path: + description: 'Path that is exported by the + NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + readOnly: + description: 'ReadOnly here will force the + NFS export to be mounted with read-only + permissions. Defaults to false. More info: + https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: boolean + server: + description: 'Server is the hostname or + IP address of the NFS server. More info: + https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + description: 'PersistentVolumeClaimVolumeSource + represents a reference to a PersistentVolumeClaim + in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + properties: + claimName: + description: 'ClaimName is the name of a + PersistentVolumeClaim in the same namespace + as the pod using this volume. More info: + https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + type: string + readOnly: + description: Will force the ReadOnly setting + in VolumeMounts. Default false. + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + description: PhotonPersistentDisk represents + a PhotonController persistent disk attached + and mounted on kubelets host machine + properties: + fsType: + description: Filesystem type to mount. Must + be a filesystem type supported by the + host operating system. Ex. "ext4", "xfs", + "ntfs". Implicitly inferred to be "ext4" + if unspecified. + type: string + pdID: + description: ID that identifies Photon Controller + persistent disk + type: string + required: + - pdID + type: object + portworxVolume: + description: PortworxVolume represents a portworx + volume attached and mounted on kubelets host + machine + properties: + fsType: + description: FSType represents the filesystem + type to mount Must be a filesystem type + supported by the host operating system. + Ex. "ext4", "xfs". Implicitly inferred + to be "ext4" if unspecified. + type: string + readOnly: + description: Defaults to false (read/write). + ReadOnly here will force the ReadOnly + setting in VolumeMounts. + type: boolean + volumeID: + description: VolumeID uniquely identifies + a Portworx volume + type: string + required: + - volumeID + type: object + projected: + description: Items for all in one resources + secrets, configmaps, and downward API + properties: + defaultMode: + description: Mode bits to use on created + files by default. Must be a value between + 0 and 0777. Directories within the path + are not affected by this setting. This + might be in conflict with other options + that affect the file mode, like fsGroup, + and the result can be other mode bits + set. + format: int32 + type: integer + sources: + description: list of volume projections + items: + description: Projection that may be projected + along with other supported volume types + properties: + configMap: + description: information about the + configMap data to project + properties: items: + description: If unspecified, each + key-value pair in the Data field + of the referenced ConfigMap + will be projected into the volume + as a file whose name is the + key and content is the value. + If specified, the listed keys + will be projected into the specified + paths, and unlisted keys will + not be present. If a key is + specified which is not present + in the ConfigMap, the volume + setup will error unless it is + marked optional. Paths must + be relative and may not contain + the '..' path or start with + '..'. + items: + description: Maps a string key + to a path within a volume. + properties: + key: + description: The key to + project. + type: string + mode: + description: 'Optional: + mode bits to use on this + file, must be a value + between 0 and 0777. If + not specified, the volume + defaultMode will be used. + This might be in conflict + with other options that + affect the file mode, + like fsGroup, and the + result can be other mode + bits set.' + format: int32 + type: integer + path: + description: The relative + path of the file to map + the key to. May not be + an absolute path. May + not contain the path element + '..'. May not start with + the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. + apiVersion, kind, uid?' type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select objects. - A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select objects. - A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select nodes. Selector - which must match a node's labels, and - objects must belong to these selected - nodes. + optional: + description: Specify whether the + ConfigMap or its keys must be + defined + type: boolean + type: object + downwardAPI: + description: information about the + downwardAPI data to project + properties: + items: + description: Items is a list of + DownwardAPIVolume file + items: + description: DownwardAPIVolumeFile + represents information to + create the file containing + the pod field + properties: + fieldRef: + description: 'Required: + Selects a field of the + pod: only annotations, + labels, name and namespace + are supported.' + properties: + apiVersion: + description: Version + of the schema the + FieldPath is written + in terms of, defaults + to "v1". + type: string + fieldPath: + description: Path of + the field to select + in the specified API + version. + type: string + required: + - fieldPath + type: object + mode: + description: 'Optional: + mode bits to use on this + file, must be a value + between 0 and 0777. If + not specified, the volume + defaultMode will be used. + This might be in conflict + with other options that + affect the file mode, + like fsGroup, and the + result can be other mode + bits set.' + format: int32 + type: integer + path: + description: 'Required: + Path is the relative + path name of the file + to be created. Must not + be absolute or contain + the ''..'' path. Must + be utf-8 encoded. The + first item of the relative + path must not start with + ''..''' + type: string + resourceFieldRef: + description: 'Selects a + resource of the container: + only resources limits + and requests (limits.cpu, + limits.memory, requests.cpu + and requests.memory) are + currently supported.' + properties: + containerName: + description: 'Container + name: required for + volumes, optional + for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies + the output format + of the exposed resources, + defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: + resource to select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + secret: + description: information about the + secret data to project + properties: + items: + description: If unspecified, each + key-value pair in the Data field + of the referenced Secret will + be projected into the volume + as a file whose name is the + key and content is the value. + If specified, the listed keys + will be projected into the specified + paths, and unlisted keys will + not be present. If a key is + specified which is not present + in the Secret, the volume setup + will error unless it is marked + optional. Paths must be relative + and may not contain the '..' + path or start with '..'. + items: + description: Maps a string key + to a path within a volume. + properties: + key: + description: The key to + project. + type: string + mode: + description: 'Optional: + mode bits to use on this + file, must be a value + between 0 and 0777. If + not specified, the volume + defaultMode will be used. + This might be in conflict + with other options that + affect the file mode, + like fsGroup, and the + result can be other mode + bits set.' + format: int32 + type: integer + path: + description: The relative + path of the file to map + the key to. May not be + an absolute path. May + not contain the path element + '..'. May not start with + the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. + apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the + Secret or its key must be defined + type: boolean + type: object + serviceAccountToken: + description: information about the + serviceAccountToken data to project + properties: + audience: + description: Audience is the intended + audience of the token. A recipient + of a token must identify itself + with an identifier specified + in the audience of the token, + and otherwise should reject + the token. The audience defaults + to the identifier of the apiserver. + type: string + expirationSeconds: + description: ExpirationSeconds + is the requested duration of + validity of the service account + token. As the token approaches + expiration, the kubelet volume + plugin will proactively rotate + the service account token. The + kubelet will start trying to + rotate the token if the token + is older than 80 percent of + its time to live or if the token + is older than 24 hours.Defaults + to 1 hour and must be at least + 10 minutes. + format: int64 + type: integer + path: + description: Path is the path + relative to the mount point + of the file to project the token + into. + type: string + required: + - path + type: object type: object - nodes: - description: Nodes is a set of node name - and objects must belong to these nodes. - items: + type: array + required: + - sources + type: object + quobyte: + description: Quobyte represents a Quobyte mount + on the host that shares a pod's lifetime + properties: + group: + description: Group to map volume access + to Default is no group + type: string + readOnly: + description: ReadOnly here will force the + Quobyte volume to be mounted with read-only + permissions. Defaults to false. + type: boolean + registry: + description: Registry represents a single + or multiple Quobyte Registry services + specified as a string as host:port pair + (multiple entries are separated with commas) + which acts as the central registry for + volumes + type: string + tenant: + description: Tenant owning the given Quobyte + volume in the Backend Used with dynamically + provisioned Quobyte volumes, value is + set by the plugin + type: string + user: + description: User to map volume access to + Defaults to serivceaccount user + type: string + volume: + description: Volume is a string that references + an already created Quobyte volume by name. + type: string + required: + - registry + - volume + type: object + rbd: + description: 'RBD represents a Rados Block Device + mount on the host that shares a pod''s lifetime. + More info: https://examples.k8s.io/volumes/rbd/README.md' + properties: + fsType: + description: 'Filesystem type of the volume + that you want to mount. Tip: Ensure that + the filesystem type is supported by the + host operating system. Examples: "ext4", + "xfs", "ntfs". Implicitly inferred to + be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd + TODO: how do we prevent errors in the + filesystem from compromising the machine' + type: string + image: + description: 'The rados image name. More + info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + keyring: + description: 'Keyring is the path to key + ring for RBDUser. Default is /etc/ceph/keyring. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + monitors: + description: 'A collection of Ceph monitors. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + items: + type: string + type: array + pool: + description: 'The rados pool name. Default + is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + readOnly: + description: 'ReadOnly here will force the + ReadOnly setting in VolumeMounts. Defaults + to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: boolean + secretRef: + description: 'SecretRef is name of the authentication + secret for RBDUser. If provided overrides + keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set - of condition of a pod at the current - time. supported value: Pending / Running - / Succeeded / Failed / Unknown' - items: + type: object + user: + description: 'The rados user name. Default + is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + required: + - image + - monitors + type: object + scaleIO: + description: ScaleIO represents a ScaleIO persistent + volume attached and mounted on Kubernetes + nodes. + properties: + fsType: + description: Filesystem type to mount. Must + be a filesystem type supported by the + host operating system. Ex. "ext4", "xfs", + "ntfs". Default is "xfs". + type: string + gateway: + description: The host address of the ScaleIO + API Gateway. + type: string + protectionDomain: + description: The name of the ScaleIO Protection + Domain for the configured storage. + type: string + readOnly: + description: Defaults to false (read/write). + ReadOnly here will force the ReadOnly + setting in VolumeMounts. + type: boolean + secretRef: + description: SecretRef references to the + secret for ScaleIO user and other sensitive + information. If this is not provided, + Login operation will fail. + properties: + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' type: string - type: array - pods: - additionalProperties: - items: + type: object + sslEnabled: + description: Flag to enable/disable SSL + communication with Gateway, default false + type: boolean + storageMode: + description: Indicates whether the storage + for a volume should be ThickProvisioned + or ThinProvisioned. Default is ThinProvisioned. + type: string + storagePool: + description: The ScaleIO Storage Pool associated + with the protection domain. + type: string + system: + description: The name of the storage system + as configured in ScaleIO. + type: string + volumeName: + description: The name of a volume already + created in the ScaleIO system that is + associated with this volume source. + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + description: 'Secret represents a secret that + should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + properties: + defaultMode: + description: 'Optional: mode bits to use + on created files by default. Must be a + value between 0 and 0777. Defaults to + 0644. Directories within the path are + not affected by this setting. This might + be in conflict with other options that + affect the file mode, like fsGroup, and + the result can be other mode bits set.' + format: int32 + type: integer + items: + description: If unspecified, each key-value + pair in the Data field of the referenced + Secret will be projected into the volume + as a file whose name is the key and content + is the value. If specified, the listed + keys will be projected into the specified + paths, and unlisted keys will not be present. + If a key is specified which is not present + in the Secret, the volume setup will error + unless it is marked optional. Paths must + be relative and may not contain the '..' + path or start with '..'. + items: + description: Maps a string key to a path + within a volume. + properties: + key: + description: The key to project. type: string - type: array - description: Pods is a map of string keys - and a set values that used to select - pods. The key defines the namespace - which pods belong, and the each values - is a set of pod names. + mode: + description: 'Optional: mode bits + to use on this file, must be a value + between 0 and 0777. If not specified, + the volume defaultMode will be used. + This might be in conflict with other + options that affect the file mode, + like fsGroup, and the result can + be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of + the file to map the key to. May + not be an absolute path. May not + contain the path element '..'. May + not start with the string '..'. + type: string + required: + - key + - path type: object - type: object - value: - description: Value is required when the mode - is set to `FixedPodMode` / `FixedPercentPodMod` - / `RandomMaxPercentPodMod`. If `FixedPodMode`, - provide an integer of pods to do chaos action. - If `FixedPercentPodMod`, provide a number - from 0-100 to specify the percent of pods - the server can do chaos action. IF `RandomMaxPercentPodMod`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action - type: string - required: - - mode - - selector - type: object - value: - description: Value is required when the mode is - set to `FixedPodMode` / `FixedPercentPodMod` - / `RandomMaxPercentPodMod`. If `FixedPodMode`, - provide an integer of pods to do chaos action. - If `FixedPercentPodMod`, provide a number from - 0-100 to specify the percent of pods the server - can do chaos action. IF `RandomMaxPercentPodMod`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action - type: string - required: - - action - - mode - - selector - type: object - podChaos: - description: PodChaosSpec defines the attributes that - a user creates on a chaos experiment about pods. - properties: - action: - description: 'Action defines the specific pod - chaos action. Supported action: pod-kill / pod-failure - / container-kill Default action: pod-kill' - enum: - - pod-kill - - pod-failure - - container-kill - type: string - containerNames: - description: ContainerNames indicates list of - the name of affected container. If not set, - all containers will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration - of the chaos action. It is required when the - action is `PodFailureAction`. A duration string - is a possibly signed sequence of decimal numbers, - each with optional fraction and a unit suffix, - such as "300ms", "-1.5h" or "2h45m". Valid time - units are "ns", "us" (or "µs"), "ms", "s", "m", - "h". - type: string - gracePeriod: - description: GracePeriod is used in pod-kill action. - It represents the duration in seconds before - the pod should be deleted. Value must be non-negative - integer. The default value is zero that indicates - delete immediately. - format: int64 - minimum: 0 - type: integer - mode: - description: 'Mode defines the mode to run chaos - action. Supported mode: one / all / fixed / - fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - selector: - description: Selector is used to select pods that - are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: + type: array + optional: + description: Specify whether the Secret + or its keys must be defined + type: boolean + secretName: + description: 'Name of the secret in the + pod''s namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' type: string - description: Map of string keys and values - that can be used to select objects. A selector - based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list - of selectors based on set-based label expressions. - items: - description: A label selector requirement - is a selector that contains values, a - key, and an operator that relates the - key and values. + type: object + storageos: + description: StorageOS represents a StorageOS + volume attached and mounted on Kubernetes + nodes. + properties: + fsType: + description: Filesystem type to mount. Must + be a filesystem type supported by the + host operating system. Ex. "ext4", "xfs", + "ntfs". Implicitly inferred to be "ext4" + if unspecified. + type: string + readOnly: + description: Defaults to false (read/write). + ReadOnly here will force the ReadOnly + setting in VolumeMounts. + type: boolean + secretRef: + description: SecretRef specifies the secret + to use for obtaining the StorageOS API + credentials. If not specified, default + values will be attempted. properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. This - array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator type: object - type: array - fieldSelectors: - additionalProperties: + volumeName: + description: VolumeName is the human-readable + name of the StorageOS volume. Volume + names are only unique within a namespace. type: string - description: Map of string keys and values - that can be used to select objects. A selector - based on fields. - type: object - labelSelectors: - additionalProperties: + volumeNamespace: + description: VolumeNamespace specifies the + scope of the volume within StorageOS. If + no namespace is specified then the Pod's + namespace will be used. This allows the + Kubernetes name scoping to be mirrored + within StorageOS for tighter integration. + Set VolumeName to any name to override + the default behaviour. Set to "default" + if you are not using namespaces within + StorageOS. Namespaces that do not pre-exist + within StorageOS will be created. type: string - description: Map of string keys and values - that can be used to select objects. A selector - based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: + type: object + vsphereVolume: + description: VsphereVolume represents a vSphere + volume attached and mounted on kubelets host + machine + properties: + fsType: + description: Filesystem type to mount. Must + be a filesystem type supported by the + host operating system. Ex. "ext4", "xfs", + "ntfs". Implicitly inferred to be "ext4" + if unspecified. type: string - type: array - nodeSelectors: - additionalProperties: + storagePolicyID: + description: Storage Policy Based Management + (SPBM) profile ID associated with the + StoragePolicyName. type: string - description: Map of string keys and values - that can be used to select nodes. Selector - which must match a node's labels, and objects - must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and - objects must belong to these nodes. - items: + storagePolicyName: + description: Storage Policy Based Management + (SPBM) profile name. + type: string + volumePath: + description: Path that identifies vSphere + volume vmdk + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + type: object + tasks: + description: Tasks describes the children steps of serial + or parallel node. Only used when Type is TypeSerial + or TypeParallel. + items: + type: string + type: array + templateType: + type: string + timeChaos: + description: TimeChaosSpec defines the desired state of + TimeChaos + properties: + clockIds: + description: ClockIds defines all affected clock id + All available options are ["CLOCK_REALTIME","CLOCK_MONOTONIC","CLOCK_PROCESS_CPUTIME_ID","CLOCK_THREAD_CPUTIME_ID", + "CLOCK_MONOTONIC_RAW","CLOCK_REALTIME_COARSE","CLOCK_MONOTONIC_COARSE","CLOCK_BOOTTIME","CLOCK_REALTIME_ALARM", + "CLOCK_BOOTTIME_ALARM"] Default value is ["CLOCK_REALTIME"] + items: + type: string + type: array + containerNames: + description: ContainerNames indicates list of the + name of affected container. If not set, all containers + will be injected + items: + type: string + type: array + duration: + description: Duration represents the duration of the + chaos action + type: string + mode: + description: 'Mode defines the mode to run chaos action. + Supported mode: one / all / fixed / fixed-percent + / random-max-percent' + enum: + - one + - all + - fixed + - fixed-percent + - random-max-percent + type: string + selector: + description: Selector is used to select pods that + are used to inject chaos action. + properties: + annotationSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select objects. A selector based + on annotations. + type: object + expressionSelectors: + description: a slice of label selector expressions + that can be used to select objects. A list of + selectors based on set-based label expressions. + items: + description: A label selector requirement is + a selector that contains values, a key, and + an operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of - condition of a pod at the current time. - supported value: Pending / Running / Succeeded - / Failed / Unknown' - items: + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and DoesNotExist. type: string - type: array - pods: - additionalProperties: + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If + the operator is Exists or DoesNotExist, + the values array must be empty. This array + is replaced during a strategic merge patch. items: type: string type: array - description: Pods is a map of string keys - and a set values that used to select pods. - The key defines the namespace which pods - belong, and the each values is a set of - pod names. - type: object + required: + - key + - operator + type: object + type: array + fieldSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select objects. A selector based + on fields. type: object - value: - description: Value is required when the mode is - set to `FixedPodMode` / `FixedPercentPodMod` - / `RandomMaxPercentPodMod`. If `FixedPodMode`, - provide an integer of pods to do chaos action. - If `FixedPercentPodMod`, provide a number from - 0-100 to specify the percent of pods the server - can do chaos action. IF `RandomMaxPercentPodMod`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action + labelSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select objects. A selector based + on labels. + type: object + namespaces: + description: Namespaces is a set of namespace + to which objects belong. + items: + type: string + type: array + nodeSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select nodes. Selector which + must match a node's labels, and objects must + belong to these selected nodes. + type: object + nodes: + description: Nodes is a set of node name and objects + must belong to these nodes. + items: + type: string + type: array + podPhaseSelectors: + description: 'PodPhaseSelectors is a set of condition + of a pod at the current time. supported value: + Pending / Running / Succeeded / Failed / Unknown' + items: + type: string + type: array + pods: + additionalProperties: + items: + type: string + type: array + description: Pods is a map of string keys and + a set values that used to select pods. The key + defines the namespace which pods belong, and + the each values is a set of pod names. + type: object + type: object + timeOffset: + description: TimeOffset defines the delta time of + injected program. It's a possibly signed sequence + of decimal numbers, such as "300ms", "-1.5h" or + "2h45m". Valid time units are "ns", "us" (or "µs"), + "ms", "s", "m", "h". + type: string + value: + description: Value is required when the mode is set + to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. + If `FixedPodMode`, provide an integer of pods to + do chaos action. If `FixedPercentPodMod`, provide + a number from 0-100 to specify the percent of pods + the server can do chaos action. IF `RandomMaxPercentPodMod`, provide + a number from 0-100 to specify the max percent of + pods to do chaos action + type: string + required: + - mode + - selector + - timeOffset + type: object + required: + - name + - templateType + type: object + type: array + required: + - entry + - templates + type: object + required: + - schedule + - type + type: object + startTime: + format: date-time + type: string + stressChaos: + description: StressChaosSpec defines the desired state of StressChaos + properties: + containerNames: + description: ContainerNames indicates list of the name of affected + container. If not set, all containers will be injected + items: + type: string + type: array + duration: + description: Duration represents the duration of the chaos action + type: string + mode: + description: 'Mode defines the mode to run chaos action. Supported + mode: one / all / fixed / fixed-percent / random-max-percent' + enum: + - one + - all + - fixed + - fixed-percent + - random-max-percent + type: string + selector: + description: Selector is used to select pods that are used to inject + chaos action. + properties: + annotationSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can be used + to select objects. A selector based on annotations. + type: object + expressionSelectors: + description: a slice of label selector expressions that can + be used to select objects. A list of selectors based on set-based + label expressions. + items: + description: A label selector requirement is a selector that + contains values, a key, and an operator that relates the + key and values. + properties: + key: + description: key is the label key that the selector applies + to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are In, NotIn, Exists + and DoesNotExist. + type: string + values: + description: values is an array of string values. If the + operator is In or NotIn, the values array must be non-empty. + If the operator is Exists or DoesNotExist, the values + array must be empty. This array is replaced during a + strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + fieldSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can be used + to select objects. A selector based on fields. + type: object + labelSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can be used + to select objects. A selector based on labels. + type: object + namespaces: + description: Namespaces is a set of namespace to which objects + belong. + items: + type: string + type: array + nodeSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can be used + to select nodes. Selector which must match a node's labels, + and objects must belong to these selected nodes. + type: object + nodes: + description: Nodes is a set of node name and objects must belong + to these nodes. + items: + type: string + type: array + podPhaseSelectors: + description: 'PodPhaseSelectors is a set of condition of a pod + at the current time. supported value: Pending / Running / + Succeeded / Failed / Unknown' + items: + type: string + type: array + pods: + additionalProperties: + items: + type: string + type: array + description: Pods is a map of string keys and a set values that + used to select pods. The key defines the namespace which pods + belong, and the each values is a set of pod names. + type: object + type: object + stressngStressors: + description: StressngStressors defines plenty of stressors just + like `Stressors` except that it's an experimental feature and + more powerful. You can define stressors in `stress-ng` (see also + `man stress-ng`) dialect, however not all of the supported stressors + are well tested. It maybe retired in later releases. You should + always use `Stressors` to define the stressors and use this only + when you want more stressors unsupported by `Stressors`. When + both `StressngStressors` and `Stressors` are defined, `StressngStressors` + wins. + type: string + stressors: + description: Stressors defines plenty of stressors supported to + stress system components out. You can use one or more of them + to make up various kinds of stresses. At least one of the stressors + should be specified. + properties: + cpu: + description: CPUStressor stresses CPU out + properties: + load: + description: Load specifies P percent loading per CPU worker. + 0 is effectively a sleep (no load) and 100 is full loading. + type: integer + options: + description: extend stress-ng options + items: + type: string + type: array + workers: + description: Workers specifies N workers to apply the stressor. + type: integer + required: + - workers + type: object + memory: + description: MemoryStressor stresses virtual memory out + properties: + options: + description: extend stress-ng options + items: + type: string + type: array + size: + description: Size specifies N bytes consumed per vm worker, + default is the total available memory. One can specify + the size as % of total available memory or in units of + B, KB/KiB, MB/MiB, GB/GiB, TB/TiB. + type: string + workers: + description: Workers specifies N workers to apply the stressor. + type: integer + required: + - workers + type: object + type: object + value: + description: Value is required when the mode is set to `FixedPodMode` + / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. If `FixedPodMode`, + provide an integer of pods to do chaos action. If `FixedPercentPodMod`, + provide a number from 0-100 to specify the percent of pods the + server can do chaos action. IF `RandomMaxPercentPodMod`, provide + a number from 0-100 to specify the max percent of pods to do chaos + action + type: string + required: + - mode + - selector + type: object + task: + properties: + container: + description: Container is the main container image to run in the + pod + properties: + args: + description: '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. 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. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + command: + description: '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. 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. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + env: + description: List of environment variables to set in the container. + Cannot be updated. + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be + a C_IDENTIFIER. + type: string + value: + description: '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 "".' + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' type: string + optional: + description: Specify whether the ConfigMap or + its key must be defined + type: boolean required: - - action - - mode - - selector + - key type: object - schedule: - type: string - startingDeadlineSeconds: - format: int64 - minimum: 0 - nullable: true - type: integer - stressChaos: - description: StressChaosSpec defines the desired state - of StressChaos + fieldRef: + description: 'Selects a field of the pod: supports + metadata.name, metadata.namespace, metadata.labels, + metadata.annotations, spec.nodeName, spec.serviceAccountName, + status.hostIP, status.podIP, status.podIPs.' properties: - containerNames: - description: ContainerNames indicates list of - the name of affected container. If not set, - all containers will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration - of the chaos action + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". type: string - mode: - description: 'Mode defines the mode to run chaos - action. Supported mode: one / all / fixed / - fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent + fieldPath: + description: Path of the field to select in the + specified API version. type: string - selector: - description: Selector is used to select pods that - are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select objects. A selector - based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list - of selectors based on set-based label expressions. - items: - description: A label selector requirement - is a selector that contains values, a - key, and an operator that relates the - key and values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. This - array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select objects. A selector - based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select objects. A selector - based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select nodes. Selector - which must match a node's labels, and objects - must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and - objects must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of - condition of a pod at the current time. - supported value: Pending / Running / Succeeded - / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys - and a set values that used to select pods. - The key defines the namespace which pods - belong, and the each values is a set of - pod names. - type: object - type: object - stressngStressors: - description: StressngStressors defines plenty - of stressors just like `Stressors` except that - it's an experimental feature and more powerful. - You can define stressors in `stress-ng` (see - also `man stress-ng`) dialect, however not all - of the supported stressors are well tested. - It maybe retired in later releases. You should - always use `Stressors` to define the stressors - and use this only when you want more stressors - unsupported by `Stressors`. When both `StressngStressors` - and `Stressors` are defined, `StressngStressors` - wins. + required: + - fieldPath + type: object + resourceFieldRef: + description: '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.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' type: string - stressors: - description: Stressors defines plenty of stressors - supported to stress system components out. You - can use one or more of them to make up various - kinds of stresses. At least one of the stressors - should be specified. - properties: - cpu: - description: CPUStressor stresses CPU out - properties: - load: - description: Load specifies P percent - loading per CPU worker. 0 is effectively - a sleep (no load) and 100 is full loading. - type: integer - options: - description: extend stress-ng options - items: - type: string - type: array - workers: - description: Workers specifies N workers - to apply the stressor. - type: integer - required: - - workers - type: object - memory: - description: MemoryStressor stresses virtual - memory out - properties: - options: - description: extend stress-ng options - items: - type: string - type: array - size: - description: Size specifies N bytes consumed - per vm worker, default is the total - available memory. One can specify the - size as % of total available memory - or in units of B, KB/KiB, MB/MiB, GB/GiB, - TB/TiB. - type: string - workers: - description: Workers specifies N workers - to apply the stressor. - type: integer - required: - - workers - type: object - type: object - value: - description: Value is required when the mode is - set to `FixedPodMode` / `FixedPercentPodMod` - / `RandomMaxPercentPodMod`. If `FixedPodMode`, - provide an integer of pods to do chaos action. - If `FixedPercentPodMod`, provide a number from - 0-100 to specify the percent of pods the server - can do chaos action. IF `RandomMaxPercentPodMod`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' type: string required: - - mode - - selector + - resource type: object - timeChaos: - description: TimeChaosSpec defines the desired state - of TimeChaos + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace properties: - clockIds: - description: ClockIds defines all affected clock - id All available options are ["CLOCK_REALTIME","CLOCK_MONOTONIC","CLOCK_PROCESS_CPUTIME_ID","CLOCK_THREAD_CPUTIME_ID", - "CLOCK_MONOTONIC_RAW","CLOCK_REALTIME_COARSE","CLOCK_MONOTONIC_COARSE","CLOCK_BOOTTIME","CLOCK_REALTIME_ALARM", - "CLOCK_BOOTTIME_ALARM"] Default value is ["CLOCK_REALTIME"] - items: - type: string - type: array - containerNames: - description: ContainerNames indicates list of - the name of affected container. If not set, - all containers will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration - of the chaos action + key: + description: The key of the secret to select from. Must + be a valid secret key. type: string - mode: - description: 'Mode defines the mode to run chaos - action. Supported mode: one / all / fixed / - fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' type: string - selector: - description: Selector is used to select pods that - are used to inject chaos action. + optional: + description: Specify whether the Secret or its + key must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + description: 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. + items: + description: EnvFromSource represents the source of a set + of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap must be + defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to each + key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object + type: object + type: array + image: + description: '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.' + type: string + imagePullPolicy: + description: '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' + type: string + lifecycle: + description: Actions that the management system should take + in response to container lifecycle events. Cannot be updated. + properties: + postStart: + description: 'PostStart is called immediately after a container + is created. If the handler fails, the container is terminated + and restarted according to its restart policy. Other management + of the container blocks until the hook completes. More + info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following should + be specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to + the pod IP. You probably want to set "Host" in + httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select objects. A selector - based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list - of selectors based on set-based label expressions. - items: - description: A label selector requirement - is a selector that contains values, a - key, and an operator that relates the - key and values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. This - array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select objects. A selector - based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select objects. A selector - based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select nodes. Selector - which must match a node's labels, and objects - must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and - objects must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of - condition of a pod at the current time. - supported value: Pending / Running / Succeeded - / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys - and a set values that used to select pods. - The key defines the namespace which pods - belong, and the each values is a set of - pod names. - type: object + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the + host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action involving + a TCP port. TCP hooks not yet supported TODO: implement + a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, + defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + description: 'PreStop is called immediately before a container + is terminated due to an API request or management event + such as liveness/startup probe failure, preemption, resource + contention, etc. The handler is not called if the container + crashes or exits. The reason for termination is passed + to the handler. The Pod''s termination grace period countdown + begins before the PreStop hooked is executed. Regardless + of the outcome of the handler, the container will eventually + terminate within the Pod''s termination grace period. + Other management of the container blocks until the hook + completes or until the termination grace period is reached. + More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following should + be specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to + the pod IP. You probably want to set "Host" in + httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value type: object - timeOffset: - description: TimeOffset defines the delta time - of injected program. It's a possibly signed - sequence of decimal numbers, such as "300ms", - "-1.5h" or "2h45m". Valid time units are "ns", - "us" (or "µs"), "ms", "s", "m", "h". + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the + host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action involving + a TCP port. TCP hooks not yet supported TODO: implement + a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, + defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + description: 'Periodic probe of container liveness. Container + will be restarted if the probe fails. Cannot be updated. More + info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following should be + specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe + to be considered failed after having succeeded. Defaults + to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the + pod IP. You probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP + allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name type: string value: - description: Value is required when the mode is - set to `FixedPodMode` / `FixedPercentPodMod` - / `RandomMaxPercentPodMod`. If `FixedPodMode`, - provide an integer of pods to do chaos action. - If `FixedPercentPodMod`, provide a number from - 0-100 to specify the percent of pods the server - can do chaos action. IF `RandomMaxPercentPodMod`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action + description: The header field value type: string required: - - mode - - selector - - timeOffset + - name + - value type: object - type: - description: 'TODO: use a custom type, as `TemplateType` - contains other possible values' + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: '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' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: 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. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving a + TCP port. TCP hooks not yet supported TODO: implement + a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: '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' + format: int32 + type: integer + type: object + name: + description: Name of the container specified as a DNS_LABEL. + Each container in a pod must have a unique name (DNS_LABEL). + Cannot be updated. + type: string + ports: + description: 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. + items: + description: ContainerPort represents a network port in a + single container. + properties: + containerPort: + description: Number of port to expose on the pod's IP + address. This must be a valid port number, 0 < x < 65536. + format: int32 + type: integer + hostIP: + description: What host IP to bind the external port to. + type: string + hostPort: + description: Number of port to expose on the host. If + specified, this must be a valid port number, 0 < x < + 65536. If HostNetwork is specified, this must match + ContainerPort. Most containers do not need this. + format: int32 + type: integer + name: + description: If specified, this must be an IANA_SVC_NAME + and unique within the pod. Each named port in a pod + must have a unique name. Name for the port that can + be referred to by services. + type: string + protocol: + description: Protocol for port. Must be UDP, TCP, or SCTP. + Defaults to "TCP". + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + description: 'Periodic probe of container service readiness. + Container will be removed from service endpoints if the probe + fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following should be + specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe + to be considered failed after having succeeded. Defaults + to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the + pod IP. You probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP + allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: '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' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: 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. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving a + TCP port. TCP hooks not yet supported TODO: implement + a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: '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' + format: int32 + type: integer + type: object + resources: + description: 'Compute Resources required by this container. + Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: '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-compute-resources-container/' + type: object + type: object + securityContext: + description: 'Security options the pod should run with. More + info: https://kubernetes.io/docs/concepts/policy/security-context/ + More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/' + properties: + allowPrivilegeEscalation: + description: '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' + type: boolean + capabilities: + description: The capabilities to add/drop when running containers. + Defaults to the default set of capabilities granted by + the container runtime. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes + in privileged containers are essentially equivalent to + root on the host. Defaults to false. + type: boolean + procMount: + description: 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. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only root + filesystem. Default is false. + type: boolean + runAsGroup: + description: 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. + format: int64 + type: integer + runAsNonRoot: + description: 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. + type: boolean + runAsUser: + description: 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. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to the container. + If unspecified, the container runtime will allocate a + random SELinux context for each container. May also be + set in PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. + properties: + level: + description: Level is SELinux level label that applies + to the container. + type: string + role: + description: Role is a SELinux role label that applies + to the container. + type: string + type: + description: Type is a SELinux type label that applies + to the container. + type: string + user: + description: User is a SELinux user label that applies + to the container. + type: string + type: object + windowsOptions: + description: The Windows specific settings applied to all + containers. If unspecified, the options from the PodSecurityContext + will be used. If set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + properties: + gmsaCredentialSpec: + description: 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. This field is + alpha-level and is only honored by servers that enable + the WindowsGMSA feature flag. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the + GMSA credential spec to use. This field is alpha-level + and is only honored by servers that enable the WindowsGMSA + feature flag. + type: string + runAsUserName: + description: 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. This field is beta-level and may + be disabled with the WindowsRunAsUserName feature + flag. + type: string + type: object + type: object + startupProbe: + description: 'StartupProbe indicates that the Pod has successfully + initialized. If specified, no other probes are executed until + this completes successfully. If this probe fails, the Pod + will be restarted, just as if the livenessProbe failed. This + can be used to provide different probe parameters at the beginning + of a Pod''s lifecycle, when it might take a long time to load + data or warm a cache, than during steady-state operation. + This cannot be updated. This is an alpha feature enabled by + the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following should be + specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe + to be considered failed after having succeeded. Defaults + to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the + pod IP. You probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP + allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: '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' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: 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. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving a + TCP port. TCP hooks not yet supported TODO: implement + a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: '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' + format: int32 + type: integer + type: object + stdin: + description: 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. + type: boolean + stdinOnce: + description: 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 + type: boolean + terminationMessagePath: + description: '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.' + type: string + terminationMessagePolicy: + description: 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. + type: string + tty: + description: Whether this container should allocate a TTY for + itself, also requires 'stdin' to be true. Default is false. + type: boolean + volumeDevices: + description: volumeDevices is the list of block devices to be + used by the container. This is a beta feature. + items: + description: volumeDevice describes a mapping of a raw block + device within a container. + properties: + devicePath: + description: devicePath is the path inside of the container + that the device will be mapped to. + type: string + name: + description: name must match the name of a persistentVolumeClaim + in the pod + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + description: Pod volumes to mount into the container's filesystem. + Cannot be updated. + items: + description: VolumeMount describes a mounting of a Volume + within a container. + properties: + mountPath: + description: Path within the container at which the volume + should be mounted. Must not contain ':'. + type: string + mountPropagation: + description: 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. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write otherwise + (false or unspecified). Defaults to false. + type: boolean + subPath: + description: Path within the volume from which the container's + volume should be mounted. Defaults to "" (volume's root). + type: string + subPathExpr: + description: 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. + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: 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. + type: string + required: + - name + type: object + volumes: + description: Volumes is a list of volumes that can be mounted by + containers in a template. + items: + description: Volume represents a named volume in a pod that may + be accessed by any container in the pod. + properties: + awsElasticBlockStore: + description: 'AWSElasticBlockStore represents an AWS Disk + resource that is attached to a kubelet''s host machine and + then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + properties: + fsType: + description: 'Filesystem type of the volume that you want + to mount. Tip: Ensure that the filesystem type is supported + by the host operating system. Examples: "ext4", "xfs", + "ntfs". Implicitly inferred to be "ext4" if unspecified. + More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + TODO: how do we prevent errors in the filesystem from + compromising the machine' + type: string + partition: + description: 'The partition in the volume that you want + to mount. If omitted, the default is to mount by volume + name. Examples: For volume /dev/sda1, you specify the + partition as "1". Similarly, the volume partition for + /dev/sda is "0" (or you can leave the property empty).' + format: int32 + type: integer + readOnly: + description: 'Specify "true" to force and set the ReadOnly + property in VolumeMounts to "true". If omitted, the + default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: boolean + volumeID: + description: 'Unique ID of the persistent disk resource + in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: string + required: + - volumeID + type: object + azureDisk: + description: AzureDisk represents an Azure Data Disk mount + on the host and bind mount to the pod. + properties: + cachingMode: + description: 'Host Caching mode: None, Read Only, Read + Write.' + type: string + diskName: + description: The Name of the data disk in the blob storage + type: string + diskURI: + description: The URI the data disk in the blob storage + type: string + fsType: + description: Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + kind: + description: 'Expected values Shared: multiple blob disks + per storage account Dedicated: single blob disk per + storage account Managed: azure managed data disk (only + in managed availability set). defaults to shared' + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + description: AzureFile represents an Azure File Service mount + on the host and bind mount to the pod. + properties: + readOnly: + description: Defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretName: + description: the name of secret that contains Azure Storage + Account Name and Key + type: string + shareName: + description: Share Name + type: string + required: + - secretName + - shareName + type: object + cephfs: + description: CephFS represents a Ceph FS mount on the host + that shares a pod's lifetime + properties: + monitors: + description: 'Required: Monitors is a collection of Ceph + monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + items: + type: string + type: array + path: + description: 'Optional: Used as the mounted root, rather + than the full Ceph tree, default is /' + type: string + readOnly: + description: 'Optional: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts. + More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: boolean + secretFile: + description: 'Optional: SecretFile is the path to key + ring for User, default is /etc/ceph/user.secret More + info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + secretRef: + description: 'Optional: SecretRef is reference to the + authentication secret for User, default is empty. More + info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + type: object + user: + description: 'Optional: User is the rados user name, default + is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + required: + - monitors + type: object + cinder: + description: 'Cinder represents a cinder volume attached and + mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + properties: + fsType: + description: 'Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Examples: + "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + readOnly: + description: 'Optional: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts. + More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: boolean + secretRef: + description: 'Optional: points to a secret object containing + parameters used to connect to OpenStack.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' type: string - required: - - schedule - - type type: object - stressChaos: - description: StressChaosSpec defines the desired state - of StressChaos - properties: - containerNames: - description: ContainerNames indicates list of the - name of affected container. If not set, all containers - will be injected - items: + volumeID: + description: 'volume id used to identify the volume in + cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + required: + - volumeID + type: object + configMap: + description: ConfigMap represents a configMap that should + populate this volume + properties: + defaultMode: + description: 'Optional: mode bits to use on created files + by default. Must be a value between 0 and 0777. Defaults + to 0644. Directories within the path are not affected + by this setting. This might be in conflict with other + options that affect the file mode, like fsGroup, and + the result can be other mode bits set.' + format: int32 + type: integer + items: + description: If unspecified, each key-value pair in the + Data field of the referenced ConfigMap will be projected + into the volume as a file whose name is the key and + content is the value. If specified, the listed keys + will be projected into the specified paths, and unlisted + keys will not be present. If a key is specified which + is not present in the ConfigMap, the volume setup will + error unless it is marked optional. Paths must be relative + and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. type: string - type: array - duration: - description: Duration represents the duration of the - chaos action - type: string - mode: - description: 'Mode defines the mode to run chaos action. - Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent + mode: + description: 'Optional: mode bits to use on this + file, must be a value between 0 and 0777. If not + specified, the volume defaultMode will be used. + This might be in conflict with other options that + affect the file mode, like fsGroup, and the result + can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map + the key to. May not be an absolute path. May not + contain the path element '..'. May not start with + the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its keys + must be defined + type: boolean + type: object + csi: + description: CSI (Container Storage Interface) represents + storage that is handled by an external CSI driver (Alpha + feature). + properties: + driver: + description: Driver is the name of the CSI driver that + handles this volume. Consult with your admin for the + correct name as registered in the cluster. + type: string + fsType: + description: Filesystem type to mount. Ex. "ext4", "xfs", + "ntfs". If not provided, the empty value is passed to + the associated CSI driver which will determine the default + filesystem to apply. + type: string + nodePublishSecretRef: + description: NodePublishSecretRef is a reference to the + secret object containing sensitive information to pass + to the CSI driver to complete the CSI NodePublishVolume + and NodeUnpublishVolume calls. This field is optional, + and may be empty if no secret is required. If the secret + object contains more than one secret, all secret references + are passed. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' type: string - selector: - description: Selector is used to select pods that - are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list of - selectors based on set-based label expressions. - items: - description: A label selector requirement is - a selector that contains values, a key, and - an operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If - the operator is Exists or DoesNotExist, - the values array must be empty. This array - is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: + type: object + readOnly: + description: Specifies a read-only configuration for the + volume. Defaults to false (read/write). + type: boolean + volumeAttributes: + additionalProperties: + type: string + description: VolumeAttributes stores driver-specific properties + that are passed to the CSI driver. Consult your driver's + documentation for supported values. + type: object + required: + - driver + type: object + downwardAPI: + description: DownwardAPI represents downward API about the + pod that should populate this volume + properties: + defaultMode: + description: 'Optional: mode bits to use on created files + by default. Must be a value between 0 and 0777. Defaults + to 0644. Directories within the path are not affected + by this setting. This might be in conflict with other + options that affect the file mode, like fsGroup, and + the result can be other mode bits set.' + format: int32 + type: integer + items: + description: Items is a list of downward API volume file + items: + description: DownwardAPIVolumeFile represents information + to create the file containing the pod field + properties: + fieldRef: + description: 'Required: Selects a field of the pod: + only annotations, labels, name and namespace are + supported.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". type: string - type: array - nodeSelectors: - additionalProperties: + fieldPath: + description: Path of the field to select in + the specified API version. type: string - description: Map of string keys and values that - can be used to select nodes. Selector which - must match a node's labels, and objects must - belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects - must belong to these nodes. - items: + required: + - fieldPath + type: object + mode: + description: 'Optional: mode bits to use on this + file, must be a value between 0 and 0777. If not + specified, the volume defaultMode will be used. + This might be in conflict with other options that + affect the file mode, like fsGroup, and the result + can be other mode bits set.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative path + name of the file to be created. Must not be absolute + or contain the ''..'' path. Must be utf-8 encoded. + The first item of the relative path must not start + with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, requests.cpu and requests.memory) + are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: - Pending / Running / Succeeded / Failed / Unknown' - items: + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of + the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and - a set values that used to select pods. The key - defines the namespace which pods belong, and - the each values is a set of pod names. - type: object - type: object - stressngStressors: - description: StressngStressors defines plenty of stressors - just like `Stressors` except that it's an experimental - feature and more powerful. You can define stressors - in `stress-ng` (see also `man stress-ng`) dialect, - however not all of the supported stressors are well - tested. It maybe retired in later releases. You - should always use `Stressors` to define the stressors - and use this only when you want more stressors unsupported - by `Stressors`. When both `StressngStressors` and - `Stressors` are defined, `StressngStressors` wins. - type: string - stressors: - description: Stressors defines plenty of stressors - supported to stress system components out. You can - use one or more of them to make up various kinds - of stresses. At least one of the stressors should - be specified. - properties: - cpu: - description: CPUStressor stresses CPU out - properties: - load: - description: Load specifies P percent loading - per CPU worker. 0 is effectively a sleep - (no load) and 100 is full loading. - type: integer - options: - description: extend stress-ng options - items: - type: string - type: array - workers: - description: Workers specifies N workers to - apply the stressor. - type: integer - required: - - workers - type: object - memory: - description: MemoryStressor stresses virtual memory - out - properties: - options: - description: extend stress-ng options - items: - type: string - type: array - size: - description: Size specifies N bytes consumed - per vm worker, default is the total available - memory. One can specify the size as % of - total available memory or in units of B, - KB/KiB, MB/MiB, GB/GiB, TB/TiB. - type: string - workers: - description: Workers specifies N workers to - apply the stressor. - type: integer - required: - - workers - type: object - type: object - value: - description: Value is required when the mode is set - to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. - If `FixedPodMode`, provide an integer of pods to - do chaos action. If `FixedPercentPodMod`, provide - a number from 0-100 to specify the percent of pods - the server can do chaos action. IF `RandomMaxPercentPodMod`, provide - a number from 0-100 to specify the max percent of - pods to do chaos action + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + emptyDir: + description: 'EmptyDir represents a temporary directory that + shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + properties: + medium: + description: 'What type of storage medium should back + this directory. The default is "" which means to use + the node''s default medium. Must be an empty string + (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + description: 'Total amount of local storage required for + this EmptyDir volume. The size limit is also applicable + for memory medium. The maximum usage on memory medium + EmptyDir would be the minimum value between the SizeLimit + specified here and the sum of memory limits of all containers + in a pod. The default is nil which means that the limit + is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir' + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + fc: + description: FC represents a Fibre Channel resource that is + attached to a kubelet's host machine and then exposed to + the pod. + properties: + fsType: + description: 'Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + TODO: how do we prevent errors in the filesystem from + compromising the machine' + type: string + lun: + description: 'Optional: FC target lun number' + format: int32 + type: integer + readOnly: + description: 'Optional: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts.' + type: boolean + targetWWNs: + description: 'Optional: FC target worldwide names (WWNs)' + items: + type: string + type: array + wwids: + description: 'Optional: FC volume world wide identifiers + (wwids) Either wwids or combination of targetWWNs and + lun must be set, but not both simultaneously.' + items: + type: string + type: array + type: object + flexVolume: + description: FlexVolume represents a generic volume resource + that is provisioned/attached using an exec based plugin. + properties: + driver: + description: Driver is the name of the driver to use for + this volume. + type: string + fsType: + description: Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". The default filesystem depends on FlexVolume + script. + type: string + options: + additionalProperties: + type: string + description: 'Optional: Extra command options if any.' + type: object + readOnly: + description: 'Optional: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts.' + type: boolean + secretRef: + description: 'Optional: SecretRef is reference to the + secret object containing sensitive information to pass + to the plugin scripts. This may be empty if no secret + object is specified. If the secret object contains more + than one secret, all secrets are passed to the plugin + scripts.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' type: string - required: - - mode - - selector type: object - tasks: + required: + - driver + type: object + flocker: + description: Flocker represents a Flocker volume attached + to a kubelet's host machine. This depends on the Flocker + control service being running + properties: + datasetName: + description: Name of the dataset stored as metadata -> + name on the dataset for Flocker should be considered + as deprecated + type: string + datasetUUID: + description: UUID of the dataset. This is unique identifier + of a Flocker dataset + type: string + type: object + gcePersistentDisk: + description: 'GCEPersistentDisk represents a GCE Disk resource + that is attached to a kubelet''s host machine and then exposed + to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + properties: + fsType: + description: 'Filesystem type of the volume that you want + to mount. Tip: Ensure that the filesystem type is supported + by the host operating system. Examples: "ext4", "xfs", + "ntfs". Implicitly inferred to be "ext4" if unspecified. + More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + TODO: how do we prevent errors in the filesystem from + compromising the machine' + type: string + partition: + description: 'The partition in the volume that you want + to mount. If omitted, the default is to mount by volume + name. Examples: For volume /dev/sda1, you specify the + partition as "1". Similarly, the volume partition for + /dev/sda is "0" (or you can leave the property empty). + More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + format: int32 + type: integer + pdName: + description: 'Unique name of the PD resource in GCE. Used + to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: string + readOnly: + description: 'ReadOnly here will force the ReadOnly setting + in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: boolean + required: + - pdName + type: object + gitRepo: + description: 'GitRepo represents a git repository at a particular + revision. DEPRECATED: GitRepo is deprecated. To provision + a container with a git repo, mount an EmptyDir into an InitContainer + that clones the repo using git, then mount the EmptyDir + into the Pod''s container.' + properties: + directory: + description: Target directory name. Must not contain or + start with '..'. If '.' is supplied, the volume directory + will be the git repository. Otherwise, if specified, + the volume will contain the git repository in the subdirectory + with the given name. + type: string + repository: + description: Repository URL + type: string + revision: + description: Commit hash for the specified revision. + type: string + required: + - repository + type: object + glusterfs: + description: 'Glusterfs represents a Glusterfs mount on the + host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md' + properties: + endpoints: + description: 'EndpointsName is the endpoint name that + details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + path: + description: 'Path is the Glusterfs volume path. More + info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + readOnly: + description: 'ReadOnly here will force the Glusterfs volume + to be mounted with read-only permissions. Defaults to + false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: boolean + required: + - endpoints + - path + type: object + hostPath: + description: 'HostPath represents a pre-existing file or directory + on the host machine that is directly exposed to the container. + This is generally used for system agents or other privileged + things that are allowed to see the host machine. Most containers + will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath + --- TODO(jonesdl) We need to restrict who can use host directory + mounts and who can/can not mount host directories as read/write.' + properties: + path: + description: 'Path of the directory on the host. If the + path is a symlink, it will follow the link to the real + path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + type: + description: 'Type for HostPath Volume Defaults to "" + More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + required: + - path + type: object + iscsi: + description: 'ISCSI represents an ISCSI Disk resource that + is attached to a kubelet''s host machine and then exposed + to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' + properties: + chapAuthDiscovery: + description: whether support iSCSI Discovery CHAP authentication + type: boolean + chapAuthSession: + description: whether support iSCSI Session CHAP authentication + type: boolean + fsType: + description: 'Filesystem type of the volume that you want + to mount. Tip: Ensure that the filesystem type is supported + by the host operating system. Examples: "ext4", "xfs", + "ntfs". Implicitly inferred to be "ext4" if unspecified. + More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi + TODO: how do we prevent errors in the filesystem from + compromising the machine' + type: string + initiatorName: + description: Custom iSCSI Initiator Name. If initiatorName + is specified with iscsiInterface simultaneously, new + iSCSI interface : will be + created for the connection. + type: string + iqn: + description: Target iSCSI Qualified Name. + type: string + iscsiInterface: + description: iSCSI Interface Name that uses an iSCSI transport. + Defaults to 'default' (tcp). + type: string + lun: + description: iSCSI Target Lun number. + format: int32 + type: integer + portals: + description: iSCSI Target Portal List. The portal is either + an IP or ip_addr:port if the port is other than default + (typically TCP ports 860 and 3260). items: type: string type: array - templateType: - type: string - timeChaos: - description: TimeChaosSpec defines the desired state of - TimeChaos + readOnly: + description: ReadOnly here will force the ReadOnly setting + in VolumeMounts. Defaults to false. + type: boolean + secretRef: + description: CHAP Secret for iSCSI target and initiator + authentication properties: - clockIds: - description: ClockIds defines all affected clock id - All available options are ["CLOCK_REALTIME","CLOCK_MONOTONIC","CLOCK_PROCESS_CPUTIME_ID","CLOCK_THREAD_CPUTIME_ID", - "CLOCK_MONOTONIC_RAW","CLOCK_REALTIME_COARSE","CLOCK_MONOTONIC_COARSE","CLOCK_BOOTTIME","CLOCK_REALTIME_ALARM", - "CLOCK_BOOTTIME_ALARM"] Default value is ["CLOCK_REALTIME"] - items: - type: string - type: array - containerNames: - description: ContainerNames indicates list of the - name of affected container. If not set, all containers - will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of the - chaos action - type: string - mode: - description: 'Mode defines the mode to run chaos action. - Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' type: string - selector: - description: Selector is used to select pods that - are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list of - selectors based on set-based label expressions. + type: object + targetPortal: + description: iSCSI Target Portal. The Portal is either + an IP or ip_addr:port if the port is other than default + (typically TCP ports 860 and 3260). + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + description: 'Volume''s name. Must be a DNS_LABEL and unique + within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + nfs: + description: 'NFS represents an NFS mount on the host that + shares a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + properties: + path: + description: 'Path that is exported by the NFS server. + More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + readOnly: + description: 'ReadOnly here will force the NFS export + to be mounted with read-only permissions. Defaults to + false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: boolean + server: + description: 'Server is the hostname or IP address of + the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + description: 'PersistentVolumeClaimVolumeSource represents + a reference to a PersistentVolumeClaim in the same namespace. + More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + properties: + claimName: + description: 'ClaimName is the name of a PersistentVolumeClaim + in the same namespace as the pod using this volume. + More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + type: string + readOnly: + description: Will force the ReadOnly setting in VolumeMounts. + Default false. + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + description: PhotonPersistentDisk represents a PhotonController + persistent disk attached and mounted on kubelets host machine + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + pdID: + description: ID that identifies Photon Controller persistent + disk + type: string + required: + - pdID + type: object + portworxVolume: + description: PortworxVolume represents a portworx volume attached + and mounted on kubelets host machine + properties: + fsType: + description: FSType represents the filesystem type to + mount Must be a filesystem type supported by the host + operating system. Ex. "ext4", "xfs". Implicitly inferred + to be "ext4" if unspecified. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + volumeID: + description: VolumeID uniquely identifies a Portworx volume + type: string + required: + - volumeID + type: object + projected: + description: Items for all in one resources secrets, configmaps, + and downward API + properties: + defaultMode: + description: Mode bits to use on created files by default. + Must be a value between 0 and 0777. Directories within + the path are not affected by this setting. This might + be in conflict with other options that affect the file + mode, like fsGroup, and the result can be other mode + bits set. + format: int32 + type: integer + sources: + description: list of volume projections + items: + description: Projection that may be projected along + with other supported volume types + properties: + configMap: + description: information about the configMap data + to project + properties: items: - description: A label selector requirement is - a selector that contains values, a key, and - an operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If - the operator is Exists or DoesNotExist, - the values array must be empty. This array - is replaced during a strategic merge patch. - items: + description: If unspecified, each key-value + pair in the Data field of the referenced ConfigMap + will be projected into the volume as a file + whose name is the key and content is the value. + If specified, the listed keys will be projected + into the specified paths, and unlisted keys + will not be present. If a key is specified + which is not present in the ConfigMap, the + volume setup will error unless it is marked + optional. Paths must be relative and may not + contain the '..' path or start with '..'. + items: + description: Maps a string key to a path within + a volume. + properties: + key: + description: The key to project. type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: + mode: + description: 'Optional: mode bits to use + on this file, must be a value between + 0 and 0777. If not specified, the volume + defaultMode will be used. This might + be in conflict with other options that + affect the file mode, like fsGroup, + and the result can be other mode bits + set.' + format: int32 + type: integer + path: + description: The relative path of the + file to map the key to. May not be an + absolute path. May not contain the path + element '..'. May not start with the + string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' type: string - description: Map of string keys and values that - can be used to select nodes. Selector which - must match a node's labels, and objects must - belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects - must belong to these nodes. + optional: + description: Specify whether the ConfigMap or + its keys must be defined + type: boolean + type: object + downwardAPI: + description: information about the downwardAPI data + to project + properties: items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: - Pending / Running / Succeeded / Failed / Unknown' + description: Items is a list of DownwardAPIVolume + file + items: + description: DownwardAPIVolumeFile represents + information to create the file containing + the pod field + properties: + fieldRef: + description: 'Required: Selects a field + of the pod: only annotations, labels, + name and namespace are supported.' + properties: + apiVersion: + description: Version of the schema + the FieldPath is written in terms + of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to + select in the specified API version. + type: string + required: + - fieldPath + type: object + mode: + description: 'Optional: mode bits to use + on this file, must be a value between + 0 and 0777. If not specified, the volume + defaultMode will be used. This might + be in conflict with other options that + affect the file mode, like fsGroup, + and the result can be other mode bits + set.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative + path name of the file to be created. + Must not be absolute or contain the + ''..'' path. Must be utf-8 encoded. + The first item of the relative path + must not start with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the + container: only resources limits and + requests (limits.cpu, limits.memory, + requests.cpu and requests.memory) are + currently supported.' + properties: + containerName: + description: 'Container name: required + for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output + format of the exposed resources, + defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to + select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + secret: + description: information about the secret data to + project + properties: items: - type: string - type: array - pods: - additionalProperties: + description: If unspecified, each key-value + pair in the Data field of the referenced Secret + will be projected into the volume as a file + whose name is the key and content is the value. + If specified, the listed keys will be projected + into the specified paths, and unlisted keys + will not be present. If a key is specified + which is not present in the Secret, the volume + setup will error unless it is marked optional. + Paths must be relative and may not contain + the '..' path or start with '..'. items: - type: string + description: Maps a string key to a path within + a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use + on this file, must be a value between + 0 and 0777. If not specified, the volume + defaultMode will be used. This might + be in conflict with other options that + affect the file mode, like fsGroup, + and the result can be other mode bits + set.' + format: int32 + type: integer + path: + description: The relative path of the + file to map the key to. May not be an + absolute path. May not contain the path + element '..'. May not start with the + string '..'. + type: string + required: + - key + - path + type: object type: array - description: Pods is a map of string keys and - a set values that used to select pods. The key - defines the namespace which pods belong, and - the each values is a set of pod names. - type: object - type: object - timeOffset: - description: TimeOffset defines the delta time of - injected program. It's a possibly signed sequence - of decimal numbers, such as "300ms", "-1.5h" or - "2h45m". Valid time units are "ns", "us" (or "µs"), - "ms", "s", "m", "h". - type: string - value: - description: Value is required when the mode is set - to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. - If `FixedPodMode`, provide an integer of pods to - do chaos action. If `FixedPercentPodMod`, provide - a number from 0-100 to specify the percent of pods - the server can do chaos action. IF `RandomMaxPercentPodMod`, provide - a number from 0-100 to specify the max percent of - pods to do chaos action - type: string - required: - - mode - - selector - - timeOffset - type: object + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret or its + key must be defined + type: boolean + type: object + serviceAccountToken: + description: information about the serviceAccountToken + data to project + properties: + audience: + description: Audience is the intended audience + of the token. A recipient of a token must + identify itself with an identifier specified + in the audience of the token, and otherwise + should reject the token. The audience defaults + to the identifier of the apiserver. + type: string + expirationSeconds: + description: ExpirationSeconds is the requested + duration of validity of the service account + token. As the token approaches expiration, + the kubelet volume plugin will proactively + rotate the service account token. The kubelet + will start trying to rotate the token if the + token is older than 80 percent of its time + to live or if the token is older than 24 hours.Defaults + to 1 hour and must be at least 10 minutes. + format: int64 + type: integer + path: + description: Path is the path relative to the + mount point of the file to project the token + into. + type: string + required: + - path + type: object + type: object + type: array required: - - name - - templateType + - sources type: object - type: array - required: - - entry - - templates - type: object - required: - - schedule - - type - type: object - startTime: - format: date-time - type: string - stressChaos: - description: StressChaosSpec defines the desired state of StressChaos - properties: - containerNames: - description: ContainerNames indicates list of the name of affected - container. If not set, all containers will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of the chaos action - type: string - mode: - description: 'Mode defines the mode to run chaos action. Supported - mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - selector: - description: Selector is used to select pods that are used to inject - chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that can - be used to select objects. A list of selectors based on set-based - label expressions. - items: - description: A label selector requirement is a selector that - contains values, a key, and an operator that relates the - key and values. + quobyte: + description: Quobyte represents a Quobyte mount on the host + that shares a pod's lifetime properties: - key: - description: key is the label key that the selector applies - to. + group: + description: Group to map volume access to Default is + no group + type: string + readOnly: + description: ReadOnly here will force the Quobyte volume + to be mounted with read-only permissions. Defaults to + false. + type: boolean + registry: + description: Registry represents a single or multiple + Quobyte Registry services specified as a string as host:port + pair (multiple entries are separated with commas) which + acts as the central registry for volumes type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, Exists - and DoesNotExist. + tenant: + description: Tenant owning the given Quobyte volume in + the Backend Used with dynamically provisioned Quobyte + volumes, value is set by the plugin type: string - values: - description: values is an array of string values. If the - operator is In or NotIn, the values array must be non-empty. - If the operator is Exists or DoesNotExist, the values - array must be empty. This array is replaced during a - strategic merge patch. + user: + description: User to map volume access to Defaults to + serivceaccount user + type: string + volume: + description: Volume is a string that references an already + created Quobyte volume by name. + type: string + required: + - registry + - volume + type: object + rbd: + description: 'RBD represents a Rados Block Device mount on + the host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md' + properties: + fsType: + description: 'Filesystem type of the volume that you want + to mount. Tip: Ensure that the filesystem type is supported + by the host operating system. Examples: "ext4", "xfs", + "ntfs". Implicitly inferred to be "ext4" if unspecified. + More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd + TODO: how do we prevent errors in the filesystem from + compromising the machine' + type: string + image: + description: 'The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + keyring: + description: 'Keyring is the path to key ring for RBDUser. + Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + monitors: + description: 'A collection of Ceph monitors. More info: + https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' items: type: string type: array + pool: + description: 'The rados pool name. Default is rbd. More + info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + readOnly: + description: 'ReadOnly here will force the ReadOnly setting + in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: boolean + secretRef: + description: 'SecretRef is name of the authentication + secret for RBDUser. If provided overrides keyring. Default + is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + type: object + user: + description: 'The rados user name. Default is admin. More + info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string required: - - key - - operator + - image + - monitors type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which objects - belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select nodes. Selector which must match a node's labels, - and objects must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects must belong - to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition of a pod - at the current time. supported value: Pending / Running / - Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values that - used to select pods. The key defines the namespace which pods - belong, and the each values is a set of pod names. - type: object - type: object - stressngStressors: - description: StressngStressors defines plenty of stressors just - like `Stressors` except that it's an experimental feature and - more powerful. You can define stressors in `stress-ng` (see also - `man stress-ng`) dialect, however not all of the supported stressors - are well tested. It maybe retired in later releases. You should - always use `Stressors` to define the stressors and use this only - when you want more stressors unsupported by `Stressors`. When - both `StressngStressors` and `Stressors` are defined, `StressngStressors` - wins. - type: string - stressors: - description: Stressors defines plenty of stressors supported to - stress system components out. You can use one or more of them - to make up various kinds of stresses. At least one of the stressors - should be specified. - properties: - cpu: - description: CPUStressor stresses CPU out - properties: - load: - description: Load specifies P percent loading per CPU worker. - 0 is effectively a sleep (no load) and 100 is full loading. - type: integer - options: - description: extend stress-ng options - items: + scaleIO: + description: ScaleIO represents a ScaleIO persistent volume + attached and mounted on Kubernetes nodes. + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". Default is "xfs". type: string - type: array - workers: - description: Workers specifies N workers to apply the stressor. - type: integer - required: - - workers - type: object - memory: - description: MemoryStressor stresses virtual memory out - properties: - options: - description: extend stress-ng options + gateway: + description: The host address of the ScaleIO API Gateway. + type: string + protectionDomain: + description: The name of the ScaleIO Protection Domain + for the configured storage. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: SecretRef references to the secret for ScaleIO + user and other sensitive information. If this is not + provided, Login operation will fail. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + type: object + sslEnabled: + description: Flag to enable/disable SSL communication + with Gateway, default false + type: boolean + storageMode: + description: Indicates whether the storage for a volume + should be ThickProvisioned or ThinProvisioned. Default + is ThinProvisioned. + type: string + storagePool: + description: The ScaleIO Storage Pool associated with + the protection domain. + type: string + system: + description: The name of the storage system as configured + in ScaleIO. + type: string + volumeName: + description: The name of a volume already created in the + ScaleIO system that is associated with this volume source. + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + description: 'Secret represents a secret that should populate + this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + properties: + defaultMode: + description: 'Optional: mode bits to use on created files + by default. Must be a value between 0 and 0777. Defaults + to 0644. Directories within the path are not affected + by this setting. This might be in conflict with other + options that affect the file mode, like fsGroup, and + the result can be other mode bits set.' + format: int32 + type: integer items: + description: If unspecified, each key-value pair in the + Data field of the referenced Secret will be projected + into the volume as a file whose name is the key and + content is the value. If specified, the listed keys + will be projected into the specified paths, and unlisted + keys will not be present. If a key is specified which + is not present in the Secret, the volume setup will + error unless it is marked optional. Paths must be relative + and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use on this + file, must be a value between 0 and 0777. If not + specified, the volume defaultMode will be used. + This might be in conflict with other options that + affect the file mode, like fsGroup, and the result + can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map + the key to. May not be an absolute path. May not + contain the path element '..'. May not start with + the string '..'. + type: string + required: + - key + - path + type: object + type: array + optional: + description: Specify whether the Secret or its keys must + be defined + type: boolean + secretName: + description: 'Name of the secret in the pod''s namespace + to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' type: string - type: array - size: - description: Size specifies N bytes consumed per vm worker, - default is the total available memory. One can specify - the size as % of total available memory or in units of - B, KB/KiB, MB/MiB, GB/GiB, TB/TiB. - type: string - workers: - description: Workers specifies N workers to apply the stressor. - type: integer - required: - - workers - type: object - type: object - value: - description: Value is required when the mode is set to `FixedPodMode` - / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. If `FixedPodMode`, - provide an integer of pods to do chaos action. If `FixedPercentPodMod`, - provide a number from 0-100 to specify the percent of pods the - server can do chaos action. IF `RandomMaxPercentPodMod`, provide - a number from 0-100 to specify the max percent of pods to do chaos - action - type: string - required: - - mode - - selector + type: object + storageos: + description: StorageOS represents a StorageOS volume attached + and mounted on Kubernetes nodes. + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: SecretRef specifies the secret to use for + obtaining the StorageOS API credentials. If not specified, + default values will be attempted. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + type: object + volumeName: + description: VolumeName is the human-readable name of + the StorageOS volume. Volume names are only unique + within a namespace. + type: string + volumeNamespace: + description: VolumeNamespace specifies the scope of the + volume within StorageOS. If no namespace is specified + then the Pod's namespace will be used. This allows + the Kubernetes name scoping to be mirrored within StorageOS + for tighter integration. Set VolumeName to any name + to override the default behaviour. Set to "default" + if you are not using namespaces within StorageOS. Namespaces + that do not pre-exist within StorageOS will be created. + type: string + type: object + vsphereVolume: + description: VsphereVolume represents a vSphere volume attached + and mounted on kubelets host machine + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + storagePolicyID: + description: Storage Policy Based Management (SPBM) profile + ID associated with the StoragePolicyName. + type: string + storagePolicyName: + description: Storage Policy Based Management (SPBM) profile + name. + type: string + volumePath: + description: Path that identifies vSphere volume vmdk + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array type: object tasks: items: @@ -18062,8 +25565,29 @@ spec: - kind - name type: object + conditionalBranches: + description: ConditionalBranches records the evaluation result of each + ConditionalTask + properties: + branches: + items: + properties: + run: + type: string + task: + type: string + required: + - run + - task + type: object + type: array + context: + items: + type: string + type: array + type: object conditions: - description: Represents the latest available observations of a worklfow + description: Represents the latest available observations of a workflow node's current state. items: properties: @@ -18194,6 +25718,19 @@ spec: - awsRegion - ec2Instance type: object + conditionalTasks: + description: ConditionalTasks describes the conditional branches + of custom tasks. Only used when Type is TypeTask. + items: + properties: + expression: + type: string + task: + type: string + required: + - task + type: object + type: array dnsChaos: description: DNSChaosSpec defines the desired state of DNSChaos properties: @@ -19795,9 +27332,9 @@ spec: - selector type: object schedule: - description: ChaosOnlyScheduleSpec is very similar with ScheduleSpec, - but it could not schedule Workflow because we could not resolve - nested CRD now + description: Schedule describe the Schedule(describing scheduled + chaos) to be injected with chaos nodes. Only used when Type + is TypeSchedule. properties: awsChaos: description: AwsChaosSpec is the content of the specification @@ -20275,12 +27812,277 @@ spec: is a set of pod names. type: object type: object - target: - description: Target is the object to be selected and injected. - enum: - - Request - - Response - type: string + target: + description: Target is the object to be selected and injected. + enum: + - Request + - Response + type: string + value: + description: Value is required when the mode is set to + `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. + If `FixedPodMode`, provide an integer of pods to do + chaos action. If `FixedPercentPodMod`, provide a number + from 0-100 to specify the percent of pods the server + can do chaos action. IF `RandomMaxPercentPodMod`, provide + a number from 0-100 to specify the max percent of pods + to do chaos action + type: string + required: + - mode + - selector + - target + type: object + ioChaos: + description: IOChaosSpec defines the desired state of IOChaos + properties: + action: + description: 'Action defines the specific pod chaos action. + Supported action: latency / fault / attrOverride / mistake' + enum: + - latency + - fault + - attrOverride + - mistake + type: string + attr: + description: Attr defines the overrided attribution + properties: + atime: + description: Timespec represents a time + properties: + nsec: + format: int64 + type: integer + sec: + format: int64 + type: integer + required: + - nsec + - sec + type: object + blocks: + format: int64 + type: integer + ctime: + description: Timespec represents a time + properties: + nsec: + format: int64 + type: integer + sec: + format: int64 + type: integer + required: + - nsec + - sec + type: object + gid: + format: int32 + type: integer + ino: + format: int64 + type: integer + kind: + description: FileType represents type of a file + type: string + mtime: + description: Timespec represents a time + properties: + nsec: + format: int64 + type: integer + sec: + format: int64 + type: integer + required: + - nsec + - sec + type: object + nlink: + format: int32 + type: integer + perm: + type: integer + rdev: + format: int32 + type: integer + size: + format: int64 + type: integer + uid: + format: int32 + type: integer + type: object + containerNames: + description: ContainerNames indicates list of the name + of affected container. If not set, all containers will + be injected + items: + type: string + type: array + delay: + description: Delay defines the value of I/O chaos action + delay. A delay string is a possibly signed sequence + of decimal numbers, each with optional fraction and + a unit suffix, such as "300ms". Valid time units are + "ns", "us" (or "µs"), "ms", "s", "m", "h". + type: string + duration: + description: Duration represents the duration of the chaos + action. It is required when the action is `PodFailureAction`. + A duration string is a possibly signed sequence of decimal + numbers, each with optional fraction and a unit suffix, + such as "300ms", "-1.5h" or "2h45m". Valid time units + are "ns", "us" (or "µs"), "ms", "s", "m", "h". + type: string + errno: + description: 'Errno defines the error code that returned + by I/O action. refer to: https://www-numi.fnal.gov/offline_software/srt_public_context/WebDocs/Errors/unix_system_errors.html' + format: int32 + type: integer + methods: + description: 'Methods defines the I/O methods for injecting + I/O chaos action. default: all I/O methods.' + items: + type: string + type: array + mistake: + description: Mistake defines what types of incorrectness + are injected to IO operations + properties: + filling: + description: Filling determines what is filled in + the miskate data. + enum: + - zero + - random + type: string + maxLength: + description: Max length of each wrong data segment + in bytes + format: int64 + minimum: 1 + type: integer + maxOccurrences: + description: There will be [1, MaxOccurrences] segments + of wrong data. + format: int64 + minimum: 1 + type: integer + type: object + mode: + description: 'Mode defines the mode to run chaos action. + Supported mode: one / all / fixed / fixed-percent / + random-max-percent' + enum: + - one + - all + - fixed + - fixed-percent + - random-max-percent + type: string + path: + description: Path defines the path of files for injecting + I/O chaos action. + type: string + percent: + description: 'Percent defines the percentage of injection + errors and provides a number from 0-100. default: 100.' + type: integer + selector: + description: Selector is used to select pods that are + used to inject chaos action. + properties: + annotationSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can + be used to select objects. A selector based on annotations. + type: object + expressionSelectors: + description: a slice of label selector expressions + that can be used to select objects. A list of selectors + based on set-based label expressions. + items: + description: A label selector requirement is a selector + that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label key that the selector + applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are In, + NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. + If the operator is In or NotIn, the values + array must be non-empty. If the operator is + Exists or DoesNotExist, the values array must + be empty. This array is replaced during a + strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + fieldSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can + be used to select objects. A selector based on fields. + type: object + labelSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can + be used to select objects. A selector based on labels. + type: object + namespaces: + description: Namespaces is a set of namespace to which + objects belong. + items: + type: string + type: array + nodeSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can + be used to select nodes. Selector which must match + a node's labels, and objects must belong to these + selected nodes. + type: object + nodes: + description: Nodes is a set of node name and objects + must belong to these nodes. + items: + type: string + type: array + podPhaseSelectors: + description: 'PodPhaseSelectors is a set of condition + of a pod at the current time. supported value: Pending + / Running / Succeeded / Failed / Unknown' + items: + type: string + type: array + pods: + additionalProperties: + items: + type: string + type: array + description: Pods is a map of string keys and a set + values that used to select pods. The key defines + the namespace which pods belong, and the each values + is a set of pod names. + type: object + type: object value: description: Value is required when the mode is set to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. @@ -20291,92 +28093,34 @@ spec: a number from 0-100 to specify the max percent of pods to do chaos action type: string + volumePath: + description: VolumePath represents the mount path of injected + volume + type: string required: + - action - mode - selector - - target + - volumePath type: object - ioChaos: - description: IOChaosSpec defines the desired state of IOChaos + jvmChaos: + description: JVMChaosSpec defines the desired state of JVMChaos properties: action: - description: 'Action defines the specific pod chaos action. - Supported action: latency / fault / attrOverride / mistake' + description: 'Action defines the specific jvm chaos action. + Supported action: delay;return;script;cfl;oom;ccf;tce;cpf;tde;tpf' enum: - - latency - - fault - - attrOverride - - mistake + - delay + - return + - script + - cfl + - oom + - ccf + - tce + - cpf + - tde + - tpf type: string - attr: - description: Attr defines the overrided attribution - properties: - atime: - description: Timespec represents a time - properties: - nsec: - format: int64 - type: integer - sec: - format: int64 - type: integer - required: - - nsec - - sec - type: object - blocks: - format: int64 - type: integer - ctime: - description: Timespec represents a time - properties: - nsec: - format: int64 - type: integer - sec: - format: int64 - type: integer - required: - - nsec - - sec - type: object - gid: - format: int32 - type: integer - ino: - format: int64 - type: integer - kind: - description: FileType represents type of a file - type: string - mtime: - description: Timespec represents a time - properties: - nsec: - format: int64 - type: integer - sec: - format: int64 - type: integer - required: - - nsec - - sec - type: object - nlink: - format: int32 - type: integer - perm: - type: integer - rdev: - format: int32 - type: integer - size: - format: int64 - type: integer - uid: - format: int32 - type: integer - type: object containerNames: description: ContainerNames indicates list of the name of affected container. If not set, all containers will @@ -20384,55 +28128,242 @@ spec: items: type: string type: array - delay: - description: Delay defines the value of I/O chaos action - delay. A delay string is a possibly signed sequence - of decimal numbers, each with optional fraction and - a unit suffix, such as "300ms". Valid time units are - "ns", "us" (or "µs"), "ms", "s", "m", "h". + duration: + description: Duration represents the duration of the chaos + action + type: string + flags: + additionalProperties: + type: string + description: Flags represents the flags of action + type: object + matchers: + additionalProperties: + type: string + description: Matchers represents the matching rules for + the target + type: object + mode: + description: 'Mode defines the mode to run chaos action. + Supported mode: one / all / fixed / fixed-percent / + random-max-percent' + enum: + - one + - all + - fixed + - fixed-percent + - random-max-percent + type: string + selector: + description: Selector is used to select pods that are + used to inject chaos action. + properties: + annotationSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can + be used to select objects. A selector based on annotations. + type: object + expressionSelectors: + description: a slice of label selector expressions + that can be used to select objects. A list of selectors + based on set-based label expressions. + items: + description: A label selector requirement is a selector + that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label key that the selector + applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are In, + NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. + If the operator is In or NotIn, the values + array must be non-empty. If the operator is + Exists or DoesNotExist, the values array must + be empty. This array is replaced during a + strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + fieldSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can + be used to select objects. A selector based on fields. + type: object + labelSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can + be used to select objects. A selector based on labels. + type: object + namespaces: + description: Namespaces is a set of namespace to which + objects belong. + items: + type: string + type: array + nodeSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can + be used to select nodes. Selector which must match + a node's labels, and objects must belong to these + selected nodes. + type: object + nodes: + description: Nodes is a set of node name and objects + must belong to these nodes. + items: + type: string + type: array + podPhaseSelectors: + description: 'PodPhaseSelectors is a set of condition + of a pod at the current time. supported value: Pending + / Running / Succeeded / Failed / Unknown' + items: + type: string + type: array + pods: + additionalProperties: + items: + type: string + type: array + description: Pods is a map of string keys and a set + values that used to select pods. The key defines + the namespace which pods belong, and the each values + is a set of pod names. + type: object + type: object + target: + description: 'Target defines the specific jvm chaos target. + Supported target: servlet;psql;jvm;jedis;http;dubbo;rocketmq;tars;mysql;druid;redisson;rabbitmq;mongodb' + enum: + - servlet + - psql + - jvm + - jedis + - http + - dubbo + - rocketmq + - tars + - mysql + - druid + - redisson + - rabbitmq + - mongodb + type: string + value: + description: Value is required when the mode is set to + `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. + If `FixedPodMode`, provide an integer of pods to do + chaos action. If `FixedPercentPodMod`, provide a number + from 0-100 to specify the percent of pods the server + can do chaos action. IF `RandomMaxPercentPodMod`, provide + a number from 0-100 to specify the max percent of pods + to do chaos action type: string + required: + - action + - mode + - selector + - target + type: object + kernelChaos: + description: KernelChaosSpec defines the desired state of + KernelChaos + properties: duration: description: Duration represents the duration of the chaos - action. It is required when the action is `PodFailureAction`. - A duration string is a possibly signed sequence of decimal - numbers, each with optional fraction and a unit suffix, - such as "300ms", "-1.5h" or "2h45m". Valid time units - are "ns", "us" (or "µs"), "ms", "s", "m", "h". + action type: string - errno: - description: 'Errno defines the error code that returned - by I/O action. refer to: https://www-numi.fnal.gov/offline_software/srt_public_context/WebDocs/Errors/unix_system_errors.html' - format: int32 - type: integer - methods: - description: 'Methods defines the I/O methods for injecting - I/O chaos action. default: all I/O methods.' - items: - type: string - type: array - mistake: - description: Mistake defines what types of incorrectness - are injected to IO operations + failKernRequest: + description: FailKernRequest defines the request of kernel + injection properties: - filling: - description: Filling determines what is filled in - the miskate data. - enum: - - zero - - random - type: string - maxLength: - description: Max length of each wrong data segment - in bytes - format: int64 - minimum: 1 + callchain: + description: 'Callchain indicate a special call chain, + such as: ext4_mount -> mount_subtree -> + ... -> should_failslab With an optional + set of predicates and an optional set of parameters, + which used with predicates. You can read call chan + and predicate examples from https://github.com/chaos-mesh/bpfki/tree/develop/examples + to learn more. If no special call chain, just keep + Callchain empty, which means it will fail at any + call chain with slab alloc (eg: kmalloc).' + items: + description: Frame defines the function signature + and predicate in function's body + properties: + funcname: + description: Funcname can be find from kernel + source or `/proc/kallsyms`, such as `ext4_mount` + type: string + parameters: + description: Parameters is used with predicate, + for example, if you want to inject slab error + in `d_alloc_parallel(struct dentry *parent, + const struct qstr *name)` with a special name + `bananas`, you need to set it to `struct dentry + *parent, const struct qstr *name` otherwise + omit it. + type: string + predicate: + description: Predicate will access the arguments + of this Frame, example with Parameters's, + you can set it to `STRNCMP(name->name, "bananas", + 8)` to make inject only with it, or omit it + to inject for all d_alloc_parallel call chain. + type: string + type: object + type: array + failtype: + description: 'FailType indicates what to fail, can + be set to ''0'' / ''1'' / ''2'' If `0`, indicates + slab to fail (should_failslab) If `1`, indicates + alloc_page to fail (should_fail_alloc_page) If `2`, + indicates bio to fail (should_fail_bio) You can + read: 1. https://www.kernel.org/doc/html/latest/fault-injection/fault-injection.html 2. + http://github.com/iovisor/bcc/blob/master/tools/inject_example.txt + to learn more' + format: int32 + maximum: 2 + minimum: 0 type: integer - maxOccurrences: - description: There will be [1, MaxOccurrences] segments - of wrong data. - format: int64 - minimum: 1 + headers: + description: 'Headers indicates the appropriate kernel + headers you need. Eg: "linux/mmzone.h", "linux/blkdev.h" + and so on' + items: + type: string + type: array + probability: + description: Probability indicates the fails with + probability. If you want 1%, please set this field + with 1. + format: int32 + maximum: 100 + minimum: 0 + type: integer + times: + description: Times indicates the max times of fails. + format: int32 + minimum: 0 type: integer + required: + - failtype type: object mode: description: 'Mode defines the mode to run chaos action. @@ -20445,14 +28376,6 @@ spec: - fixed-percent - random-max-percent type: string - path: - description: Path defines the path of files for injecting - I/O chaos action. - type: string - percent: - description: 'Percent defines the percentage of injection - errors and provides a number from 0-100. default: 100.' - type: integer selector: description: Selector is used to select pods that are used to inject chaos action. @@ -20539,72 +28462,168 @@ spec: additionalProperties: items: type: string - type: array - description: Pods is a map of string keys and a set - values that used to select pods. The key defines - the namespace which pods belong, and the each values - is a set of pod names. + type: array + description: Pods is a map of string keys and a set + values that used to select pods. The key defines + the namespace which pods belong, and the each values + is a set of pod names. + type: object + type: object + value: + description: Value is required when the mode is set to + `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. + If `FixedPodMode`, provide an integer of pods to do + chaos action. If `FixedPercentPodMod`, provide a number + from 0-100 to specify the percent of pods the server + can do chaos action. IF `RandomMaxPercentPodMod`, provide + a number from 0-100 to specify the max percent of pods + to do chaos action + type: string + required: + - failKernRequest + - mode + - selector + type: object + networkChaos: + description: NetworkChaosSpec defines the desired state of + NetworkChaos + properties: + action: + description: 'Action defines the specific network chaos + action. Supported action: partition, netem, delay, loss, + duplicate, corrupt Default action: delay' + enum: + - netem + - delay + - loss + - duplicate + - corrupt + - partition + - bandwidth + type: string + bandwidth: + description: Bandwidth represents the detail about bandwidth + control action + properties: + buffer: + description: Buffer is the maximum amount of bytes + that tokens can be available for instantaneously. + format: int32 + minimum: 1 + type: integer + limit: + description: Limit is the number of bytes that can + be queued waiting for tokens to become available. + format: int32 + minimum: 1 + type: integer + minburst: + description: Minburst specifies the size of the peakrate + bucket. For perfect accuracy, should be set to the + MTU of the interface. If a peakrate is needed, + but some burstiness is acceptable, this size can + be raised. A 3000 byte minburst allows around 3mbit/s + of peakrate, given 1000 byte packets. + format: int32 + minimum: 0 + type: integer + peakrate: + description: Peakrate is the maximum depletion rate + of the bucket. The peakrate does not need to be + set, it is only necessary if perfect millisecond + timescale shaping is required. + format: int64 + minimum: 0 + type: integer + rate: + description: Rate is the speed knob. Allows bps, kbps, + mbps, gbps, tbps unit. bps means bytes per second. + type: string + required: + - buffer + - limit + - rate + type: object + corrupt: + description: Corrupt represents the detail about corrupt + action + properties: + correlation: + type: string + corrupt: + type: string + required: + - correlation + - corrupt + type: object + delay: + description: Delay represents the detail about delay action + properties: + correlation: + type: string + jitter: + type: string + latency: + type: string + reorder: + description: ReorderSpec defines details of packet + reorder. + properties: + correlation: + type: string + gap: + type: integer + reorder: + type: string + required: + - correlation + - gap + - reorder type: object + required: + - latency type: object - value: - description: Value is required when the mode is set to - `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. - If `FixedPodMode`, provide an integer of pods to do - chaos action. If `FixedPercentPodMod`, provide a number - from 0-100 to specify the percent of pods the server - can do chaos action. IF `RandomMaxPercentPodMod`, provide - a number from 0-100 to specify the max percent of pods - to do chaos action - type: string - volumePath: - description: VolumePath represents the mount path of injected - volume - type: string - required: - - action - - mode - - selector - - volumePath - type: object - jvmChaos: - description: JVMChaosSpec defines the desired state of JVMChaos - properties: - action: - description: 'Action defines the specific jvm chaos action. - Supported action: delay;return;script;cfl;oom;ccf;tce;cpf;tde;tpf' + direction: + description: Direction represents the direction, this + applies on netem and network partition action enum: - - delay - - return - - script - - cfl - - oom - - ccf - - tce - - cpf - - tde - - tpf + - to + - from + - both + - "" type: string - containerNames: - description: ContainerNames indicates list of the name - of affected container. If not set, all containers will - be injected - items: - type: string - type: array + duplicate: + description: DuplicateSpec represents the detail about + loss action + properties: + correlation: + type: string + duplicate: + type: string + required: + - correlation + - duplicate + type: object duration: description: Duration represents the duration of the chaos action type: string - flags: - additionalProperties: - type: string - description: Flags represents the flags of action - type: object - matchers: - additionalProperties: + externalTargets: + description: ExternalTargets represents network targets + outside k8s + items: type: string - description: Matchers represents the matching rules for - the target + type: array + loss: + description: Loss represents the detail about loss action + properties: + correlation: + type: string + loss: + type: string + required: + - correlation + - loss type: object mode: description: 'Mode defines the mode to run chaos action. @@ -20711,23 +28730,130 @@ spec: type: object type: object target: - description: 'Target defines the specific jvm chaos target. - Supported target: servlet;psql;jvm;jedis;http;dubbo;rocketmq;tars;mysql;druid;redisson;rabbitmq;mongodb' - enum: - - servlet - - psql - - jvm - - jedis - - http - - dubbo - - rocketmq - - tars - - mysql - - druid - - redisson - - rabbitmq - - mongodb - type: string + description: Target represents network target, this applies + on netem and network partition action + properties: + mode: + description: 'Mode defines the mode to run chaos action. + Supported mode: one / all / fixed / fixed-percent + / random-max-percent' + enum: + - one + - all + - fixed + - fixed-percent + - random-max-percent + type: string + selector: + description: Selector is used to select pods that + are used to inject chaos action. + properties: + annotationSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select objects. A selector based + on annotations. + type: object + expressionSelectors: + description: a slice of label selector expressions + that can be used to select objects. A list of + selectors based on set-based label expressions. + items: + description: A label selector requirement is + a selector that contains values, a key, and + an operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If + the operator is Exists or DoesNotExist, + the values array must be empty. This array + is replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + fieldSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select objects. A selector based + on fields. + type: object + labelSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select objects. A selector based + on labels. + type: object + namespaces: + description: Namespaces is a set of namespace + to which objects belong. + items: + type: string + type: array + nodeSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select nodes. Selector which + must match a node's labels, and objects must + belong to these selected nodes. + type: object + nodes: + description: Nodes is a set of node name and objects + must belong to these nodes. + items: + type: string + type: array + podPhaseSelectors: + description: 'PodPhaseSelectors is a set of condition + of a pod at the current time. supported value: + Pending / Running / Succeeded / Failed / Unknown' + items: + type: string + type: array + pods: + additionalProperties: + items: + type: string + type: array + description: Pods is a map of string keys and + a set values that used to select pods. The key + defines the namespace which pods belong, and + the each values is a set of pod names. + type: object + type: object + value: + description: Value is required when the mode is set + to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. + If `FixedPodMode`, provide an integer of pods to + do chaos action. If `FixedPercentPodMod`, provide + a number from 0-100 to specify the percent of pods + the server can do chaos action. IF `RandomMaxPercentPodMod`, provide + a number from 0-100 to specify the max percent of + pods to do chaos action + type: string + required: + - mode + - selector + type: object value: description: Value is required when the mode is set to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. @@ -20742,92 +28868,43 @@ spec: - action - mode - selector - - target type: object - kernelChaos: - description: KernelChaosSpec defines the desired state of - KernelChaos + podChaos: + description: PodChaosSpec defines the attributes that a user + creates on a chaos experiment about pods. properties: + action: + description: 'Action defines the specific pod chaos action. + Supported action: pod-kill / pod-failure / container-kill + Default action: pod-kill' + enum: + - pod-kill + - pod-failure + - container-kill + type: string + containerNames: + description: ContainerNames indicates list of the name + of affected container. If not set, all containers will + be injected + items: + type: string + type: array duration: description: Duration represents the duration of the chaos - action + action. It is required when the action is `PodFailureAction`. + A duration string is a possibly signed sequence of decimal + numbers, each with optional fraction and a unit suffix, + such as "300ms", "-1.5h" or "2h45m". Valid time units + are "ns", "us" (or "µs"), "ms", "s", "m", "h". type: string - failKernRequest: - description: FailKernRequest defines the request of kernel - injection - properties: - callchain: - description: 'Callchain indicate a special call chain, - such as: ext4_mount -> mount_subtree -> - ... -> should_failslab With an optional - set of predicates and an optional set of parameters, - which used with predicates. You can read call chan - and predicate examples from https://github.com/chaos-mesh/bpfki/tree/develop/examples - to learn more. If no special call chain, just keep - Callchain empty, which means it will fail at any - call chain with slab alloc (eg: kmalloc).' - items: - description: Frame defines the function signature - and predicate in function's body - properties: - funcname: - description: Funcname can be find from kernel - source or `/proc/kallsyms`, such as `ext4_mount` - type: string - parameters: - description: Parameters is used with predicate, - for example, if you want to inject slab error - in `d_alloc_parallel(struct dentry *parent, - const struct qstr *name)` with a special name - `bananas`, you need to set it to `struct dentry - *parent, const struct qstr *name` otherwise - omit it. - type: string - predicate: - description: Predicate will access the arguments - of this Frame, example with Parameters's, - you can set it to `STRNCMP(name->name, "bananas", - 8)` to make inject only with it, or omit it - to inject for all d_alloc_parallel call chain. - type: string - type: object - type: array - failtype: - description: 'FailType indicates what to fail, can - be set to ''0'' / ''1'' / ''2'' If `0`, indicates - slab to fail (should_failslab) If `1`, indicates - alloc_page to fail (should_fail_alloc_page) If `2`, - indicates bio to fail (should_fail_bio) You can - read: 1. https://www.kernel.org/doc/html/latest/fault-injection/fault-injection.html 2. - http://github.com/iovisor/bcc/blob/master/tools/inject_example.txt - to learn more' - format: int32 - maximum: 2 - minimum: 0 - type: integer - headers: - description: 'Headers indicates the appropriate kernel - headers you need. Eg: "linux/mmzone.h", "linux/blkdev.h" - and so on' - items: - type: string - type: array - probability: - description: Probability indicates the fails with - probability. If you want 1%, please set this field - with 1. - format: int32 - maximum: 100 - minimum: 0 - type: integer - times: - description: Times indicates the max times of fails. - format: int32 - minimum: 0 - type: integer - required: - - failtype - type: object + gracePeriod: + description: GracePeriod is used in pod-kill action. It + represents the duration in seconds before the pod should + be deleted. Value must be non-negative integer. The + default value is zero that indicates delete immediately. + format: int64 + minimum: 0 + type: integer mode: description: 'Mode defines the mode to run chaos action. Supported mode: one / all / fixed / fixed-percent / @@ -20889,205 +28966,86 @@ spec: be used to select objects. A selector based on fields. type: object labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which - objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select nodes. Selector which must match - a node's labels, and objects must belong to these - selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects - must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: Pending - / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set - values that used to select pods. The key defines - the namespace which pods belong, and the each values - is a set of pod names. - type: object - type: object - value: - description: Value is required when the mode is set to - `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. - If `FixedPodMode`, provide an integer of pods to do - chaos action. If `FixedPercentPodMod`, provide a number - from 0-100 to specify the percent of pods the server - can do chaos action. IF `RandomMaxPercentPodMod`, provide - a number from 0-100 to specify the max percent of pods - to do chaos action - type: string - required: - - failKernRequest - - mode - - selector - type: object - networkChaos: - description: NetworkChaosSpec defines the desired state of - NetworkChaos - properties: - action: - description: 'Action defines the specific network chaos - action. Supported action: partition, netem, delay, loss, - duplicate, corrupt Default action: delay' - enum: - - netem - - delay - - loss - - duplicate - - corrupt - - partition - - bandwidth - type: string - bandwidth: - description: Bandwidth represents the detail about bandwidth - control action - properties: - buffer: - description: Buffer is the maximum amount of bytes - that tokens can be available for instantaneously. - format: int32 - minimum: 1 - type: integer - limit: - description: Limit is the number of bytes that can - be queued waiting for tokens to become available. - format: int32 - minimum: 1 - type: integer - minburst: - description: Minburst specifies the size of the peakrate - bucket. For perfect accuracy, should be set to the - MTU of the interface. If a peakrate is needed, - but some burstiness is acceptable, this size can - be raised. A 3000 byte minburst allows around 3mbit/s - of peakrate, given 1000 byte packets. - format: int32 - minimum: 0 - type: integer - peakrate: - description: Peakrate is the maximum depletion rate - of the bucket. The peakrate does not need to be - set, it is only necessary if perfect millisecond - timescale shaping is required. - format: int64 - minimum: 0 - type: integer - rate: - description: Rate is the speed knob. Allows bps, kbps, - mbps, gbps, tbps unit. bps means bytes per second. - type: string - required: - - buffer - - limit - - rate - type: object - corrupt: - description: Corrupt represents the detail about corrupt - action - properties: - correlation: - type: string - corrupt: - type: string - required: - - correlation - - corrupt - type: object - delay: - description: Delay represents the detail about delay action - properties: - correlation: - type: string - jitter: - type: string - latency: - type: string - reorder: - description: ReorderSpec defines details of packet - reorder. - properties: - correlation: - type: string - gap: - type: integer - reorder: + additionalProperties: + type: string + description: Map of string keys and values that can + be used to select objects. A selector based on labels. + type: object + namespaces: + description: Namespaces is a set of namespace to which + objects belong. + items: + type: string + type: array + nodeSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can + be used to select nodes. Selector which must match + a node's labels, and objects must belong to these + selected nodes. + type: object + nodes: + description: Nodes is a set of node name and objects + must belong to these nodes. + items: + type: string + type: array + podPhaseSelectors: + description: 'PodPhaseSelectors is a set of condition + of a pod at the current time. supported value: Pending + / Running / Succeeded / Failed / Unknown' + items: + type: string + type: array + pods: + additionalProperties: + items: type: string - required: - - correlation - - gap - - reorder + type: array + description: Pods is a map of string keys and a set + values that used to select pods. The key defines + the namespace which pods belong, and the each values + is a set of pod names. type: object - required: - - latency type: object - direction: - description: Direction represents the direction, this - applies on netem and network partition action - enum: - - to - - from - - both - - "" + value: + description: Value is required when the mode is set to + `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. + If `FixedPodMode`, provide an integer of pods to do + chaos action. If `FixedPercentPodMod`, provide a number + from 0-100 to specify the percent of pods the server + can do chaos action. IF `RandomMaxPercentPodMod`, provide + a number from 0-100 to specify the max percent of pods + to do chaos action type: string - duplicate: - description: DuplicateSpec represents the detail about - loss action - properties: - correlation: - type: string - duplicate: - type: string - required: - - correlation - - duplicate - type: object + required: + - action + - mode + - selector + type: object + schedule: + type: string + startingDeadlineSeconds: + format: int64 + minimum: 0 + nullable: true + type: integer + stressChaos: + description: StressChaosSpec defines the desired state of + StressChaos + properties: + containerNames: + description: ContainerNames indicates list of the name + of affected container. If not set, all containers will + be injected + items: + type: string + type: array duration: description: Duration represents the duration of the chaos action type: string - externalTargets: - description: ExternalTargets represents network targets - outside k8s - items: - type: string - type: array - loss: - description: Loss represents the detail about loss action - properties: - correlation: - type: string - loss: - type: string - required: - - correlation - - loss - type: object mode: description: 'Mode defines the mode to run chaos action. Supported mode: one / all / fixed / fixed-percent / @@ -21192,130 +29150,67 @@ spec: is a set of pod names. type: object type: object - target: - description: Target represents network target, this applies - on netem and network partition action + stressngStressors: + description: StressngStressors defines plenty of stressors + just like `Stressors` except that it's an experimental + feature and more powerful. You can define stressors + in `stress-ng` (see also `man stress-ng`) dialect, however + not all of the supported stressors are well tested. + It maybe retired in later releases. You should always + use `Stressors` to define the stressors and use this + only when you want more stressors unsupported by `Stressors`. + When both `StressngStressors` and `Stressors` are defined, + `StressngStressors` wins. + type: string + stressors: + description: Stressors defines plenty of stressors supported + to stress system components out. You can use one or + more of them to make up various kinds of stresses. At + least one of the stressors should be specified. properties: - mode: - description: 'Mode defines the mode to run chaos action. - Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - selector: - description: Selector is used to select pods that - are used to inject chaos action. + cpu: + description: CPUStressor stresses CPU out properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list of - selectors based on set-based label expressions. - items: - description: A label selector requirement is - a selector that contains values, a key, and - an operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If - the operator is Exists or DoesNotExist, - the values array must be empty. This array - is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which - must match a node's labels, and objects must - belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects - must belong to these nodes. + load: + description: Load specifies P percent loading + per CPU worker. 0 is effectively a sleep (no + load) and 100 is full loading. + type: integer + options: + description: extend stress-ng options items: type: string type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: - Pending / Running / Succeeded / Failed / Unknown' + workers: + description: Workers specifies N workers to apply + the stressor. + type: integer + required: + - workers + type: object + memory: + description: MemoryStressor stresses virtual memory + out + properties: + options: + description: extend stress-ng options items: type: string type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and - a set values that used to select pods. The key - defines the namespace which pods belong, and - the each values is a set of pod names. - type: object + size: + description: Size specifies N bytes consumed per + vm worker, default is the total available memory. + One can specify the size as % of total available + memory or in units of B, KB/KiB, MB/MiB, GB/GiB, + TB/TiB. + type: string + workers: + description: Workers specifies N workers to apply + the stressor. + type: integer + required: + - workers type: object - value: - description: Value is required when the mode is set - to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. - If `FixedPodMode`, provide an integer of pods to - do chaos action. If `FixedPercentPodMod`, provide - a number from 0-100 to specify the percent of pods - the server can do chaos action. IF `RandomMaxPercentPodMod`, provide - a number from 0-100 to specify the max percent of - pods to do chaos action - type: string - required: - - mode - - selector type: object value: description: Value is required when the mode is set to @@ -21328,23 +29223,20 @@ spec: to do chaos action type: string required: - - action - mode - selector type: object - podChaos: - description: PodChaosSpec defines the attributes that a user - creates on a chaos experiment about pods. + timeChaos: + description: TimeChaosSpec defines the desired state of TimeChaos properties: - action: - description: 'Action defines the specific pod chaos action. - Supported action: pod-kill / pod-failure / container-kill - Default action: pod-kill' - enum: - - pod-kill - - pod-failure - - container-kill - type: string + clockIds: + description: ClockIds defines all affected clock id All + available options are ["CLOCK_REALTIME","CLOCK_MONOTONIC","CLOCK_PROCESS_CPUTIME_ID","CLOCK_THREAD_CPUTIME_ID", + "CLOCK_MONOTONIC_RAW","CLOCK_REALTIME_COARSE","CLOCK_MONOTONIC_COARSE","CLOCK_BOOTTIME","CLOCK_REALTIME_ALARM", + "CLOCK_BOOTTIME_ALARM"] Default value is ["CLOCK_REALTIME"] + items: + type: string + type: array containerNames: description: ContainerNames indicates list of the name of affected container. If not set, all containers will @@ -21354,20 +29246,8 @@ spec: type: array duration: description: Duration represents the duration of the chaos - action. It is required when the action is `PodFailureAction`. - A duration string is a possibly signed sequence of decimal - numbers, each with optional fraction and a unit suffix, - such as "300ms", "-1.5h" or "2h45m". Valid time units - are "ns", "us" (or "µs"), "ms", "s", "m", "h". + action type: string - gracePeriod: - description: GracePeriod is used in pod-kill action. It - represents the duration in seconds before the pod should - be deleted. Value must be non-negative integer. The - default value is zero that indicates delete immediately. - format: int64 - minimum: 0 - type: integer mode: description: 'Mode defines the mode to run chaos action. Supported mode: one / all / fixed / fixed-percent / @@ -21472,567 +29352,2646 @@ spec: is a set of pod names. type: object type: object - value: - description: Value is required when the mode is set to - `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. - If `FixedPodMode`, provide an integer of pods to do - chaos action. If `FixedPercentPodMod`, provide a number - from 0-100 to specify the percent of pods the server - can do chaos action. IF `RandomMaxPercentPodMod`, provide - a number from 0-100 to specify the max percent of pods - to do chaos action - type: string - required: - - action - - mode - - selector + timeOffset: + description: TimeOffset defines the delta time of injected + program. It's a possibly signed sequence of decimal + numbers, such as "300ms", "-1.5h" or "2h45m". Valid + time units are "ns", "us" (or "µs"), "ms", "s", "m", + "h". + type: string + value: + description: Value is required when the mode is set to + `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. + If `FixedPodMode`, provide an integer of pods to do + chaos action. If `FixedPercentPodMod`, provide a number + from 0-100 to specify the percent of pods the server + can do chaos action. IF `RandomMaxPercentPodMod`, provide + a number from 0-100 to specify the max percent of pods + to do chaos action + type: string + required: + - mode + - selector + - timeOffset + type: object + type: + description: 'TODO: use a custom type, as `TemplateType` contains + other possible values' + type: string + required: + - schedule + - type + type: object + stressChaos: + description: StressChaosSpec defines the desired state of StressChaos + properties: + containerNames: + description: ContainerNames indicates list of the name of + affected container. If not set, all containers will be injected + items: + type: string + type: array + duration: + description: Duration represents the duration of the chaos + action + type: string + mode: + description: 'Mode defines the mode to run chaos action. Supported + mode: one / all / fixed / fixed-percent / random-max-percent' + enum: + - one + - all + - fixed + - fixed-percent + - random-max-percent + type: string + selector: + description: Selector is used to select pods that are used + to inject chaos action. + properties: + annotationSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can be + used to select objects. A selector based on annotations. + type: object + expressionSelectors: + description: a slice of label selector expressions that + can be used to select objects. A list of selectors based + on set-based label expressions. + items: + description: A label selector requirement is a selector + that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label key that the selector + applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. + If the operator is In or NotIn, the values array + must be non-empty. If the operator is Exists or + DoesNotExist, the values array must be empty. + This array is replaced during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + fieldSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can be + used to select objects. A selector based on fields. + type: object + labelSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can be + used to select objects. A selector based on labels. + type: object + namespaces: + description: Namespaces is a set of namespace to which + objects belong. + items: + type: string + type: array + nodeSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can be + used to select nodes. Selector which must match a node's + labels, and objects must belong to these selected nodes. + type: object + nodes: + description: Nodes is a set of node name and objects must + belong to these nodes. + items: + type: string + type: array + podPhaseSelectors: + description: 'PodPhaseSelectors is a set of condition + of a pod at the current time. supported value: Pending + / Running / Succeeded / Failed / Unknown' + items: + type: string + type: array + pods: + additionalProperties: + items: + type: string + type: array + description: Pods is a map of string keys and a set values + that used to select pods. The key defines the namespace + which pods belong, and the each values is a set of pod + names. + type: object + type: object + stressngStressors: + description: StressngStressors defines plenty of stressors + just like `Stressors` except that it's an experimental feature + and more powerful. You can define stressors in `stress-ng` + (see also `man stress-ng`) dialect, however not all of the + supported stressors are well tested. It maybe retired in + later releases. You should always use `Stressors` to define + the stressors and use this only when you want more stressors + unsupported by `Stressors`. When both `StressngStressors` + and `Stressors` are defined, `StressngStressors` wins. + type: string + stressors: + description: Stressors defines plenty of stressors supported + to stress system components out. You can use one or more + of them to make up various kinds of stresses. At least one + of the stressors should be specified. + properties: + cpu: + description: CPUStressor stresses CPU out + properties: + load: + description: Load specifies P percent loading per + CPU worker. 0 is effectively a sleep (no load) and + 100 is full loading. + type: integer + options: + description: extend stress-ng options + items: + type: string + type: array + workers: + description: Workers specifies N workers to apply + the stressor. + type: integer + required: + - workers + type: object + memory: + description: MemoryStressor stresses virtual memory out + properties: + options: + description: extend stress-ng options + items: + type: string + type: array + size: + description: Size specifies N bytes consumed per vm + worker, default is the total available memory. One + can specify the size as % of total available memory + or in units of B, KB/KiB, MB/MiB, GB/GiB, TB/TiB. + type: string + workers: + description: Workers specifies N workers to apply + the stressor. + type: integer + required: + - workers + type: object type: object - schedule: + value: + description: Value is required when the mode is set to `FixedPodMode` + / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. If `FixedPodMode`, + provide an integer of pods to do chaos action. If `FixedPercentPodMod`, + provide a number from 0-100 to specify the percent of pods + the server can do chaos action. IF `RandomMaxPercentPodMod`, provide + a number from 0-100 to specify the max percent of pods to + do chaos action type: string - startingDeadlineSeconds: - format: int64 - minimum: 0 - nullable: true - type: integer - stressChaos: - description: StressChaosSpec defines the desired state of - StressChaos + required: + - mode + - selector + type: object + task: + description: Task describes the behavior of the custom task. Only + used when Type is TypeTask. + properties: + container: + description: Container is the main container image to run + in the pod properties: - containerNames: - description: ContainerNames indicates list of the name - of affected container. If not set, all containers will - be injected + args: + description: '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. 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. Cannot be updated. + More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' items: type: string type: array - duration: - description: Duration represents the duration of the chaos - action - type: string - mode: - description: 'Mode defines the mode to run chaos action. - Supported mode: one / all / fixed / fixed-percent / - random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - selector: - description: Selector is used to select pods that are - used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: + command: + description: '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. 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. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + env: + description: List of environment variables to set in the + container. Cannot be updated. + items: + description: EnvVar represents an environment variable + present in a Container. + properties: + name: + description: Name of the environment variable. Must + be a C_IDENTIFIER. type: string - description: Map of string keys and values that can - be used to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list of selectors - based on set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. + value: + description: '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 "".' + type: string + valueFrom: + description: Source for the environment variable's + value. Cannot be used if value is not empty. properties: - key: - description: key is the label key that the selector - applies to. + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap + or its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports + metadata.name, metadata.namespace, metadata.labels, + metadata.annotations, spec.nodeName, spec.serviceAccountName, + status.hostIP, status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select + in the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: '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.' + properties: + containerName: + description: 'Container name: required for + volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format + of the exposed resources, defaults to + "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the + pod's namespace + properties: + key: + description: The key of the secret to select + from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret + or its key must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + description: 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. + items: + description: EnvFromSource represents the source of + a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, - NotIn, Exists and DoesNotExist. + optional: + description: Specify whether the ConfigMap must + be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to + each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values - array must be non-empty. If the operator is - Exists or DoesNotExist, the values array must - be empty. This array is replaced during a - strategic merge patch. - items: - type: string - type: array - required: - - key - - operator + optional: + description: Specify whether the Secret must + be defined + type: boolean type: object - type: array - fieldSelectors: - additionalProperties: + type: object + type: array + image: + description: '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.' + type: string + imagePullPolicy: + description: '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' + type: string + lifecycle: + description: Actions that the management system should + take in response to container lifecycle events. Cannot + be updated. + properties: + postStart: + description: 'PostStart is called immediately after + a container is created. If the handler fails, the + container is terminated and restarted according + to its restart policy. Other management of the container + blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following + should be specified. Exec specifies the action + to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request + to perform. + properties: + host: + description: Host name to connect to, defaults + to the pod IP. You probably want to set + "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the + request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom + header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to + access on the container. Number must be + in the range 1 to 65535. Name must be an + IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action involving + a TCP port. TCP hooks not yet supported TODO: + implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect + to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to + access on the container. Number must be + in the range 1 to 65535. Name must be an + IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + description: 'PreStop is called immediately before + a container is terminated due to an API request + or management event such as liveness/startup probe + failure, preemption, resource contention, etc. The + handler is not called if the container crashes or + exits. The reason for termination is passed to the + handler. The Pod''s termination grace period countdown + begins before the PreStop hooked is executed. Regardless + of the outcome of the handler, the container will + eventually terminate within the Pod''s termination + grace period. Other management of the container + blocks until the hook completes or until the termination + grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following + should be specified. Exec specifies the action + to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request + to perform. + properties: + host: + description: Host name to connect to, defaults + to the pod IP. You probably want to set + "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the + request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom + header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to + access on the container. Number must be + in the range 1 to 65535. Name must be an + IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action involving + a TCP port. TCP hooks not yet supported TODO: + implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect + to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to + access on the container. Number must be + in the range 1 to 65535. Name must be an + IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + description: 'Periodic probe of container liveness. Container + will be restarted if the probe fails. Cannot be updated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following should + be specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the + probe to be considered failed after having succeeded. + Defaults to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request to + perform. + properties: + host: + description: Host name to connect to, defaults + to the pod IP. You probably want to set "Host" + in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the + host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: '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' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the + probe. Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: 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. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving + a TCP port. TCP hooks not yet supported TODO: implement + a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, + defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: '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' + format: int32 + type: integer + type: object + name: + description: Name of the container specified as a DNS_LABEL. + Each container in a pod must have a unique name (DNS_LABEL). + Cannot be updated. + type: string + ports: + description: 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. + items: + description: ContainerPort represents a network port + in a single container. + properties: + containerPort: + description: Number of port to expose on the pod's + IP address. This must be a valid port number, + 0 < x < 65536. + format: int32 + type: integer + hostIP: + description: What host IP to bind the external port + to. type: string - description: Map of string keys and values that can - be used to select objects. A selector based on fields. + hostPort: + description: Number of port to expose on the host. + If specified, this must be a valid port number, + 0 < x < 65536. If HostNetwork is specified, this + must match ContainerPort. Most containers do not + need this. + format: int32 + type: integer + name: + description: If specified, this must be an IANA_SVC_NAME + and unique within the pod. Each named port in + a pod must have a unique name. Name for the port + that can be referred to by services. + type: string + protocol: + description: Protocol for port. Must be UDP, TCP, + or SCTP. Defaults to "TCP". + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + description: 'Periodic probe of container service readiness. + Container will be removed from service endpoints if + the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following should + be specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the + probe to be considered failed after having succeeded. + Defaults to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request to + perform. + properties: + host: + description: Host name to connect to, defaults + to the pod IP. You probably want to set "Host" + in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the + host. Defaults to HTTP. + type: string + required: + - port type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select objects. A selector based on labels. + initialDelaySeconds: + description: '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' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the + probe. Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: 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. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving + a TCP port. TCP hooks not yet supported TODO: implement + a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, + defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port type: object - namespaces: - description: Namespaces is a set of namespace to which - objects belong. - items: - type: string - type: array - nodeSelectors: + timeoutSeconds: + description: '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' + format: int32 + type: integer + type: object + resources: + description: 'Compute Resources required by this container. + Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + properties: + limits: additionalProperties: - type: string - description: Map of string keys and values that can - be used to select nodes. Selector which must match - a node's labels, and objects must belong to these - selected nodes. + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount + of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' type: object - nodes: - description: Nodes is a set of node name and objects - must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: Pending - / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: + requests: additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set - values that used to select pods. The key defines - the namespace which pods belong, and the each values - is a set of pod names. + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: '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-compute-resources-container/' type: object type: object - stressngStressors: - description: StressngStressors defines plenty of stressors - just like `Stressors` except that it's an experimental - feature and more powerful. You can define stressors - in `stress-ng` (see also `man stress-ng`) dialect, however - not all of the supported stressors are well tested. - It maybe retired in later releases. You should always - use `Stressors` to define the stressors and use this - only when you want more stressors unsupported by `Stressors`. - When both `StressngStressors` and `Stressors` are defined, - `StressngStressors` wins. - type: string - stressors: - description: Stressors defines plenty of stressors supported - to stress system components out. You can use one or - more of them to make up various kinds of stresses. At - least one of the stressors should be specified. + securityContext: + description: 'Security options the pod should run with. + More info: https://kubernetes.io/docs/concepts/policy/security-context/ + More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/' properties: - cpu: - description: CPUStressor stresses CPU out + allowPrivilegeEscalation: + description: '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' + type: boolean + capabilities: + description: The capabilities to add/drop when running + containers. Defaults to the default set of capabilities + granted by the container runtime. properties: - load: - description: Load specifies P percent loading - per CPU worker. 0 is effectively a sleep (no - load) and 100 is full loading. - type: integer - options: - description: extend stress-ng options + add: + description: Added capabilities items: + description: Capability represent POSIX capabilities + type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities + type type: string type: array - workers: - description: Workers specifies N workers to apply - the stressor. - type: integer - required: - - workers type: object - memory: - description: MemoryStressor stresses virtual memory - out + privileged: + description: Run container in privileged mode. Processes + in privileged containers are essentially equivalent + to root on the host. Defaults to false. + type: boolean + procMount: + description: 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. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only + root filesystem. Default is false. + type: boolean + runAsGroup: + description: 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. + format: int64 + type: integer + runAsNonRoot: + description: 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. + type: boolean + runAsUser: + description: 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. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to + the container. If unspecified, the container runtime + will allocate a random SELinux context for each + container. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. properties: - options: - description: extend stress-ng options + level: + description: Level is SELinux level label that + applies to the container. + type: string + role: + description: Role is a SELinux role label that + applies to the container. + type: string + type: + description: Type is a SELinux type label that + applies to the container. + type: string + user: + description: User is a SELinux user label that + applies to the container. + type: string + type: object + windowsOptions: + description: The Windows specific settings applied + to all containers. If unspecified, the options from + the PodSecurityContext will be used. If set in both + SecurityContext and PodSecurityContext, the value + specified in SecurityContext takes precedence. + properties: + gmsaCredentialSpec: + description: 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. + This field is alpha-level and is only honored + by servers that enable the WindowsGMSA feature + flag. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name + of the GMSA credential spec to use. This field + is alpha-level and is only honored by servers + that enable the WindowsGMSA feature flag. + type: string + runAsUserName: + description: 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. This field is beta-level and may + be disabled with the WindowsRunAsUserName feature + flag. + type: string + type: object + type: object + startupProbe: + description: 'StartupProbe indicates that the Pod has + successfully initialized. If specified, no other probes + are executed until this completes successfully. If this + probe fails, the Pod will be restarted, just as if the + livenessProbe failed. This can be used to provide different + probe parameters at the beginning of a Pod''s lifecycle, + when it might take a long time to load data or warm + a cache, than during steady-state operation. This cannot + be updated. This is an alpha feature enabled by the + StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following should + be specified. Exec specifies the action to take. + properties: + command: + description: 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. items: type: string type: array - size: - description: Size specifies N bytes consumed per - vm worker, default is the total available memory. - One can specify the size as % of total available - memory or in units of B, KB/KiB, MB/MiB, GB/GiB, - TB/TiB. + type: object + failureThreshold: + description: Minimum consecutive failures for the + probe to be considered failed after having succeeded. + Defaults to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request to + perform. + properties: + host: + description: Host name to connect to, defaults + to the pod IP. You probably want to set "Host" + in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the + host. Defaults to HTTP. type: string - workers: - description: Workers specifies N workers to apply - the stressor. - type: integer required: - - workers + - port + type: object + initialDelaySeconds: + description: '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' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the + probe. Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: 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. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving + a TCP port. TCP hooks not yet supported TODO: implement + a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, + defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port type: object + timeoutSeconds: + description: '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' + format: int32 + type: integer type: object - value: - description: Value is required when the mode is set to - `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. - If `FixedPodMode`, provide an integer of pods to do - chaos action. If `FixedPercentPodMod`, provide a number - from 0-100 to specify the percent of pods the server - can do chaos action. IF `RandomMaxPercentPodMod`, provide - a number from 0-100 to specify the max percent of pods - to do chaos action - type: string - required: - - mode - - selector - type: object - timeChaos: - description: TimeChaosSpec defines the desired state of TimeChaos - properties: - clockIds: - description: ClockIds defines all affected clock id All - available options are ["CLOCK_REALTIME","CLOCK_MONOTONIC","CLOCK_PROCESS_CPUTIME_ID","CLOCK_THREAD_CPUTIME_ID", - "CLOCK_MONOTONIC_RAW","CLOCK_REALTIME_COARSE","CLOCK_MONOTONIC_COARSE","CLOCK_BOOTTIME","CLOCK_REALTIME_ALARM", - "CLOCK_BOOTTIME_ALARM"] Default value is ["CLOCK_REALTIME"] + stdin: + description: 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. + type: boolean + stdinOnce: + description: 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 + type: boolean + terminationMessagePath: + description: '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.' + type: string + terminationMessagePolicy: + description: 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. + type: string + tty: + description: Whether this container should allocate a + TTY for itself, also requires 'stdin' to be true. Default + is false. + type: boolean + volumeDevices: + description: volumeDevices is the list of block devices + to be used by the container. This is a beta feature. items: - type: string + description: volumeDevice describes a mapping of a raw + block device within a container. + properties: + devicePath: + description: devicePath is the path inside of the + container that the device will be mapped to. + type: string + name: + description: name must match the name of a persistentVolumeClaim + in the pod + type: string + required: + - devicePath + - name + type: object type: array - containerNames: - description: ContainerNames indicates list of the name - of affected container. If not set, all containers will - be injected + volumeMounts: + description: Pod volumes to mount into the container's + filesystem. Cannot be updated. items: - type: string + description: VolumeMount describes a mounting of a Volume + within a container. + properties: + mountPath: + description: Path within the container at which + the volume should be mounted. Must not contain + ':'. + type: string + mountPropagation: + description: 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. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write + otherwise (false or unspecified). Defaults to + false. + type: boolean + subPath: + description: Path within the volume from which the + container's volume should be mounted. Defaults + to "" (volume's root). + type: string + subPathExpr: + description: 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. + type: string + required: + - mountPath + - name + type: object type: array - duration: - description: Duration represents the duration of the chaos - action - type: string - mode: - description: 'Mode defines the mode to run chaos action. - Supported mode: one / all / fixed / fixed-percent / - random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent + workingDir: + description: 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. type: string - selector: - description: Selector is used to select pods that are - used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: + required: + - name + type: object + volumes: + description: Volumes is a list of volumes that can be mounted + by containers in a template. + items: + description: Volume represents a named volume in a pod that + may be accessed by any container in the pod. + properties: + awsElasticBlockStore: + description: 'AWSElasticBlockStore represents an AWS + Disk resource that is attached to a kubelet''s host + machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + properties: + fsType: + description: 'Filesystem type of the volume that + you want to mount. Tip: Ensure that the filesystem + type is supported by the host operating system. + Examples: "ext4", "xfs", "ntfs". Implicitly inferred + to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + TODO: how do we prevent errors in the filesystem + from compromising the machine' + type: string + partition: + description: 'The partition in the volume that you + want to mount. If omitted, the default is to mount + by volume name. Examples: For volume /dev/sda1, + you specify the partition as "1". Similarly, the + volume partition for /dev/sda is "0" (or you can + leave the property empty).' + format: int32 + type: integer + readOnly: + description: 'Specify "true" to force and set the + ReadOnly property in VolumeMounts to "true". If + omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: boolean + volumeID: + description: 'Unique ID of the persistent disk resource + in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: string + required: + - volumeID + type: object + azureDisk: + description: AzureDisk represents an Azure Data Disk + mount on the host and bind mount to the pod. + properties: + cachingMode: + description: 'Host Caching mode: None, Read Only, + Read Write.' + type: string + diskName: + description: The Name of the data disk in the blob + storage + type: string + diskURI: + description: The URI the data disk in the blob storage + type: string + fsType: + description: Filesystem type to mount. Must be a + filesystem type supported by the host operating + system. Ex. "ext4", "xfs", "ntfs". Implicitly + inferred to be "ext4" if unspecified. + type: string + kind: + description: 'Expected values Shared: multiple blob + disks per storage account Dedicated: single blob + disk per storage account Managed: azure managed + data disk (only in managed availability set). + defaults to shared' + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + description: AzureFile represents an Azure File Service + mount on the host and bind mount to the pod. + properties: + readOnly: + description: Defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretName: + description: the name of secret that contains Azure + Storage Account Name and Key + type: string + shareName: + description: Share Name + type: string + required: + - secretName + - shareName + type: object + cephfs: + description: CephFS represents a Ceph FS mount on the + host that shares a pod's lifetime + properties: + monitors: + description: 'Required: Monitors is a collection + of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + items: + type: string + type: array + path: + description: 'Optional: Used as the mounted root, + rather than the full Ceph tree, default is /' type: string - description: Map of string keys and values that can - be used to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list of selectors - based on set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. + readOnly: + description: 'Optional: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting + in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: boolean + secretFile: + description: 'Optional: SecretFile is the path to + key ring for User, default is /etc/ceph/user.secret + More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + secretRef: + description: 'Optional: SecretRef is reference to + the authentication secret for User, default is + empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' properties: - key: - description: key is the label key that the selector - applies to. + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, - NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values - array must be non-empty. If the operator is - Exists or DoesNotExist, the values array must - be empty. This array is replaced during a - strategic merge patch. - items: - type: string - type: array - required: - - key - - operator type: object - type: array - fieldSelectors: - additionalProperties: + user: + description: 'Optional: User is the rados user name, + default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' type: string - description: Map of string keys and values that can - be used to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: + required: + - monitors + type: object + cinder: + description: 'Cinder represents a cinder volume attached + and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + properties: + fsType: + description: 'Filesystem type to mount. Must be + a filesystem type supported by the host operating + system. Examples: "ext4", "xfs", "ntfs". Implicitly + inferred to be "ext4" if unspecified. More info: + https://examples.k8s.io/mysql-cinder-pd/README.md' type: string - description: Map of string keys and values that can - be used to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which - objects belong. + readOnly: + description: 'Optional: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting + in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: boolean + secretRef: + description: 'Optional: points to a secret object + containing parameters used to connect to OpenStack.' + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + volumeID: + description: 'volume id used to identify the volume + in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + required: + - volumeID + type: object + configMap: + description: ConfigMap represents a configMap that should + populate this volume + properties: + defaultMode: + description: 'Optional: mode bits to use on created + files by default. Must be a value between 0 and + 0777. Defaults to 0644. Directories within the + path are not affected by this setting. This might + be in conflict with other options that affect + the file mode, like fsGroup, and the result can + be other mode bits set.' + format: int32 + type: integer items: + description: If unspecified, each key-value pair + in the Data field of the referenced ConfigMap + will be projected into the volume as a file whose + name is the key and content is the value. If specified, + the listed keys will be projected into the specified + paths, and unlisted keys will not be present. + If a key is specified which is not present in + the ConfigMap, the volume setup will error unless + it is marked optional. Paths must be relative + and may not contain the '..' path or start with + '..'. + items: + description: Maps a string key to a path within + a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use on + this file, must be a value between 0 and + 0777. If not specified, the volume defaultMode + will be used. This might be in conflict + with other options that affect the file + mode, like fsGroup, and the result can be + other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file + to map the key to. May not be an absolute + path. May not contain the path element '..'. + May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' type: string - type: array - nodeSelectors: - additionalProperties: + optional: + description: Specify whether the ConfigMap or its + keys must be defined + type: boolean + type: object + csi: + description: CSI (Container Storage Interface) represents + storage that is handled by an external CSI driver + (Alpha feature). + properties: + driver: + description: Driver is the name of the CSI driver + that handles this volume. Consult with your admin + for the correct name as registered in the cluster. type: string - description: Map of string keys and values that can - be used to select nodes. Selector which must match - a node's labels, and objects must belong to these - selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects - must belong to these nodes. - items: + fsType: + description: Filesystem type to mount. Ex. "ext4", + "xfs", "ntfs". If not provided, the empty value + is passed to the associated CSI driver which will + determine the default filesystem to apply. type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: Pending - / Running / Succeeded / Failed / Unknown' + nodePublishSecretRef: + description: NodePublishSecretRef is a reference + to the secret object containing sensitive information + to pass to the CSI driver to complete the CSI + NodePublishVolume and NodeUnpublishVolume calls. + This field is optional, and may be empty if no + secret is required. If the secret object contains + more than one secret, all secret references are + passed. + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + readOnly: + description: Specifies a read-only configuration + for the volume. Defaults to false (read/write). + type: boolean + volumeAttributes: + additionalProperties: + type: string + description: VolumeAttributes stores driver-specific + properties that are passed to the CSI driver. + Consult your driver's documentation for supported + values. + type: object + required: + - driver + type: object + downwardAPI: + description: DownwardAPI represents downward API about + the pod that should populate this volume + properties: + defaultMode: + description: 'Optional: mode bits to use on created + files by default. Must be a value between 0 and + 0777. Defaults to 0644. Directories within the + path are not affected by this setting. This might + be in conflict with other options that affect + the file mode, like fsGroup, and the result can + be other mode bits set.' + format: int32 + type: integer items: + description: Items is a list of downward API volume + file + items: + description: DownwardAPIVolumeFile represents + information to create the file containing the + pod field + properties: + fieldRef: + description: 'Required: Selects a field of + the pod: only annotations, labels, name + and namespace are supported.' + properties: + apiVersion: + description: Version of the schema the + FieldPath is written in terms of, defaults + to "v1". + type: string + fieldPath: + description: Path of the field to select + in the specified API version. + type: string + required: + - fieldPath + type: object + mode: + description: 'Optional: mode bits to use on + this file, must be a value between 0 and + 0777. If not specified, the volume defaultMode + will be used. This might be in conflict + with other options that affect the file + mode, like fsGroup, and the result can be + other mode bits set.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative + path name of the file to be created. Must + not be absolute or contain the ''..'' path. + Must be utf-8 encoded. The first item of + the relative path must not start with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, requests.cpu and requests.memory) + are currently supported.' + properties: + containerName: + description: 'Container name: required + for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format + of the exposed resources, defaults to + "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + emptyDir: + description: 'EmptyDir represents a temporary directory + that shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + properties: + medium: + description: 'What type of storage medium should + back this directory. The default is "" which means + to use the node''s default medium. Must be an + empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' type: string - type: array - pods: - additionalProperties: + sizeLimit: + anyOf: + - type: integer + - type: string + description: 'Total amount of local storage required + for this EmptyDir volume. The size limit is also + applicable for memory medium. The maximum usage + on memory medium EmptyDir would be the minimum + value between the SizeLimit specified here and + the sum of memory limits of all containers in + a pod. The default is nil which means that the + limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir' + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + fc: + description: FC represents a Fibre Channel resource + that is attached to a kubelet's host machine and then + exposed to the pod. + properties: + fsType: + description: 'Filesystem type to mount. Must be + a filesystem type supported by the host operating + system. Ex. "ext4", "xfs", "ntfs". Implicitly + inferred to be "ext4" if unspecified. TODO: how + do we prevent errors in the filesystem from compromising + the machine' + type: string + lun: + description: 'Optional: FC target lun number' + format: int32 + type: integer + readOnly: + description: 'Optional: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting + in VolumeMounts.' + type: boolean + targetWWNs: + description: 'Optional: FC target worldwide names + (WWNs)' items: type: string type: array - description: Pods is a map of string keys and a set - values that used to select pods. The key defines - the namespace which pods belong, and the each values - is a set of pod names. - type: object - type: object - timeOffset: - description: TimeOffset defines the delta time of injected - program. It's a possibly signed sequence of decimal - numbers, such as "300ms", "-1.5h" or "2h45m". Valid - time units are "ns", "us" (or "µs"), "ms", "s", "m", - "h". - type: string - value: - description: Value is required when the mode is set to - `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. - If `FixedPodMode`, provide an integer of pods to do - chaos action. If `FixedPercentPodMod`, provide a number - from 0-100 to specify the percent of pods the server - can do chaos action. IF `RandomMaxPercentPodMod`, provide - a number from 0-100 to specify the max percent of pods - to do chaos action - type: string - required: - - mode - - selector - - timeOffset - type: object - type: - description: 'TODO: use a custom type, as `TemplateType` contains - other possible values' - type: string - required: - - schedule - - type - type: object - stressChaos: - description: StressChaosSpec defines the desired state of StressChaos - properties: - containerNames: - description: ContainerNames indicates list of the name of - affected container. If not set, all containers will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of the chaos - action - type: string - mode: - description: 'Mode defines the mode to run chaos action. Supported - mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - selector: - description: Selector is used to select pods that are used - to inject chaos action. - properties: - annotationSelectors: - additionalProperties: + wwids: + description: 'Optional: FC volume world wide identifiers + (wwids) Either wwids or combination of targetWWNs + and lun must be set, but not both simultaneously.' + items: + type: string + type: array + type: object + flexVolume: + description: FlexVolume represents a generic volume + resource that is provisioned/attached using an exec + based plugin. + properties: + driver: + description: Driver is the name of the driver to + use for this volume. + type: string + fsType: + description: Filesystem type to mount. Must be a + filesystem type supported by the host operating + system. Ex. "ext4", "xfs", "ntfs". The default + filesystem depends on FlexVolume script. + type: string + options: + additionalProperties: + type: string + description: 'Optional: Extra command options if + any.' + type: object + readOnly: + description: 'Optional: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting + in VolumeMounts.' + type: boolean + secretRef: + description: 'Optional: SecretRef is reference to + the secret object containing sensitive information + to pass to the plugin scripts. This may be empty + if no secret object is specified. If the secret + object contains more than one secret, all secrets + are passed to the plugin scripts.' + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + required: + - driver + type: object + flocker: + description: Flocker represents a Flocker volume attached + to a kubelet's host machine. This depends on the Flocker + control service being running + properties: + datasetName: + description: Name of the dataset stored as metadata + -> name on the dataset for Flocker should be considered + as deprecated + type: string + datasetUUID: + description: UUID of the dataset. This is unique + identifier of a Flocker dataset + type: string + type: object + gcePersistentDisk: + description: 'GCEPersistentDisk represents a GCE Disk + resource that is attached to a kubelet''s host machine + and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + properties: + fsType: + description: 'Filesystem type of the volume that + you want to mount. Tip: Ensure that the filesystem + type is supported by the host operating system. + Examples: "ext4", "xfs", "ntfs". Implicitly inferred + to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + TODO: how do we prevent errors in the filesystem + from compromising the machine' + type: string + partition: + description: 'The partition in the volume that you + want to mount. If omitted, the default is to mount + by volume name. Examples: For volume /dev/sda1, + you specify the partition as "1". Similarly, the + volume partition for /dev/sda is "0" (or you can + leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + format: int32 + type: integer + pdName: + description: 'Unique name of the PD resource in + GCE. Used to identify the disk in GCE. More info: + https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: string + readOnly: + description: 'ReadOnly here will force the ReadOnly + setting in VolumeMounts. Defaults to false. More + info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: boolean + required: + - pdName + type: object + gitRepo: + description: 'GitRepo represents a git repository at + a particular revision. DEPRECATED: GitRepo is deprecated. + To provision a container with a git repo, mount an + EmptyDir into an InitContainer that clones the repo + using git, then mount the EmptyDir into the Pod''s + container.' + properties: + directory: + description: Target directory name. Must not contain + or start with '..'. If '.' is supplied, the volume + directory will be the git repository. Otherwise, + if specified, the volume will contain the git + repository in the subdirectory with the given + name. + type: string + repository: + description: Repository URL + type: string + revision: + description: Commit hash for the specified revision. + type: string + required: + - repository + type: object + glusterfs: + description: 'Glusterfs represents a Glusterfs mount + on the host that shares a pod''s lifetime. More info: + https://examples.k8s.io/volumes/glusterfs/README.md' + properties: + endpoints: + description: 'EndpointsName is the endpoint name + that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + path: + description: 'Path is the Glusterfs volume path. + More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + readOnly: + description: 'ReadOnly here will force the Glusterfs + volume to be mounted with read-only permissions. + Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: boolean + required: + - endpoints + - path + type: object + hostPath: + description: 'HostPath represents a pre-existing file + or directory on the host machine that is directly + exposed to the container. This is generally used for + system agents or other privileged things that are + allowed to see the host machine. Most containers will + NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath + --- TODO(jonesdl) We need to restrict who can use + host directory mounts and who can/can not mount host + directories as read/write.' + properties: + path: + description: 'Path of the directory on the host. + If the path is a symlink, it will follow the link + to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + type: + description: 'Type for HostPath Volume Defaults + to "" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + required: + - path + type: object + iscsi: + description: 'ISCSI represents an ISCSI Disk resource + that is attached to a kubelet''s host machine and + then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' + properties: + chapAuthDiscovery: + description: whether support iSCSI Discovery CHAP + authentication + type: boolean + chapAuthSession: + description: whether support iSCSI Session CHAP + authentication + type: boolean + fsType: + description: 'Filesystem type of the volume that + you want to mount. Tip: Ensure that the filesystem + type is supported by the host operating system. + Examples: "ext4", "xfs", "ntfs". Implicitly inferred + to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi + TODO: how do we prevent errors in the filesystem + from compromising the machine' + type: string + initiatorName: + description: Custom iSCSI Initiator Name. If initiatorName + is specified with iscsiInterface simultaneously, + new iSCSI interface : + will be created for the connection. + type: string + iqn: + description: Target iSCSI Qualified Name. + type: string + iscsiInterface: + description: iSCSI Interface Name that uses an iSCSI + transport. Defaults to 'default' (tcp). + type: string + lun: + description: iSCSI Target Lun number. + format: int32 + type: integer + portals: + description: iSCSI Target Portal List. The portal + is either an IP or ip_addr:port if the port is + other than default (typically TCP ports 860 and + 3260). + items: + type: string + type: array + readOnly: + description: ReadOnly here will force the ReadOnly + setting in VolumeMounts. Defaults to false. + type: boolean + secretRef: + description: CHAP Secret for iSCSI target and initiator + authentication + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + targetPortal: + description: iSCSI Target Portal. The Portal is + either an IP or ip_addr:port if the port is other + than default (typically TCP ports 860 and 3260). + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + description: 'Volume''s name. Must be a DNS_LABEL and + unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' type: string - description: Map of string keys and values that can be - used to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that - can be used to select objects. A list of selectors based - on set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. + nfs: + description: 'NFS represents an NFS mount on the host + that shares a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + properties: + path: + description: 'Path that is exported by the NFS server. + More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + readOnly: + description: 'ReadOnly here will force the NFS export + to be mounted with read-only permissions. Defaults + to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: boolean + server: + description: 'Server is the hostname or IP address + of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + description: 'PersistentVolumeClaimVolumeSource represents + a reference to a PersistentVolumeClaim in the same + namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' properties: - key: - description: key is the label key that the selector - applies to. + claimName: + description: 'ClaimName is the name of a PersistentVolumeClaim + in the same namespace as the pod using this volume. + More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. + readOnly: + description: Will force the ReadOnly setting in + VolumeMounts. Default false. + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + description: PhotonPersistentDisk represents a PhotonController + persistent disk attached and mounted on kubelets host + machine + properties: + fsType: + description: Filesystem type to mount. Must be a + filesystem type supported by the host operating + system. Ex. "ext4", "xfs", "ntfs". Implicitly + inferred to be "ext4" if unspecified. type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. + pdID: + description: ID that identifies Photon Controller + persistent disk + type: string + required: + - pdID + type: object + portworxVolume: + description: PortworxVolume represents a portworx volume + attached and mounted on kubelets host machine + properties: + fsType: + description: FSType represents the filesystem type + to mount Must be a filesystem type supported by + the host operating system. Ex. "ext4", "xfs". + Implicitly inferred to be "ext4" if unspecified. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + volumeID: + description: VolumeID uniquely identifies a Portworx + volume + type: string + required: + - volumeID + type: object + projected: + description: Items for all in one resources secrets, + configmaps, and downward API + properties: + defaultMode: + description: Mode bits to use on created files by + default. Must be a value between 0 and 0777. Directories + within the path are not affected by this setting. + This might be in conflict with other options that + affect the file mode, like fsGroup, and the result + can be other mode bits set. + format: int32 + type: integer + sources: + description: list of volume projections + items: + description: Projection that may be projected + along with other supported volume types + properties: + configMap: + description: information about the configMap + data to project + properties: + items: + description: If unspecified, each key-value + pair in the Data field of the referenced + ConfigMap will be projected into the + volume as a file whose name is the key + and content is the value. If specified, + the listed keys will be projected into + the specified paths, and unlisted keys + will not be present. If a key is specified + which is not present in the ConfigMap, + the volume setup will error unless it + is marked optional. Paths must be relative + and may not contain the '..' path or + start with '..'. + items: + description: Maps a string key to a + path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits + to use on this file, must be a + value between 0 and 0777. If not + specified, the volume defaultMode + will be used. This might be in + conflict with other options that + affect the file mode, like fsGroup, + and the result can be other mode + bits set.' + format: int32 + type: integer + path: + description: The relative path of + the file to map the key to. May + not be an absolute path. May not + contain the path element '..'. + May not start with the string + '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap + or its keys must be defined + type: boolean + type: object + downwardAPI: + description: information about the downwardAPI + data to project + properties: + items: + description: Items is a list of DownwardAPIVolume + file + items: + description: DownwardAPIVolumeFile represents + information to create the file containing + the pod field + properties: + fieldRef: + description: 'Required: Selects + a field of the pod: only annotations, + labels, name and namespace are + supported.' + properties: + apiVersion: + description: Version of the + schema the FieldPath is written + in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field + to select in the specified + API version. + type: string + required: + - fieldPath + type: object + mode: + description: 'Optional: mode bits + to use on this file, must be a + value between 0 and 0777. If not + specified, the volume defaultMode + will be used. This might be in + conflict with other options that + affect the file mode, like fsGroup, + and the result can be other mode + bits set.' + format: int32 + type: integer + path: + description: 'Required: Path is the + relative path name of the file + to be created. Must not be absolute + or contain the ''..'' path. Must + be utf-8 encoded. The first item + of the relative path must not + start with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource + of the container: only resources + limits and requests (limits.cpu, + limits.memory, requests.cpu and + requests.memory) are currently + supported.' + properties: + containerName: + description: 'Container name: + required for volumes, optional + for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output + format of the exposed resources, + defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource + to select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + secret: + description: information about the secret + data to project + properties: + items: + description: If unspecified, each key-value + pair in the Data field of the referenced + Secret will be projected into the volume + as a file whose name is the key and + content is the value. If specified, + the listed keys will be projected into + the specified paths, and unlisted keys + will not be present. If a key is specified + which is not present in the Secret, + the volume setup will error unless it + is marked optional. Paths must be relative + and may not contain the '..' path or + start with '..'. + items: + description: Maps a string key to a + path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits + to use on this file, must be a + value between 0 and 0777. If not + specified, the volume defaultMode + will be used. This might be in + conflict with other options that + affect the file mode, like fsGroup, + and the result can be other mode + bits set.' + format: int32 + type: integer + path: + description: The relative path of + the file to map the key to. May + not be an absolute path. May not + contain the path element '..'. + May not start with the string + '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret + or its key must be defined + type: boolean + type: object + serviceAccountToken: + description: information about the serviceAccountToken + data to project + properties: + audience: + description: Audience is the intended + audience of the token. A recipient of + a token must identify itself with an + identifier specified in the audience + of the token, and otherwise should reject + the token. The audience defaults to + the identifier of the apiserver. + type: string + expirationSeconds: + description: ExpirationSeconds is the + requested duration of validity of the + service account token. As the token + approaches expiration, the kubelet volume + plugin will proactively rotate the service + account token. The kubelet will start + trying to rotate the token if the token + is older than 80 percent of its time + to live or if the token is older than + 24 hours.Defaults to 1 hour and must + be at least 10 minutes. + format: int64 + type: integer + path: + description: Path is the path relative + to the mount point of the file to project + the token into. + type: string + required: + - path + type: object + type: object + type: array + required: + - sources + type: object + quobyte: + description: Quobyte represents a Quobyte mount on the + host that shares a pod's lifetime + properties: + group: + description: Group to map volume access to Default + is no group + type: string + readOnly: + description: ReadOnly here will force the Quobyte + volume to be mounted with read-only permissions. + Defaults to false. + type: boolean + registry: + description: Registry represents a single or multiple + Quobyte Registry services specified as a string + as host:port pair (multiple entries are separated + with commas) which acts as the central registry + for volumes + type: string + tenant: + description: Tenant owning the given Quobyte volume + in the Backend Used with dynamically provisioned + Quobyte volumes, value is set by the plugin + type: string + user: + description: User to map volume access to Defaults + to serivceaccount user + type: string + volume: + description: Volume is a string that references + an already created Quobyte volume by name. + type: string + required: + - registry + - volume + type: object + rbd: + description: 'RBD represents a Rados Block Device mount + on the host that shares a pod''s lifetime. More info: + https://examples.k8s.io/volumes/rbd/README.md' + properties: + fsType: + description: 'Filesystem type of the volume that + you want to mount. Tip: Ensure that the filesystem + type is supported by the host operating system. + Examples: "ext4", "xfs", "ntfs". Implicitly inferred + to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd + TODO: how do we prevent errors in the filesystem + from compromising the machine' + type: string + image: + description: 'The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + keyring: + description: 'Keyring is the path to key ring for + RBDUser. Default is /etc/ceph/keyring. More info: + https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + monitors: + description: 'A collection of Ceph monitors. More + info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' items: type: string type: array + pool: + description: 'The rados pool name. Default is rbd. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + readOnly: + description: 'ReadOnly here will force the ReadOnly + setting in VolumeMounts. Defaults to false. More + info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: boolean + secretRef: + description: 'SecretRef is name of the authentication + secret for RBDUser. If provided overrides keyring. + Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + user: + description: 'The rados user name. Default is admin. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string required: - - key - - operator + - image + - monitors type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which - objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select nodes. Selector which must match a node's - labels, and objects must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects must - belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: Pending - / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values - that used to select pods. The key defines the namespace - which pods belong, and the each values is a set of pod - names. - type: object - type: object - stressngStressors: - description: StressngStressors defines plenty of stressors - just like `Stressors` except that it's an experimental feature - and more powerful. You can define stressors in `stress-ng` - (see also `man stress-ng`) dialect, however not all of the - supported stressors are well tested. It maybe retired in - later releases. You should always use `Stressors` to define - the stressors and use this only when you want more stressors - unsupported by `Stressors`. When both `StressngStressors` - and `Stressors` are defined, `StressngStressors` wins. - type: string - stressors: - description: Stressors defines plenty of stressors supported - to stress system components out. You can use one or more - of them to make up various kinds of stresses. At least one - of the stressors should be specified. - properties: - cpu: - description: CPUStressor stresses CPU out - properties: - load: - description: Load specifies P percent loading per - CPU worker. 0 is effectively a sleep (no load) and - 100 is full loading. - type: integer - options: - description: extend stress-ng options - items: + scaleIO: + description: ScaleIO represents a ScaleIO persistent + volume attached and mounted on Kubernetes nodes. + properties: + fsType: + description: Filesystem type to mount. Must be a + filesystem type supported by the host operating + system. Ex. "ext4", "xfs", "ntfs". Default is + "xfs". type: string - type: array - workers: - description: Workers specifies N workers to apply - the stressor. - type: integer - required: - - workers - type: object - memory: - description: MemoryStressor stresses virtual memory out - properties: - options: - description: extend stress-ng options + gateway: + description: The host address of the ScaleIO API + Gateway. + type: string + protectionDomain: + description: The name of the ScaleIO Protection + Domain for the configured storage. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: SecretRef references to the secret + for ScaleIO user and other sensitive information. + If this is not provided, Login operation will + fail. + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + sslEnabled: + description: Flag to enable/disable SSL communication + with Gateway, default false + type: boolean + storageMode: + description: Indicates whether the storage for a + volume should be ThickProvisioned or ThinProvisioned. + Default is ThinProvisioned. + type: string + storagePool: + description: The ScaleIO Storage Pool associated + with the protection domain. + type: string + system: + description: The name of the storage system as configured + in ScaleIO. + type: string + volumeName: + description: The name of a volume already created + in the ScaleIO system that is associated with + this volume source. + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + description: 'Secret represents a secret that should + populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + properties: + defaultMode: + description: 'Optional: mode bits to use on created + files by default. Must be a value between 0 and + 0777. Defaults to 0644. Directories within the + path are not affected by this setting. This might + be in conflict with other options that affect + the file mode, like fsGroup, and the result can + be other mode bits set.' + format: int32 + type: integer items: + description: If unspecified, each key-value pair + in the Data field of the referenced Secret will + be projected into the volume as a file whose name + is the key and content is the value. If specified, + the listed keys will be projected into the specified + paths, and unlisted keys will not be present. + If a key is specified which is not present in + the Secret, the volume setup will error unless + it is marked optional. Paths must be relative + and may not contain the '..' path or start with + '..'. + items: + description: Maps a string key to a path within + a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use on + this file, must be a value between 0 and + 0777. If not specified, the volume defaultMode + will be used. This might be in conflict + with other options that affect the file + mode, like fsGroup, and the result can be + other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file + to map the key to. May not be an absolute + path. May not contain the path element '..'. + May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + optional: + description: Specify whether the Secret or its keys + must be defined + type: boolean + secretName: + description: 'Name of the secret in the pod''s namespace + to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' type: string - type: array - size: - description: Size specifies N bytes consumed per vm - worker, default is the total available memory. One - can specify the size as % of total available memory - or in units of B, KB/KiB, MB/MiB, GB/GiB, TB/TiB. - type: string - workers: - description: Workers specifies N workers to apply - the stressor. - type: integer - required: - - workers - type: object - type: object - value: - description: Value is required when the mode is set to `FixedPodMode` - / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. If `FixedPodMode`, - provide an integer of pods to do chaos action. If `FixedPercentPodMod`, - provide a number from 0-100 to specify the percent of pods - the server can do chaos action. IF `RandomMaxPercentPodMod`, provide - a number from 0-100 to specify the max percent of pods to - do chaos action - type: string - required: - - mode - - selector + type: object + storageos: + description: StorageOS represents a StorageOS volume + attached and mounted on Kubernetes nodes. + properties: + fsType: + description: Filesystem type to mount. Must be a + filesystem type supported by the host operating + system. Ex. "ext4", "xfs", "ntfs". Implicitly + inferred to be "ext4" if unspecified. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: SecretRef specifies the secret to use + for obtaining the StorageOS API credentials. If + not specified, default values will be attempted. + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + volumeName: + description: VolumeName is the human-readable name + of the StorageOS volume. Volume names are only + unique within a namespace. + type: string + volumeNamespace: + description: VolumeNamespace specifies the scope + of the volume within StorageOS. If no namespace + is specified then the Pod's namespace will be + used. This allows the Kubernetes name scoping + to be mirrored within StorageOS for tighter integration. + Set VolumeName to any name to override the default + behaviour. Set to "default" if you are not using + namespaces within StorageOS. Namespaces that do + not pre-exist within StorageOS will be created. + type: string + type: object + vsphereVolume: + description: VsphereVolume represents a vSphere volume + attached and mounted on kubelets host machine + properties: + fsType: + description: Filesystem type to mount. Must be a + filesystem type supported by the host operating + system. Ex. "ext4", "xfs", "ntfs". Implicitly + inferred to be "ext4" if unspecified. + type: string + storagePolicyID: + description: Storage Policy Based Management (SPBM) + profile ID associated with the StoragePolicyName. + type: string + storagePolicyName: + description: Storage Policy Based Management (SPBM) + profile name. + type: string + volumePath: + description: Path that identifies vSphere volume + vmdk + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array type: object tasks: + description: Tasks describes the children steps of serial or parallel + node. Only used when Type is TypeSerial or TypeParallel. items: type: string type: array diff --git a/manifests/crd.yaml b/manifests/crd.yaml index f759e71c4f..00b1f08d4d 100644 --- a/manifests/crd.yaml +++ b/manifests/crd.yaml @@ -5113,6 +5113,19 @@ spec: - awsRegion - ec2Instance type: object + conditionalTasks: + description: ConditionalTasks describes the conditional + branches of custom tasks. Only used when Type is TypeTask. + items: + properties: + expression: + type: string + task: + type: string + required: + - task + type: object + type: array dnsChaos: description: DNSChaosSpec defines the desired state of DNSChaos properties: @@ -6790,9 +6803,9 @@ spec: - selector type: object schedule: - description: ChaosOnlyScheduleSpec is very similar with - ScheduleSpec, but it could not schedule Workflow because - we could not resolve nested CRD now + description: Schedule describe the Schedule(describing scheduled + chaos) to be injected with chaos nodes. Only used when + Type is TypeSchedule. properties: awsChaos: description: AwsChaosSpec is the content of the specification @@ -9140,265 +9153,2848 @@ spec: - mode - selector type: object - tasks: - items: - type: string - type: array - templateType: - type: string - timeChaos: - description: TimeChaosSpec defines the desired state of - TimeChaos + task: + description: Task describes the behavior of the custom task. + Only used when Type is TypeTask. properties: - clockIds: - description: ClockIds defines all affected clock id - All available options are ["CLOCK_REALTIME","CLOCK_MONOTONIC","CLOCK_PROCESS_CPUTIME_ID","CLOCK_THREAD_CPUTIME_ID", - "CLOCK_MONOTONIC_RAW","CLOCK_REALTIME_COARSE","CLOCK_MONOTONIC_COARSE","CLOCK_BOOTTIME","CLOCK_REALTIME_ALARM", - "CLOCK_BOOTTIME_ALARM"] Default value is ["CLOCK_REALTIME"] - items: - type: string - type: array - containerNames: - description: ContainerNames indicates list of the name - of affected container. If not set, all containers - will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of the - chaos action - type: string - mode: - description: 'Mode defines the mode to run chaos action. - Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - selector: - description: Selector is used to select pods that are - used to inject chaos action. + container: + description: Container is the main container image to + run in the pod properties: - annotationSelectors: - additionalProperties: + args: + description: '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. 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. Cannot + be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list of - selectors based on set-based label expressions. + type: array + command: + description: '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. 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. Cannot + be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' items: - description: A label selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. + type: string + type: array + env: + description: List of environment variables to set + in the container. Cannot be updated. + items: + description: EnvVar represents an environment + variable present in a Container. properties: - key: - description: key is the label key that the - selector applies to. + name: + description: Name of the environment variable. + Must be a C_IDENTIFIER. type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists and DoesNotExist. + value: + description: '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 + "".' type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If the - operator is Exists or DoesNotExist, the - values array must be empty. This array is - replaced during a strategic merge patch. - items: - type: string - type: array + valueFrom: + description: Source for the environment variable's + value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap + or its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: + supports metadata.name, metadata.namespace, + metadata.labels, metadata.annotations, + spec.nodeName, spec.serviceAccountName, + status.hostIP, status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema + the FieldPath is written in terms + of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to + select in the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: '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.' + properties: + containerName: + description: 'Container name: required + for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output + format of the exposed resources, + defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to + select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret + in the pod's namespace + properties: + key: + description: The key of the secret + to select from. Must be a valid + secret key. + type: string + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret + or its key must be defined + type: boolean + required: + - key + type: object + type: object required: - - key - - operator + - name type: object type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to - which objects belong. + envFrom: + description: 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. items: - type: string + description: EnvFromSource represents the source + of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap + must be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend + to each key in the ConfigMap. Must be a + C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret + must be defined + type: boolean + type: object + type: object type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which must - match a node's labels, and objects must belong - to these selected nodes. + image: + description: '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.' + type: string + imagePullPolicy: + description: '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' + type: string + lifecycle: + description: Actions that the management system + should take in response to container lifecycle + events. Cannot be updated. + properties: + postStart: + description: 'PostStart is called immediately + after a container is created. If the handler + fails, the container is terminated and restarted + according to its restart policy. Other management + of the container blocks until the hook completes. + More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following + should be specified. Exec specifies the + action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http + request to perform. + properties: + host: + description: Host name to connect to, + defaults to the pod IP. You probably + want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in + the request. HTTP allows repeated + headers. + items: + description: HTTPHeader describes + a custom header to be used in HTTP + probes + properties: + name: + description: The header field + name + type: string + value: + description: The header field + value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP + server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port + to access on the container. Number + must be in the range 1 to 65535. Name + must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action + involving a TCP port. TCP hooks not yet + supported TODO: implement a realistic + TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to + connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port + to access on the container. Number + must be in the range 1 to 65535. Name + must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + description: 'PreStop is called immediately + before a container is terminated due to an + API request or management event such as liveness/startup + probe failure, preemption, resource contention, + etc. The handler is not called if the container + crashes or exits. The reason for termination + is passed to the handler. The Pod''s termination + grace period countdown begins before the PreStop + hooked is executed. Regardless of the outcome + of the handler, the container will eventually + terminate within the Pod''s termination grace + period. Other management of the container + blocks until the hook completes or until the + termination grace period is reached. More + info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following + should be specified. Exec specifies the + action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http + request to perform. + properties: + host: + description: Host name to connect to, + defaults to the pod IP. You probably + want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in + the request. HTTP allows repeated + headers. + items: + description: HTTPHeader describes + a custom header to be used in HTTP + probes + properties: + name: + description: The header field + name + type: string + value: + description: The header field + value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP + server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port + to access on the container. Number + must be in the range 1 to 65535. Name + must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action + involving a TCP port. TCP hooks not yet + supported TODO: implement a realistic + TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to + connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port + to access on the container. Number + must be in the range 1 to 65535. Name + must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object type: object - nodes: - description: Nodes is a set of node name and objects - must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: - Pending / Running / Succeeded / Failed / Unknown' + livenessProbe: + description: 'Periodic probe of container liveness. + Container will be restarted if the probe fails. + Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following + should be specified. Exec specifies the action + to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for + the probe to be considered failed after having + succeeded. Defaults to 3. Minimum value is + 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request + to perform. + properties: + host: + description: Host name to connect to, defaults + to the pod IP. You probably want to set + "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the + request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom + header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP + server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port + to access on the container. Number must + be in the range 1 to 65535. Name must + be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: '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' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform + the probe. Default to 10 seconds. Minimum + value is 1. + format: int32 + type: integer + successThreshold: + description: 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. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action + involving a TCP port. TCP hooks not yet supported + TODO: implement a realistic TCP lifecycle + hook' + properties: + host: + description: 'Optional: Host name to connect + to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port + to access on the container. Number must + be in the range 1 to 65535. Name must + be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: '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' + format: int32 + type: integer + type: object + name: + description: Name of the container specified as + a DNS_LABEL. Each container in a pod must have + a unique name (DNS_LABEL). Cannot be updated. + type: string + ports: + description: 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. items: - type: string + description: ContainerPort represents a network + port in a single container. + properties: + containerPort: + description: Number of port to expose on the + pod's IP address. This must be a valid port + number, 0 < x < 65536. + format: int32 + type: integer + hostIP: + description: What host IP to bind the external + port to. + type: string + hostPort: + description: Number of port to expose on the + host. If specified, this must be a valid + port number, 0 < x < 65536. If HostNetwork + is specified, this must match ContainerPort. + Most containers do not need this. + format: int32 + type: integer + name: + description: If specified, this must be an + IANA_SVC_NAME and unique within the pod. + Each named port in a pod must have a unique + name. Name for the port that can be referred + to by services. + type: string + protocol: + default: TCP + description: Protocol for port. Must be UDP, + TCP, or SCTP. Defaults to "TCP". + type: string + required: + - containerPort + type: object type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a - set values that used to select pods. The key defines - the namespace which pods belong, and the each - values is a set of pod names. + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + description: 'Periodic probe of container service + readiness. Container will be removed from service + endpoints if the probe fails. Cannot be updated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following + should be specified. Exec specifies the action + to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for + the probe to be considered failed after having + succeeded. Defaults to 3. Minimum value is + 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request + to perform. + properties: + host: + description: Host name to connect to, defaults + to the pod IP. You probably want to set + "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the + request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom + header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP + server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port + to access on the container. Number must + be in the range 1 to 65535. Name must + be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: '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' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform + the probe. Default to 10 seconds. Minimum + value is 1. + format: int32 + type: integer + successThreshold: + description: 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. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action + involving a TCP port. TCP hooks not yet supported + TODO: implement a realistic TCP lifecycle + hook' + properties: + host: + description: 'Optional: Host name to connect + to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port + to access on the container. Number must + be in the range 1 to 65535. Name must + be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: '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' + format: int32 + type: integer + type: object + resources: + description: 'Compute Resources required by this + container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount + of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: '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-compute-resources-container/' + type: object + type: object + securityContext: + description: 'Security options the pod should run + with. More info: https://kubernetes.io/docs/concepts/policy/security-context/ + More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/' + properties: + allowPrivilegeEscalation: + description: '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' + type: boolean + capabilities: + description: The capabilities to add/drop when + running containers. Defaults to the default + set of capabilities granted by the container + runtime. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX + capabilities type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX + capabilities type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. + Processes in privileged containers are essentially + equivalent to root on the host. Defaults to + false. + type: boolean + procMount: + description: 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. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only + root filesystem. Default is false. + type: boolean + runAsGroup: + description: 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. + format: int64 + type: integer + runAsNonRoot: + description: 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. + type: boolean + runAsUser: + description: 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. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied + to the container. If unspecified, the container + runtime will allocate a random SELinux context + for each container. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes + precedence. + properties: + level: + description: Level is SELinux level label + that applies to the container. + type: string + role: + description: Role is a SELinux role label + that applies to the container. + type: string + type: + description: Type is a SELinux type label + that applies to the container. + type: string + user: + description: User is a SELinux user label + that applies to the container. + type: string + type: object + windowsOptions: + description: The Windows specific settings applied + to all containers. If unspecified, the options + from the PodSecurityContext will be used. + If set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes + precedence. + properties: + gmsaCredentialSpec: + description: 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. This field is alpha-level and is + only honored by servers that enable the + WindowsGMSA feature flag. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the + name of the GMSA credential spec to use. + This field is alpha-level and is only + honored by servers that enable the WindowsGMSA + feature flag. + type: string + runAsUserName: + description: 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. This field is beta-level + and may be disabled with the WindowsRunAsUserName + feature flag. + type: string + type: object + type: object + startupProbe: + description: 'StartupProbe indicates that the Pod + has successfully initialized. If specified, no + other probes are executed until this completes + successfully. If this probe fails, the Pod will + be restarted, just as if the livenessProbe failed. + This can be used to provide different probe parameters + at the beginning of a Pod''s lifecycle, when it + might take a long time to load data or warm a + cache, than during steady-state operation. This + cannot be updated. This is an alpha feature enabled + by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following + should be specified. Exec specifies the action + to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for + the probe to be considered failed after having + succeeded. Defaults to 3. Minimum value is + 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request + to perform. + properties: + host: + description: Host name to connect to, defaults + to the pod IP. You probably want to set + "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the + request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom + header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP + server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port + to access on the container. Number must + be in the range 1 to 65535. Name must + be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: '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' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform + the probe. Default to 10 seconds. Minimum + value is 1. + format: int32 + type: integer + successThreshold: + description: 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. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action + involving a TCP port. TCP hooks not yet supported + TODO: implement a realistic TCP lifecycle + hook' + properties: + host: + description: 'Optional: Host name to connect + to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port + to access on the container. Number must + be in the range 1 to 65535. Name must + be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: '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' + format: int32 + type: integer type: object + stdin: + description: 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. + type: boolean + stdinOnce: + description: 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 + type: boolean + terminationMessagePath: + description: '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.' + type: string + terminationMessagePolicy: + description: 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. + type: string + tty: + description: Whether this container should allocate + a TTY for itself, also requires 'stdin' to be + true. Default is false. + type: boolean + volumeDevices: + description: volumeDevices is the list of block + devices to be used by the container. This is a + beta feature. + items: + description: volumeDevice describes a mapping + of a raw block device within a container. + properties: + devicePath: + description: devicePath is the path inside + of the container that the device will be + mapped to. + type: string + name: + description: name must match the name of a + persistentVolumeClaim in the pod + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + description: Pod volumes to mount into the container's + filesystem. Cannot be updated. + items: + description: VolumeMount describes a mounting + of a Volume within a container. + properties: + mountPath: + description: Path within the container at + which the volume should be mounted. Must + not contain ':'. + type: string + mountPropagation: + description: 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. + type: string + name: + description: This must match the Name of a + Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write + otherwise (false or unspecified). Defaults + to false. + type: boolean + subPath: + description: Path within the volume from which + the container's volume should be mounted. + Defaults to "" (volume's root). + type: string + subPathExpr: + description: 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. + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: 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. + type: string + required: + - name type: object - timeOffset: - description: TimeOffset defines the delta time of injected - program. It's a possibly signed sequence of decimal - numbers, such as "300ms", "-1.5h" or "2h45m". Valid - time units are "ns", "us" (or "µs"), "ms", "s", "m", - "h". - type: string - value: - description: Value is required when the mode is set - to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. - If `FixedPodMode`, provide an integer of pods to do - chaos action. If `FixedPercentPodMod`, provide a number - from 0-100 to specify the percent of pods the server - can do chaos action. IF `RandomMaxPercentPodMod`, provide - a number from 0-100 to specify the max percent of - pods to do chaos action - type: string - required: - - mode - - selector - - timeOffset - type: object - required: - - name - - templateType - type: object - type: array - required: - - entry - - templates - type: object - required: - - schedule - - type - type: object - status: - description: ScheduleStatus is the status of a schedule object - properties: - active: - items: - description: ObjectReference contains enough information to let - you inspect or modify the referred object. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object instead of - an entire object, this string should contain a valid JSON/Go - field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within - a pod, this would take on a value like: "spec.containers{name}" - (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" - (container with index 2 in this pod). This syntax is chosen - only to have some well-defined way of referencing a part of - an object. TODO: this design is not final and this field is - subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this reference - is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - type: array - time: - format: date-time - nullable: true - type: string - type: object - required: - - spec - type: object - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.4.1 - creationTimestamp: null - name: stresschaos.chaos-mesh.org -spec: - group: chaos-mesh.org - names: - kind: StressChaos - listKind: StressChaosList - plural: stresschaos - singular: stresschaos - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: StressChaos is the Schema for the stresschaos API - properties: - apiVersion: - description: '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' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client + volumes: + description: Volumes is a list of volumes that can be + mounted by containers in a template. + items: + description: Volume represents a named volume in a + pod that may be accessed by any container in the + pod. + properties: + awsElasticBlockStore: + description: 'AWSElasticBlockStore represents + an AWS Disk resource that is attached to a kubelet''s + host machine and then exposed to the pod. More + info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + properties: + fsType: + description: 'Filesystem type of the volume + that you want to mount. Tip: Ensure that + the filesystem type is supported by the + host operating system. Examples: "ext4", + "xfs", "ntfs". Implicitly inferred to be + "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + TODO: how do we prevent errors in the filesystem + from compromising the machine' + type: string + partition: + description: 'The partition in the volume + that you want to mount. If omitted, the + default is to mount by volume name. Examples: + For volume /dev/sda1, you specify the partition + as "1". Similarly, the volume partition + for /dev/sda is "0" (or you can leave the + property empty).' + format: int32 + type: integer + readOnly: + description: 'Specify "true" to force and + set the ReadOnly property in VolumeMounts + to "true". If omitted, the default is "false". + More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: boolean + volumeID: + description: 'Unique ID of the persistent + disk resource in AWS (Amazon EBS volume). + More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: string + required: + - volumeID + type: object + azureDisk: + description: AzureDisk represents an Azure Data + Disk mount on the host and bind mount to the + pod. + properties: + cachingMode: + description: 'Host Caching mode: None, Read + Only, Read Write.' + type: string + diskName: + description: The Name of the data disk in + the blob storage + type: string + diskURI: + description: The URI the data disk in the + blob storage + type: string + fsType: + description: Filesystem type to mount. Must + be a filesystem type supported by the host + operating system. Ex. "ext4", "xfs", "ntfs". + Implicitly inferred to be "ext4" if unspecified. + type: string + kind: + description: 'Expected values Shared: multiple + blob disks per storage account Dedicated: + single blob disk per storage account Managed: + azure managed data disk (only in managed + availability set). defaults to shared' + type: string + readOnly: + description: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting + in VolumeMounts. + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + description: AzureFile represents an Azure File + Service mount on the host and bind mount to + the pod. + properties: + readOnly: + description: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting + in VolumeMounts. + type: boolean + secretName: + description: the name of secret that contains + Azure Storage Account Name and Key + type: string + shareName: + description: Share Name + type: string + required: + - secretName + - shareName + type: object + cephfs: + description: CephFS represents a Ceph FS mount + on the host that shares a pod's lifetime + properties: + monitors: + description: 'Required: Monitors is a collection + of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + items: + type: string + type: array + path: + description: 'Optional: Used as the mounted + root, rather than the full Ceph tree, default + is /' + type: string + readOnly: + description: 'Optional: Defaults to false + (read/write). ReadOnly here will force the + ReadOnly setting in VolumeMounts. More info: + https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: boolean + secretFile: + description: 'Optional: SecretFile is the + path to key ring for User, default is /etc/ceph/user.secret + More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + secretRef: + description: 'Optional: SecretRef is reference + to the authentication secret for User, default + is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + user: + description: 'Optional: User is the rados + user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + required: + - monitors + type: object + cinder: + description: 'Cinder represents a cinder volume + attached and mounted on kubelets host machine. + More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + properties: + fsType: + description: 'Filesystem type to mount. Must + be a filesystem type supported by the host + operating system. Examples: "ext4", "xfs", + "ntfs". Implicitly inferred to be "ext4" + if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + readOnly: + description: 'Optional: Defaults to false + (read/write). ReadOnly here will force the + ReadOnly setting in VolumeMounts. More info: + https://examples.k8s.io/mysql-cinder-pd/README.md' + type: boolean + secretRef: + description: 'Optional: points to a secret + object containing parameters used to connect + to OpenStack.' + properties: + name: + description: 'Name of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + volumeID: + description: 'volume id used to identify the + volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + required: + - volumeID + type: object + configMap: + description: ConfigMap represents a configMap + that should populate this volume + properties: + defaultMode: + description: 'Optional: mode bits to use on + created files by default. Must be a value + between 0 and 0777. Defaults to 0644. Directories + within the path are not affected by this + setting. This might be in conflict with + other options that affect the file mode, + like fsGroup, and the result can be other + mode bits set.' + format: int32 + type: integer + items: + description: If unspecified, each key-value + pair in the Data field of the referenced + ConfigMap will be projected into the volume + as a file whose name is the key and content + is the value. If specified, the listed keys + will be projected into the specified paths, + and unlisted keys will not be present. If + a key is specified which is not present + in the ConfigMap, the volume setup will + error unless it is marked optional. Paths + must be relative and may not contain the + '..' path or start with '..'. + items: + description: Maps a string key to a path + within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to + use on this file, must be a value + between 0 and 0777. If not specified, + the volume defaultMode will be used. + This might be in conflict with other + options that affect the file mode, + like fsGroup, and the result can be + other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the + file to map the key to. May not be + an absolute path. May not contain + the path element '..'. May not start + with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap + or its keys must be defined + type: boolean + type: object + csi: + description: CSI (Container Storage Interface) + represents storage that is handled by an external + CSI driver (Alpha feature). + properties: + driver: + description: Driver is the name of the CSI + driver that handles this volume. Consult + with your admin for the correct name as + registered in the cluster. + type: string + fsType: + description: Filesystem type to mount. Ex. + "ext4", "xfs", "ntfs". If not provided, + the empty value is passed to the associated + CSI driver which will determine the default + filesystem to apply. + type: string + nodePublishSecretRef: + description: NodePublishSecretRef is a reference + to the secret object containing sensitive + information to pass to the CSI driver to + complete the CSI NodePublishVolume and NodeUnpublishVolume + calls. This field is optional, and may + be empty if no secret is required. If the + secret object contains more than one secret, + all secret references are passed. + properties: + name: + description: 'Name of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + readOnly: + description: Specifies a read-only configuration + for the volume. Defaults to false (read/write). + type: boolean + volumeAttributes: + additionalProperties: + type: string + description: VolumeAttributes stores driver-specific + properties that are passed to the CSI driver. + Consult your driver's documentation for + supported values. + type: object + required: + - driver + type: object + downwardAPI: + description: DownwardAPI represents downward API + about the pod that should populate this volume + properties: + defaultMode: + description: 'Optional: mode bits to use on + created files by default. Must be a value + between 0 and 0777. Defaults to 0644. Directories + within the path are not affected by this + setting. This might be in conflict with + other options that affect the file mode, + like fsGroup, and the result can be other + mode bits set.' + format: int32 + type: integer + items: + description: Items is a list of downward API + volume file + items: + description: DownwardAPIVolumeFile represents + information to create the file containing + the pod field + properties: + fieldRef: + description: 'Required: Selects a field + of the pod: only annotations, labels, + name and namespace are supported.' + properties: + apiVersion: + description: Version of the schema + the FieldPath is written in terms + of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to + select in the specified API version. + type: string + required: + - fieldPath + type: object + mode: + description: 'Optional: mode bits to + use on this file, must be a value + between 0 and 0777. If not specified, + the volume defaultMode will be used. + This might be in conflict with other + options that affect the file mode, + like fsGroup, and the result can be + other mode bits set.' + format: int32 + type: integer + path: + description: 'Required: Path is the + relative path name of the file to + be created. Must not be absolute or + contain the ''..'' path. Must be utf-8 + encoded. The first item of the relative + path must not start with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of + the container: only resources limits + and requests (limits.cpu, limits.memory, + requests.cpu and requests.memory) + are currently supported.' + properties: + containerName: + description: 'Container name: required + for volumes, optional for env + vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output + format of the exposed resources, + defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource + to select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + emptyDir: + description: 'EmptyDir represents a temporary + directory that shares a pod''s lifetime. More + info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + properties: + medium: + description: 'What type of storage medium + should back this directory. The default + is "" which means to use the node''s default + medium. Must be an empty string (default) + or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + description: 'Total amount of local storage + required for this EmptyDir volume. The size + limit is also applicable for memory medium. + The maximum usage on memory medium EmptyDir + would be the minimum value between the SizeLimit + specified here and the sum of memory limits + of all containers in a pod. The default + is nil which means that the limit is undefined. + More info: http://kubernetes.io/docs/user-guide/volumes#emptydir' + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + fc: + description: FC represents a Fibre Channel resource + that is attached to a kubelet's host machine + and then exposed to the pod. + properties: + fsType: + description: 'Filesystem type to mount. Must + be a filesystem type supported by the host + operating system. Ex. "ext4", "xfs", "ntfs". + Implicitly inferred to be "ext4" if unspecified. + TODO: how do we prevent errors in the filesystem + from compromising the machine' + type: string + lun: + description: 'Optional: FC target lun number' + format: int32 + type: integer + readOnly: + description: 'Optional: Defaults to false + (read/write). ReadOnly here will force the + ReadOnly setting in VolumeMounts.' + type: boolean + targetWWNs: + description: 'Optional: FC target worldwide + names (WWNs)' + items: + type: string + type: array + wwids: + description: 'Optional: FC volume world wide + identifiers (wwids) Either wwids or combination + of targetWWNs and lun must be set, but not + both simultaneously.' + items: + type: string + type: array + type: object + flexVolume: + description: FlexVolume represents a generic volume + resource that is provisioned/attached using + an exec based plugin. + properties: + driver: + description: Driver is the name of the driver + to use for this volume. + type: string + fsType: + description: Filesystem type to mount. Must + be a filesystem type supported by the host + operating system. Ex. "ext4", "xfs", "ntfs". + The default filesystem depends on FlexVolume + script. + type: string + options: + additionalProperties: + type: string + description: 'Optional: Extra command options + if any.' + type: object + readOnly: + description: 'Optional: Defaults to false + (read/write). ReadOnly here will force the + ReadOnly setting in VolumeMounts.' + type: boolean + secretRef: + description: 'Optional: SecretRef is reference + to the secret object containing sensitive + information to pass to the plugin scripts. + This may be empty if no secret object is + specified. If the secret object contains + more than one secret, all secrets are passed + to the plugin scripts.' + properties: + name: + description: 'Name of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + required: + - driver + type: object + flocker: + description: Flocker represents a Flocker volume + attached to a kubelet's host machine. This depends + on the Flocker control service being running + properties: + datasetName: + description: Name of the dataset stored as + metadata -> name on the dataset for Flocker + should be considered as deprecated + type: string + datasetUUID: + description: UUID of the dataset. This is + unique identifier of a Flocker dataset + type: string + type: object + gcePersistentDisk: + description: 'GCEPersistentDisk represents a GCE + Disk resource that is attached to a kubelet''s + host machine and then exposed to the pod. More + info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + properties: + fsType: + description: 'Filesystem type of the volume + that you want to mount. Tip: Ensure that + the filesystem type is supported by the + host operating system. Examples: "ext4", + "xfs", "ntfs". Implicitly inferred to be + "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + TODO: how do we prevent errors in the filesystem + from compromising the machine' + type: string + partition: + description: 'The partition in the volume + that you want to mount. If omitted, the + default is to mount by volume name. Examples: + For volume /dev/sda1, you specify the partition + as "1". Similarly, the volume partition + for /dev/sda is "0" (or you can leave the + property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + format: int32 + type: integer + pdName: + description: 'Unique name of the PD resource + in GCE. Used to identify the disk in GCE. + More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: string + readOnly: + description: 'ReadOnly here will force the + ReadOnly setting in VolumeMounts. Defaults + to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: boolean + required: + - pdName + type: object + gitRepo: + description: 'GitRepo represents a git repository + at a particular revision. DEPRECATED: GitRepo + is deprecated. To provision a container with + a git repo, mount an EmptyDir into an InitContainer + that clones the repo using git, then mount the + EmptyDir into the Pod''s container.' + properties: + directory: + description: Target directory name. Must not + contain or start with '..'. If '.' is supplied, + the volume directory will be the git repository. Otherwise, + if specified, the volume will contain the + git repository in the subdirectory with + the given name. + type: string + repository: + description: Repository URL + type: string + revision: + description: Commit hash for the specified + revision. + type: string + required: + - repository + type: object + glusterfs: + description: 'Glusterfs represents a Glusterfs + mount on the host that shares a pod''s lifetime. + More info: https://examples.k8s.io/volumes/glusterfs/README.md' + properties: + endpoints: + description: 'EndpointsName is the endpoint + name that details Glusterfs topology. More + info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + path: + description: 'Path is the Glusterfs volume + path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + readOnly: + description: 'ReadOnly here will force the + Glusterfs volume to be mounted with read-only + permissions. Defaults to false. More info: + https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: boolean + required: + - endpoints + - path + type: object + hostPath: + description: 'HostPath represents a pre-existing + file or directory on the host machine that is + directly exposed to the container. This is generally + used for system agents or other privileged things + that are allowed to see the host machine. Most + containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath + --- TODO(jonesdl) We need to restrict who can + use host directory mounts and who can/can not + mount host directories as read/write.' + properties: + path: + description: 'Path of the directory on the + host. If the path is a symlink, it will + follow the link to the real path. More info: + https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + type: + description: 'Type for HostPath Volume Defaults + to "" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + required: + - path + type: object + iscsi: + description: 'ISCSI represents an ISCSI Disk resource + that is attached to a kubelet''s host machine + and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' + properties: + chapAuthDiscovery: + description: whether support iSCSI Discovery + CHAP authentication + type: boolean + chapAuthSession: + description: whether support iSCSI Session + CHAP authentication + type: boolean + fsType: + description: 'Filesystem type of the volume + that you want to mount. Tip: Ensure that + the filesystem type is supported by the + host operating system. Examples: "ext4", + "xfs", "ntfs". Implicitly inferred to be + "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi + TODO: how do we prevent errors in the filesystem + from compromising the machine' + type: string + initiatorName: + description: Custom iSCSI Initiator Name. + If initiatorName is specified with iscsiInterface + simultaneously, new iSCSI interface : will be created for + the connection. + type: string + iqn: + description: Target iSCSI Qualified Name. + type: string + iscsiInterface: + description: iSCSI Interface Name that uses + an iSCSI transport. Defaults to 'default' + (tcp). + type: string + lun: + description: iSCSI Target Lun number. + format: int32 + type: integer + portals: + description: iSCSI Target Portal List. The + portal is either an IP or ip_addr:port if + the port is other than default (typically + TCP ports 860 and 3260). + items: + type: string + type: array + readOnly: + description: ReadOnly here will force the + ReadOnly setting in VolumeMounts. Defaults + to false. + type: boolean + secretRef: + description: CHAP Secret for iSCSI target + and initiator authentication + properties: + name: + description: 'Name of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + targetPortal: + description: iSCSI Target Portal. The Portal + is either an IP or ip_addr:port if the port + is other than default (typically TCP ports + 860 and 3260). + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + description: 'Volume''s name. Must be a DNS_LABEL + and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + nfs: + description: 'NFS represents an NFS mount on the + host that shares a pod''s lifetime More info: + https://kubernetes.io/docs/concepts/storage/volumes#nfs' + properties: + path: + description: 'Path that is exported by the + NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + readOnly: + description: 'ReadOnly here will force the + NFS export to be mounted with read-only + permissions. Defaults to false. More info: + https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: boolean + server: + description: 'Server is the hostname or IP + address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + description: 'PersistentVolumeClaimVolumeSource + represents a reference to a PersistentVolumeClaim + in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + properties: + claimName: + description: 'ClaimName is the name of a PersistentVolumeClaim + in the same namespace as the pod using this + volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + type: string + readOnly: + description: Will force the ReadOnly setting + in VolumeMounts. Default false. + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + description: PhotonPersistentDisk represents a + PhotonController persistent disk attached and + mounted on kubelets host machine + properties: + fsType: + description: Filesystem type to mount. Must + be a filesystem type supported by the host + operating system. Ex. "ext4", "xfs", "ntfs". + Implicitly inferred to be "ext4" if unspecified. + type: string + pdID: + description: ID that identifies Photon Controller + persistent disk + type: string + required: + - pdID + type: object + portworxVolume: + description: PortworxVolume represents a portworx + volume attached and mounted on kubelets host + machine + properties: + fsType: + description: FSType represents the filesystem + type to mount Must be a filesystem type + supported by the host operating system. + Ex. "ext4", "xfs". Implicitly inferred to + be "ext4" if unspecified. + type: string + readOnly: + description: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting + in VolumeMounts. + type: boolean + volumeID: + description: VolumeID uniquely identifies + a Portworx volume + type: string + required: + - volumeID + type: object + projected: + description: Items for all in one resources secrets, + configmaps, and downward API + properties: + defaultMode: + description: Mode bits to use on created files + by default. Must be a value between 0 and + 0777. Directories within the path are not + affected by this setting. This might be + in conflict with other options that affect + the file mode, like fsGroup, and the result + can be other mode bits set. + format: int32 + type: integer + sources: + description: list of volume projections + items: + description: Projection that may be projected + along with other supported volume types + properties: + configMap: + description: information about the configMap + data to project + properties: + items: + description: If unspecified, each + key-value pair in the Data field + of the referenced ConfigMap will + be projected into the volume as + a file whose name is the key and + content is the value. If specified, + the listed keys will be projected + into the specified paths, and + unlisted keys will not be present. + If a key is specified which is + not present in the ConfigMap, + the volume setup will error unless + it is marked optional. Paths must + be relative and may not contain + the '..' path or start with '..'. + items: + description: Maps a string key + to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode + bits to use on this file, + must be a value between + 0 and 0777. If not specified, + the volume defaultMode will + be used. This might be in + conflict with other options + that affect the file mode, + like fsGroup, and the result + can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative + path of the file to map + the key to. May not be an + absolute path. May not contain + the path element '..'. May + not start with the string + '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. + apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the + ConfigMap or its keys must be + defined + type: boolean + type: object + downwardAPI: + description: information about the downwardAPI + data to project + properties: + items: + description: Items is a list of + DownwardAPIVolume file + items: + description: DownwardAPIVolumeFile + represents information to create + the file containing the pod + field + properties: + fieldRef: + description: 'Required: Selects + a field of the pod: only + annotations, labels, name + and namespace are supported.' + properties: + apiVersion: + description: Version of + the schema the FieldPath + is written in terms + of, defaults to "v1". + type: string + fieldPath: + description: Path of the + field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + mode: + description: 'Optional: mode + bits to use on this file, + must be a value between + 0 and 0777. If not specified, + the volume defaultMode will + be used. This might be in + conflict with other options + that affect the file mode, + like fsGroup, and the result + can be other mode bits set.' + format: int32 + type: integer + path: + description: 'Required: Path + is the relative path name + of the file to be created. + Must not be absolute or + contain the ''..'' path. + Must be utf-8 encoded. The + first item of the relative + path must not start with + ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource + of the container: only resources + limits and requests (limits.cpu, + limits.memory, requests.cpu + and requests.memory) are + currently supported.' + properties: + containerName: + description: 'Container + name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies + the output format of + the exposed resources, + defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: + resource to select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + secret: + description: information about the secret + data to project + properties: + items: + description: If unspecified, each + key-value pair in the Data field + of the referenced Secret will + be projected into the volume as + a file whose name is the key and + content is the value. If specified, + the listed keys will be projected + into the specified paths, and + unlisted keys will not be present. + If a key is specified which is + not present in the Secret, the + volume setup will error unless + it is marked optional. Paths must + be relative and may not contain + the '..' path or start with '..'. + items: + description: Maps a string key + to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode + bits to use on this file, + must be a value between + 0 and 0777. If not specified, + the volume defaultMode will + be used. This might be in + conflict with other options + that affect the file mode, + like fsGroup, and the result + can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative + path of the file to map + the key to. May not be an + absolute path. May not contain + the path element '..'. May + not start with the string + '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. + apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the + Secret or its key must be defined + type: boolean + type: object + serviceAccountToken: + description: information about the serviceAccountToken + data to project + properties: + audience: + description: Audience is the intended + audience of the token. A recipient + of a token must identify itself + with an identifier specified in + the audience of the token, and + otherwise should reject the token. + The audience defaults to the identifier + of the apiserver. + type: string + expirationSeconds: + description: ExpirationSeconds is + the requested duration of validity + of the service account token. + As the token approaches expiration, + the kubelet volume plugin will + proactively rotate the service + account token. The kubelet will + start trying to rotate the token + if the token is older than 80 + percent of its time to live or + if the token is older than 24 + hours.Defaults to 1 hour and must + be at least 10 minutes. + format: int64 + type: integer + path: + description: Path is the path relative + to the mount point of the file + to project the token into. + type: string + required: + - path + type: object + type: object + type: array + required: + - sources + type: object + quobyte: + description: Quobyte represents a Quobyte mount + on the host that shares a pod's lifetime + properties: + group: + description: Group to map volume access to + Default is no group + type: string + readOnly: + description: ReadOnly here will force the + Quobyte volume to be mounted with read-only + permissions. Defaults to false. + type: boolean + registry: + description: Registry represents a single + or multiple Quobyte Registry services specified + as a string as host:port pair (multiple + entries are separated with commas) which + acts as the central registry for volumes + type: string + tenant: + description: Tenant owning the given Quobyte + volume in the Backend Used with dynamically + provisioned Quobyte volumes, value is set + by the plugin + type: string + user: + description: User to map volume access to + Defaults to serivceaccount user + type: string + volume: + description: Volume is a string that references + an already created Quobyte volume by name. + type: string + required: + - registry + - volume + type: object + rbd: + description: 'RBD represents a Rados Block Device + mount on the host that shares a pod''s lifetime. + More info: https://examples.k8s.io/volumes/rbd/README.md' + properties: + fsType: + description: 'Filesystem type of the volume + that you want to mount. Tip: Ensure that + the filesystem type is supported by the + host operating system. Examples: "ext4", + "xfs", "ntfs". Implicitly inferred to be + "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd + TODO: how do we prevent errors in the filesystem + from compromising the machine' + type: string + image: + description: 'The rados image name. More info: + https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + keyring: + description: 'Keyring is the path to key ring + for RBDUser. Default is /etc/ceph/keyring. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + monitors: + description: 'A collection of Ceph monitors. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + items: + type: string + type: array + pool: + description: 'The rados pool name. Default + is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + readOnly: + description: 'ReadOnly here will force the + ReadOnly setting in VolumeMounts. Defaults + to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: boolean + secretRef: + description: 'SecretRef is name of the authentication + secret for RBDUser. If provided overrides + keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + user: + description: 'The rados user name. Default + is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + required: + - image + - monitors + type: object + scaleIO: + description: ScaleIO represents a ScaleIO persistent + volume attached and mounted on Kubernetes nodes. + properties: + fsType: + description: Filesystem type to mount. Must + be a filesystem type supported by the host + operating system. Ex. "ext4", "xfs", "ntfs". + Default is "xfs". + type: string + gateway: + description: The host address of the ScaleIO + API Gateway. + type: string + protectionDomain: + description: The name of the ScaleIO Protection + Domain for the configured storage. + type: string + readOnly: + description: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting + in VolumeMounts. + type: boolean + secretRef: + description: SecretRef references to the secret + for ScaleIO user and other sensitive information. + If this is not provided, Login operation + will fail. + properties: + name: + description: 'Name of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + sslEnabled: + description: Flag to enable/disable SSL communication + with Gateway, default false + type: boolean + storageMode: + description: Indicates whether the storage + for a volume should be ThickProvisioned + or ThinProvisioned. Default is ThinProvisioned. + type: string + storagePool: + description: The ScaleIO Storage Pool associated + with the protection domain. + type: string + system: + description: The name of the storage system + as configured in ScaleIO. + type: string + volumeName: + description: The name of a volume already + created in the ScaleIO system that is associated + with this volume source. + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + description: 'Secret represents a secret that + should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + properties: + defaultMode: + description: 'Optional: mode bits to use on + created files by default. Must be a value + between 0 and 0777. Defaults to 0644. Directories + within the path are not affected by this + setting. This might be in conflict with + other options that affect the file mode, + like fsGroup, and the result can be other + mode bits set.' + format: int32 + type: integer + items: + description: If unspecified, each key-value + pair in the Data field of the referenced + Secret will be projected into the volume + as a file whose name is the key and content + is the value. If specified, the listed keys + will be projected into the specified paths, + and unlisted keys will not be present. If + a key is specified which is not present + in the Secret, the volume setup will error + unless it is marked optional. Paths must + be relative and may not contain the '..' + path or start with '..'. + items: + description: Maps a string key to a path + within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to + use on this file, must be a value + between 0 and 0777. If not specified, + the volume defaultMode will be used. + This might be in conflict with other + options that affect the file mode, + like fsGroup, and the result can be + other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the + file to map the key to. May not be + an absolute path. May not contain + the path element '..'. May not start + with the string '..'. + type: string + required: + - key + - path + type: object + type: array + optional: + description: Specify whether the Secret or + its keys must be defined + type: boolean + secretName: + description: 'Name of the secret in the pod''s + namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + type: string + type: object + storageos: + description: StorageOS represents a StorageOS + volume attached and mounted on Kubernetes nodes. + properties: + fsType: + description: Filesystem type to mount. Must + be a filesystem type supported by the host + operating system. Ex. "ext4", "xfs", "ntfs". + Implicitly inferred to be "ext4" if unspecified. + type: string + readOnly: + description: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting + in VolumeMounts. + type: boolean + secretRef: + description: SecretRef specifies the secret + to use for obtaining the StorageOS API credentials. If + not specified, default values will be attempted. + properties: + name: + description: 'Name of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + volumeName: + description: VolumeName is the human-readable + name of the StorageOS volume. Volume names + are only unique within a namespace. + type: string + volumeNamespace: + description: VolumeNamespace specifies the + scope of the volume within StorageOS. If + no namespace is specified then the Pod's + namespace will be used. This allows the + Kubernetes name scoping to be mirrored within + StorageOS for tighter integration. Set VolumeName + to any name to override the default behaviour. + Set to "default" if you are not using namespaces + within StorageOS. Namespaces that do not + pre-exist within StorageOS will be created. + type: string + type: object + vsphereVolume: + description: VsphereVolume represents a vSphere + volume attached and mounted on kubelets host + machine + properties: + fsType: + description: Filesystem type to mount. Must + be a filesystem type supported by the host + operating system. Ex. "ext4", "xfs", "ntfs". + Implicitly inferred to be "ext4" if unspecified. + type: string + storagePolicyID: + description: Storage Policy Based Management + (SPBM) profile ID associated with the StoragePolicyName. + type: string + storagePolicyName: + description: Storage Policy Based Management + (SPBM) profile name. + type: string + volumePath: + description: Path that identifies vSphere + volume vmdk + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + type: object + tasks: + description: Tasks describes the children steps of serial + or parallel node. Only used when Type is TypeSerial or + TypeParallel. + items: + type: string + type: array + templateType: + type: string + timeChaos: + description: TimeChaosSpec defines the desired state of + TimeChaos + properties: + clockIds: + description: ClockIds defines all affected clock id + All available options are ["CLOCK_REALTIME","CLOCK_MONOTONIC","CLOCK_PROCESS_CPUTIME_ID","CLOCK_THREAD_CPUTIME_ID", + "CLOCK_MONOTONIC_RAW","CLOCK_REALTIME_COARSE","CLOCK_MONOTONIC_COARSE","CLOCK_BOOTTIME","CLOCK_REALTIME_ALARM", + "CLOCK_BOOTTIME_ALARM"] Default value is ["CLOCK_REALTIME"] + items: + type: string + type: array + containerNames: + description: ContainerNames indicates list of the name + of affected container. If not set, all containers + will be injected + items: + type: string + type: array + duration: + description: Duration represents the duration of the + chaos action + type: string + mode: + description: 'Mode defines the mode to run chaos action. + Supported mode: one / all / fixed / fixed-percent + / random-max-percent' + enum: + - one + - all + - fixed + - fixed-percent + - random-max-percent + type: string + selector: + description: Selector is used to select pods that are + used to inject chaos action. + properties: + annotationSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select objects. A selector based + on annotations. + type: object + expressionSelectors: + description: a slice of label selector expressions + that can be used to select objects. A list of + selectors based on set-based label expressions. + items: + description: A label selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If the + operator is Exists or DoesNotExist, the + values array must be empty. This array is + replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + fieldSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select objects. A selector based + on fields. + type: object + labelSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select objects. A selector based + on labels. + type: object + namespaces: + description: Namespaces is a set of namespace to + which objects belong. + items: + type: string + type: array + nodeSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select nodes. Selector which must + match a node's labels, and objects must belong + to these selected nodes. + type: object + nodes: + description: Nodes is a set of node name and objects + must belong to these nodes. + items: + type: string + type: array + podPhaseSelectors: + description: 'PodPhaseSelectors is a set of condition + of a pod at the current time. supported value: + Pending / Running / Succeeded / Failed / Unknown' + items: + type: string + type: array + pods: + additionalProperties: + items: + type: string + type: array + description: Pods is a map of string keys and a + set values that used to select pods. The key defines + the namespace which pods belong, and the each + values is a set of pod names. + type: object + type: object + timeOffset: + description: TimeOffset defines the delta time of injected + program. It's a possibly signed sequence of decimal + numbers, such as "300ms", "-1.5h" or "2h45m". Valid + time units are "ns", "us" (or "µs"), "ms", "s", "m", + "h". + type: string + value: + description: Value is required when the mode is set + to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. + If `FixedPodMode`, provide an integer of pods to do + chaos action. If `FixedPercentPodMod`, provide a number + from 0-100 to specify the percent of pods the server + can do chaos action. IF `RandomMaxPercentPodMod`, provide + a number from 0-100 to specify the max percent of + pods to do chaos action + type: string + required: + - mode + - selector + - timeOffset + type: object + required: + - name + - templateType + type: object + type: array + required: + - entry + - templates + type: object + required: + - schedule + - type + type: object + status: + description: ScheduleStatus is the status of a schedule object + properties: + active: + items: + description: ObjectReference contains enough information to let + you inspect or modify the referred object. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead of + an entire object, this string should contain a valid JSON/Go + field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within + a pod, this would take on a value like: "spec.containers{name}" + (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" + (container with index 2 in this pod). This syntax is chosen + only to have some well-defined way of referencing a part of + an object. TODO: this design is not final and this field is + subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference + is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + type: array + time: + format: date-time + nullable: true + type: string + type: object + required: + - spec + type: object + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.4.1 + creationTimestamp: null + name: stresschaos.chaos-mesh.org +spec: + group: chaos-mesh.org + names: + kind: StressChaos + listKind: StressChaosList + plural: stresschaos + singular: stresschaos + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: StressChaos is the Schema for the stresschaos API + properties: + apiVersion: + description: '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' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string metadata: @@ -9965,6 +12561,17 @@ spec: - awsRegion - ec2Instance type: object + conditionalTasks: + items: + properties: + expression: + type: string + task: + type: string + required: + - task + type: object + type: array deadline: format: date-time type: string @@ -11992,12 +14599,273 @@ spec: names. type: object type: object - target: - description: Target is the object to be selected and injected. - enum: - - Request - - Response - type: string + target: + description: Target is the object to be selected and injected. + enum: + - Request + - Response + type: string + value: + description: Value is required when the mode is set to `FixedPodMode` + / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. If `FixedPodMode`, + provide an integer of pods to do chaos action. If `FixedPercentPodMod`, + provide a number from 0-100 to specify the percent of pods + the server can do chaos action. IF `RandomMaxPercentPodMod`, provide + a number from 0-100 to specify the max percent of pods to + do chaos action + type: string + required: + - mode + - selector + - target + type: object + ioChaos: + description: IOChaosSpec defines the desired state of IOChaos + properties: + action: + description: 'Action defines the specific pod chaos action. + Supported action: latency / fault / attrOverride / mistake' + enum: + - latency + - fault + - attrOverride + - mistake + type: string + attr: + description: Attr defines the overrided attribution + properties: + atime: + description: Timespec represents a time + properties: + nsec: + format: int64 + type: integer + sec: + format: int64 + type: integer + required: + - nsec + - sec + type: object + blocks: + format: int64 + type: integer + ctime: + description: Timespec represents a time + properties: + nsec: + format: int64 + type: integer + sec: + format: int64 + type: integer + required: + - nsec + - sec + type: object + gid: + format: int32 + type: integer + ino: + format: int64 + type: integer + kind: + description: FileType represents type of a file + type: string + mtime: + description: Timespec represents a time + properties: + nsec: + format: int64 + type: integer + sec: + format: int64 + type: integer + required: + - nsec + - sec + type: object + nlink: + format: int32 + type: integer + perm: + type: integer + rdev: + format: int32 + type: integer + size: + format: int64 + type: integer + uid: + format: int32 + type: integer + type: object + containerNames: + description: ContainerNames indicates list of the name of + affected container. If not set, all containers will be injected + items: + type: string + type: array + delay: + description: Delay defines the value of I/O chaos action delay. + A delay string is a possibly signed sequence of decimal + numbers, each with optional fraction and a unit suffix, + such as "300ms". Valid time units are "ns", "us" (or "µs"), + "ms", "s", "m", "h". + type: string + duration: + description: Duration represents the duration of the chaos + action. It is required when the action is `PodFailureAction`. + A duration string is a possibly signed sequence of decimal + numbers, each with optional fraction and a unit suffix, + such as "300ms", "-1.5h" or "2h45m". Valid time units are + "ns", "us" (or "µs"), "ms", "s", "m", "h". + type: string + errno: + description: 'Errno defines the error code that returned by + I/O action. refer to: https://www-numi.fnal.gov/offline_software/srt_public_context/WebDocs/Errors/unix_system_errors.html' + format: int32 + type: integer + methods: + description: 'Methods defines the I/O methods for injecting + I/O chaos action. default: all I/O methods.' + items: + type: string + type: array + mistake: + description: Mistake defines what types of incorrectness are + injected to IO operations + properties: + filling: + description: Filling determines what is filled in the + miskate data. + enum: + - zero + - random + type: string + maxLength: + description: Max length of each wrong data segment in + bytes + format: int64 + minimum: 1 + type: integer + maxOccurrences: + description: There will be [1, MaxOccurrences] segments + of wrong data. + format: int64 + minimum: 1 + type: integer + type: object + mode: + description: 'Mode defines the mode to run chaos action. Supported + mode: one / all / fixed / fixed-percent / random-max-percent' + enum: + - one + - all + - fixed + - fixed-percent + - random-max-percent + type: string + path: + description: Path defines the path of files for injecting + I/O chaos action. + type: string + percent: + description: 'Percent defines the percentage of injection + errors and provides a number from 0-100. default: 100.' + type: integer + selector: + description: Selector is used to select pods that are used + to inject chaos action. + properties: + annotationSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can be + used to select objects. A selector based on annotations. + type: object + expressionSelectors: + description: a slice of label selector expressions that + can be used to select objects. A list of selectors based + on set-based label expressions. + items: + description: A label selector requirement is a selector + that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label key that the selector + applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. + If the operator is In or NotIn, the values array + must be non-empty. If the operator is Exists or + DoesNotExist, the values array must be empty. + This array is replaced during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + fieldSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can be + used to select objects. A selector based on fields. + type: object + labelSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can be + used to select objects. A selector based on labels. + type: object + namespaces: + description: Namespaces is a set of namespace to which + objects belong. + items: + type: string + type: array + nodeSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can be + used to select nodes. Selector which must match a node's + labels, and objects must belong to these selected nodes. + type: object + nodes: + description: Nodes is a set of node name and objects must + belong to these nodes. + items: + type: string + type: array + podPhaseSelectors: + description: 'PodPhaseSelectors is a set of condition + of a pod at the current time. supported value: Pending + / Running / Succeeded / Failed / Unknown' + items: + type: string + type: array + pods: + additionalProperties: + items: + type: string + type: array + description: Pods is a map of string keys and a set values + that used to select pods. The key defines the namespace + which pods belong, and the each values is a set of pod + names. + type: object + type: object value: description: Value is required when the mode is set to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. If `FixedPodMode`, @@ -12007,147 +14875,269 @@ spec: a number from 0-100 to specify the max percent of pods to do chaos action type: string + volumePath: + description: VolumePath represents the mount path of injected + volume + type: string required: + - action - mode - selector - - target + - volumePath type: object - ioChaos: - description: IOChaosSpec defines the desired state of IOChaos + jvmChaos: + description: JVMChaosSpec defines the desired state of JVMChaos properties: action: - description: 'Action defines the specific pod chaos action. - Supported action: latency / fault / attrOverride / mistake' + description: 'Action defines the specific jvm chaos action. + Supported action: delay;return;script;cfl;oom;ccf;tce;cpf;tde;tpf' enum: - - latency - - fault - - attrOverride - - mistake + - delay + - return + - script + - cfl + - oom + - ccf + - tce + - cpf + - tde + - tpf type: string - attr: - description: Attr defines the overrided attribution + containerNames: + description: ContainerNames indicates list of the name of + affected container. If not set, all containers will be injected + items: + type: string + type: array + duration: + description: Duration represents the duration of the chaos + action + type: string + flags: + additionalProperties: + type: string + description: Flags represents the flags of action + type: object + matchers: + additionalProperties: + type: string + description: Matchers represents the matching rules for the + target + type: object + mode: + description: 'Mode defines the mode to run chaos action. Supported + mode: one / all / fixed / fixed-percent / random-max-percent' + enum: + - one + - all + - fixed + - fixed-percent + - random-max-percent + type: string + selector: + description: Selector is used to select pods that are used + to inject chaos action. properties: - atime: - description: Timespec represents a time - properties: - nsec: - format: int64 - type: integer - sec: - format: int64 - type: integer - required: - - nsec - - sec + annotationSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can be + used to select objects. A selector based on annotations. type: object - blocks: - format: int64 - type: integer - ctime: - description: Timespec represents a time - properties: - nsec: - format: int64 - type: integer - sec: - format: int64 - type: integer - required: - - nsec - - sec + expressionSelectors: + description: a slice of label selector expressions that + can be used to select objects. A list of selectors based + on set-based label expressions. + items: + description: A label selector requirement is a selector + that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label key that the selector + applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. + If the operator is In or NotIn, the values array + must be non-empty. If the operator is Exists or + DoesNotExist, the values array must be empty. + This array is replaced during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + fieldSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can be + used to select objects. A selector based on fields. type: object - gid: - format: int32 - type: integer - ino: - format: int64 - type: integer - kind: - description: FileType represents type of a file - type: string - mtime: - description: Timespec represents a time - properties: - nsec: - format: int64 - type: integer - sec: - format: int64 - type: integer - required: - - nsec - - sec + labelSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can be + used to select objects. A selector based on labels. + type: object + namespaces: + description: Namespaces is a set of namespace to which + objects belong. + items: + type: string + type: array + nodeSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can be + used to select nodes. Selector which must match a node's + labels, and objects must belong to these selected nodes. + type: object + nodes: + description: Nodes is a set of node name and objects must + belong to these nodes. + items: + type: string + type: array + podPhaseSelectors: + description: 'PodPhaseSelectors is a set of condition + of a pod at the current time. supported value: Pending + / Running / Succeeded / Failed / Unknown' + items: + type: string + type: array + pods: + additionalProperties: + items: + type: string + type: array + description: Pods is a map of string keys and a set values + that used to select pods. The key defines the namespace + which pods belong, and the each values is a set of pod + names. type: object - nlink: - format: int32 - type: integer - perm: - type: integer - rdev: - format: int32 - type: integer - size: - format: int64 - type: integer - uid: - format: int32 - type: integer type: object - containerNames: - description: ContainerNames indicates list of the name of - affected container. If not set, all containers will be injected - items: - type: string - type: array - delay: - description: Delay defines the value of I/O chaos action delay. - A delay string is a possibly signed sequence of decimal - numbers, each with optional fraction and a unit suffix, - such as "300ms". Valid time units are "ns", "us" (or "µs"), - "ms", "s", "m", "h". + target: + description: 'Target defines the specific jvm chaos target. + Supported target: servlet;psql;jvm;jedis;http;dubbo;rocketmq;tars;mysql;druid;redisson;rabbitmq;mongodb' + enum: + - servlet + - psql + - jvm + - jedis + - http + - dubbo + - rocketmq + - tars + - mysql + - druid + - redisson + - rabbitmq + - mongodb type: string + value: + description: Value is required when the mode is set to `FixedPodMode` + / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. If `FixedPodMode`, + provide an integer of pods to do chaos action. If `FixedPercentPodMod`, + provide a number from 0-100 to specify the percent of pods + the server can do chaos action. IF `RandomMaxPercentPodMod`, provide + a number from 0-100 to specify the max percent of pods to + do chaos action + type: string + required: + - action + - mode + - selector + - target + type: object + kernelChaos: + description: KernelChaosSpec defines the desired state of KernelChaos + properties: duration: description: Duration represents the duration of the chaos - action. It is required when the action is `PodFailureAction`. - A duration string is a possibly signed sequence of decimal - numbers, each with optional fraction and a unit suffix, - such as "300ms", "-1.5h" or "2h45m". Valid time units are - "ns", "us" (or "µs"), "ms", "s", "m", "h". + action type: string - errno: - description: 'Errno defines the error code that returned by - I/O action. refer to: https://www-numi.fnal.gov/offline_software/srt_public_context/WebDocs/Errors/unix_system_errors.html' - format: int32 - type: integer - methods: - description: 'Methods defines the I/O methods for injecting - I/O chaos action. default: all I/O methods.' - items: - type: string - type: array - mistake: - description: Mistake defines what types of incorrectness are - injected to IO operations + failKernRequest: + description: FailKernRequest defines the request of kernel + injection properties: - filling: - description: Filling determines what is filled in the - miskate data. - enum: - - zero - - random - type: string - maxLength: - description: Max length of each wrong data segment in - bytes - format: int64 - minimum: 1 + callchain: + description: 'Callchain indicate a special call chain, + such as: ext4_mount -> mount_subtree -> + ... -> should_failslab With an optional + set of predicates and an optional set of parameters, + which used with predicates. You can read call chan and + predicate examples from https://github.com/chaos-mesh/bpfki/tree/develop/examples + to learn more. If no special call chain, just keep Callchain + empty, which means it will fail at any call chain with + slab alloc (eg: kmalloc).' + items: + description: Frame defines the function signature and + predicate in function's body + properties: + funcname: + description: Funcname can be find from kernel source + or `/proc/kallsyms`, such as `ext4_mount` + type: string + parameters: + description: Parameters is used with predicate, + for example, if you want to inject slab error + in `d_alloc_parallel(struct dentry *parent, const + struct qstr *name)` with a special name `bananas`, + you need to set it to `struct dentry *parent, + const struct qstr *name` otherwise omit it. + type: string + predicate: + description: Predicate will access the arguments + of this Frame, example with Parameters's, you + can set it to `STRNCMP(name->name, "bananas", + 8)` to make inject only with it, or omit it to + inject for all d_alloc_parallel call chain. + type: string + type: object + type: array + failtype: + description: 'FailType indicates what to fail, can be + set to ''0'' / ''1'' / ''2'' If `0`, indicates slab + to fail (should_failslab) If `1`, indicates alloc_page + to fail (should_fail_alloc_page) If `2`, indicates bio + to fail (should_fail_bio) You can read: 1. https://www.kernel.org/doc/html/latest/fault-injection/fault-injection.html 2. + http://github.com/iovisor/bcc/blob/master/tools/inject_example.txt + to learn more' + format: int32 + maximum: 2 + minimum: 0 type: integer - maxOccurrences: - description: There will be [1, MaxOccurrences] segments - of wrong data. - format: int64 - minimum: 1 + headers: + description: 'Headers indicates the appropriate kernel + headers you need. Eg: "linux/mmzone.h", "linux/blkdev.h" + and so on' + items: + type: string + type: array + probability: + description: Probability indicates the fails with probability. + If you want 1%, please set this field with 1. + format: int32 + maximum: 100 + minimum: 0 + type: integer + times: + description: Times indicates the max times of fails. + format: int32 + minimum: 0 type: integer + required: + - failtype type: object mode: description: 'Mode defines the mode to run chaos action. Supported @@ -12159,14 +15149,6 @@ spec: - fixed-percent - random-max-percent type: string - path: - description: Path defines the path of files for injecting - I/O chaos action. - type: string - percent: - description: 'Percent defines the percentage of injection - errors and provides a number from 0-100. default: 100.' - type: integer selector: description: Selector is used to select pods that are used to inject chaos action. @@ -12268,54 +15250,148 @@ spec: a number from 0-100 to specify the max percent of pods to do chaos action type: string - volumePath: - description: VolumePath represents the mount path of injected - volume - type: string required: - - action + - failKernRequest - mode - selector - - volumePath type: object - jvmChaos: - description: JVMChaosSpec defines the desired state of JVMChaos + networkChaos: + description: NetworkChaosSpec defines the desired state of NetworkChaos properties: action: - description: 'Action defines the specific jvm chaos action. - Supported action: delay;return;script;cfl;oom;ccf;tce;cpf;tde;tpf' + description: 'Action defines the specific network chaos action. + Supported action: partition, netem, delay, loss, duplicate, + corrupt Default action: delay' + enum: + - netem + - delay + - loss + - duplicate + - corrupt + - partition + - bandwidth + type: string + bandwidth: + description: Bandwidth represents the detail about bandwidth + control action + properties: + buffer: + description: Buffer is the maximum amount of bytes that + tokens can be available for instantaneously. + format: int32 + minimum: 1 + type: integer + limit: + description: Limit is the number of bytes that can be + queued waiting for tokens to become available. + format: int32 + minimum: 1 + type: integer + minburst: + description: Minburst specifies the size of the peakrate + bucket. For perfect accuracy, should be set to the MTU + of the interface. If a peakrate is needed, but some + burstiness is acceptable, this size can be raised. A + 3000 byte minburst allows around 3mbit/s of peakrate, + given 1000 byte packets. + format: int32 + minimum: 0 + type: integer + peakrate: + description: Peakrate is the maximum depletion rate of + the bucket. The peakrate does not need to be set, it + is only necessary if perfect millisecond timescale shaping + is required. + format: int64 + minimum: 0 + type: integer + rate: + description: Rate is the speed knob. Allows bps, kbps, + mbps, gbps, tbps unit. bps means bytes per second. + type: string + required: + - buffer + - limit + - rate + type: object + corrupt: + description: Corrupt represents the detail about corrupt action + properties: + correlation: + type: string + corrupt: + type: string + required: + - correlation + - corrupt + type: object + delay: + description: Delay represents the detail about delay action + properties: + correlation: + type: string + jitter: + type: string + latency: + type: string + reorder: + description: ReorderSpec defines details of packet reorder. + properties: + correlation: + type: string + gap: + type: integer + reorder: + type: string + required: + - correlation + - gap + - reorder + type: object + required: + - latency + type: object + direction: + description: Direction represents the direction, this applies + on netem and network partition action enum: - - delay - - return - - script - - cfl - - oom - - ccf - - tce - - cpf - - tde - - tpf + - to + - from + - both + - "" type: string - containerNames: - description: ContainerNames indicates list of the name of - affected container. If not set, all containers will be injected - items: - type: string - type: array + duplicate: + description: DuplicateSpec represents the detail about loss + action + properties: + correlation: + type: string + duplicate: + type: string + required: + - correlation + - duplicate + type: object duration: description: Duration represents the duration of the chaos action type: string - flags: - additionalProperties: - type: string - description: Flags represents the flags of action - type: object - matchers: - additionalProperties: + externalTargets: + description: ExternalTargets represents network targets outside + k8s + items: type: string - description: Matchers represents the matching rules for the - target + type: array + loss: + description: Loss represents the detail about loss action + properties: + correlation: + type: string + loss: + type: string + required: + - correlation + - loss type: object mode: description: 'Mode defines the mode to run chaos action. Supported @@ -12420,118 +15496,176 @@ spec: type: object type: object target: - description: 'Target defines the specific jvm chaos target. - Supported target: servlet;psql;jvm;jedis;http;dubbo;rocketmq;tars;mysql;druid;redisson;rabbitmq;mongodb' - enum: - - servlet - - psql - - jvm - - jedis - - http - - dubbo - - rocketmq - - tars - - mysql - - druid - - redisson - - rabbitmq - - mongodb - type: string - value: - description: Value is required when the mode is set to `FixedPodMode` - / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. If `FixedPodMode`, - provide an integer of pods to do chaos action. If `FixedPercentPodMod`, - provide a number from 0-100 to specify the percent of pods - the server can do chaos action. IF `RandomMaxPercentPodMod`, provide - a number from 0-100 to specify the max percent of pods to - do chaos action - type: string - required: - - action - - mode - - selector - - target - type: object - kernelChaos: - description: KernelChaosSpec defines the desired state of KernelChaos - properties: - duration: - description: Duration represents the duration of the chaos - action - type: string - failKernRequest: - description: FailKernRequest defines the request of kernel - injection + description: Target represents network target, this applies + on netem and network partition action properties: - callchain: - description: 'Callchain indicate a special call chain, - such as: ext4_mount -> mount_subtree -> - ... -> should_failslab With an optional - set of predicates and an optional set of parameters, - which used with predicates. You can read call chan and - predicate examples from https://github.com/chaos-mesh/bpfki/tree/develop/examples - to learn more. If no special call chain, just keep Callchain - empty, which means it will fail at any call chain with - slab alloc (eg: kmalloc).' - items: - description: Frame defines the function signature and - predicate in function's body - properties: - funcname: - description: Funcname can be find from kernel source - or `/proc/kallsyms`, such as `ext4_mount` + mode: + description: 'Mode defines the mode to run chaos action. + Supported mode: one / all / fixed / fixed-percent / + random-max-percent' + enum: + - one + - all + - fixed + - fixed-percent + - random-max-percent + type: string + selector: + description: Selector is used to select pods that are + used to inject chaos action. + properties: + annotationSelectors: + additionalProperties: type: string - parameters: - description: Parameters is used with predicate, - for example, if you want to inject slab error - in `d_alloc_parallel(struct dentry *parent, const - struct qstr *name)` with a special name `bananas`, - you need to set it to `struct dentry *parent, - const struct qstr *name` otherwise omit it. + description: Map of string keys and values that can + be used to select objects. A selector based on annotations. + type: object + expressionSelectors: + description: a slice of label selector expressions + that can be used to select objects. A list of selectors + based on set-based label expressions. + items: + description: A label selector requirement is a selector + that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label key that the selector + applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are In, + NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. + If the operator is In or NotIn, the values + array must be non-empty. If the operator is + Exists or DoesNotExist, the values array must + be empty. This array is replaced during a + strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + fieldSelectors: + additionalProperties: type: string - predicate: - description: Predicate will access the arguments - of this Frame, example with Parameters's, you - can set it to `STRNCMP(name->name, "bananas", - 8)` to make inject only with it, or omit it to - inject for all d_alloc_parallel call chain. + description: Map of string keys and values that can + be used to select objects. A selector based on fields. + type: object + labelSelectors: + additionalProperties: type: string - type: object - type: array - failtype: - description: 'FailType indicates what to fail, can be - set to ''0'' / ''1'' / ''2'' If `0`, indicates slab - to fail (should_failslab) If `1`, indicates alloc_page - to fail (should_fail_alloc_page) If `2`, indicates bio - to fail (should_fail_bio) You can read: 1. https://www.kernel.org/doc/html/latest/fault-injection/fault-injection.html 2. - http://github.com/iovisor/bcc/blob/master/tools/inject_example.txt - to learn more' - format: int32 - maximum: 2 - minimum: 0 - type: integer - headers: - description: 'Headers indicates the appropriate kernel - headers you need. Eg: "linux/mmzone.h", "linux/blkdev.h" - and so on' - items: - type: string - type: array - probability: - description: Probability indicates the fails with probability. - If you want 1%, please set this field with 1. - format: int32 - maximum: 100 - minimum: 0 - type: integer - times: - description: Times indicates the max times of fails. - format: int32 - minimum: 0 - type: integer + description: Map of string keys and values that can + be used to select objects. A selector based on labels. + type: object + namespaces: + description: Namespaces is a set of namespace to which + objects belong. + items: + type: string + type: array + nodeSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can + be used to select nodes. Selector which must match + a node's labels, and objects must belong to these + selected nodes. + type: object + nodes: + description: Nodes is a set of node name and objects + must belong to these nodes. + items: + type: string + type: array + podPhaseSelectors: + description: 'PodPhaseSelectors is a set of condition + of a pod at the current time. supported value: Pending + / Running / Succeeded / Failed / Unknown' + items: + type: string + type: array + pods: + additionalProperties: + items: + type: string + type: array + description: Pods is a map of string keys and a set + values that used to select pods. The key defines + the namespace which pods belong, and the each values + is a set of pod names. + type: object + type: object + value: + description: Value is required when the mode is set to + `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. + If `FixedPodMode`, provide an integer of pods to do + chaos action. If `FixedPercentPodMod`, provide a number + from 0-100 to specify the percent of pods the server + can do chaos action. IF `RandomMaxPercentPodMod`, provide + a number from 0-100 to specify the max percent of pods + to do chaos action + type: string required: - - failtype + - mode + - selector type: object + value: + description: Value is required when the mode is set to `FixedPodMode` + / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. If `FixedPodMode`, + provide an integer of pods to do chaos action. If `FixedPercentPodMod`, + provide a number from 0-100 to specify the percent of pods + the server can do chaos action. IF `RandomMaxPercentPodMod`, provide + a number from 0-100 to specify the max percent of pods to + do chaos action + type: string + required: + - action + - mode + - selector + type: object + podChaos: + description: PodChaosSpec defines the attributes that a user creates + on a chaos experiment about pods. + properties: + action: + description: 'Action defines the specific pod chaos action. + Supported action: pod-kill / pod-failure / container-kill + Default action: pod-kill' + enum: + - pod-kill + - pod-failure + - container-kill + type: string + containerNames: + description: ContainerNames indicates list of the name of + affected container. If not set, all containers will be injected + items: + type: string + type: array + duration: + description: Duration represents the duration of the chaos + action. It is required when the action is `PodFailureAction`. + A duration string is a possibly signed sequence of decimal + numbers, each with optional fraction and a unit suffix, + such as "300ms", "-1.5h" or "2h45m". Valid time units are + "ns", "us" (or "µs"), "ms", "s", "m", "h". + type: string + gracePeriod: + description: GracePeriod is used in pod-kill action. It represents + the duration in seconds before the pod should be deleted. + Value must be non-negative integer. The default value is + zero that indicates delete immediately. + format: int64 + minimum: 0 + type: integer mode: description: 'Mode defines the mode to run chaos action. Supported mode: one / all / fixed / fixed-percent / random-max-percent' @@ -12565,227 +15699,110 @@ spec: description: key is the label key that the selector applies to. type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which - objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select nodes. Selector which must match a node's - labels, and objects must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects must - belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: Pending - / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values - that used to select pods. The key defines the namespace - which pods belong, and the each values is a set of pod - names. - type: object - type: object - value: - description: Value is required when the mode is set to `FixedPodMode` - / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. If `FixedPodMode`, - provide an integer of pods to do chaos action. If `FixedPercentPodMod`, - provide a number from 0-100 to specify the percent of pods - the server can do chaos action. IF `RandomMaxPercentPodMod`, provide - a number from 0-100 to specify the max percent of pods to - do chaos action - type: string - required: - - failKernRequest - - mode - - selector - type: object - networkChaos: - description: NetworkChaosSpec defines the desired state of NetworkChaos - properties: - action: - description: 'Action defines the specific network chaos action. - Supported action: partition, netem, delay, loss, duplicate, - corrupt Default action: delay' - enum: - - netem - - delay - - loss - - duplicate - - corrupt - - partition - - bandwidth - type: string - bandwidth: - description: Bandwidth represents the detail about bandwidth - control action - properties: - buffer: - description: Buffer is the maximum amount of bytes that - tokens can be available for instantaneously. - format: int32 - minimum: 1 - type: integer - limit: - description: Limit is the number of bytes that can be - queued waiting for tokens to become available. - format: int32 - minimum: 1 - type: integer - minburst: - description: Minburst specifies the size of the peakrate - bucket. For perfect accuracy, should be set to the MTU - of the interface. If a peakrate is needed, but some - burstiness is acceptable, this size can be raised. A - 3000 byte minburst allows around 3mbit/s of peakrate, - given 1000 byte packets. - format: int32 - minimum: 0 - type: integer - peakrate: - description: Peakrate is the maximum depletion rate of - the bucket. The peakrate does not need to be set, it - is only necessary if perfect millisecond timescale shaping - is required. - format: int64 - minimum: 0 - type: integer - rate: - description: Rate is the speed knob. Allows bps, kbps, - mbps, gbps, tbps unit. bps means bytes per second. - type: string - required: - - buffer - - limit - - rate - type: object - corrupt: - description: Corrupt represents the detail about corrupt action - properties: - correlation: - type: string - corrupt: - type: string - required: - - correlation - - corrupt - type: object - delay: - description: Delay represents the detail about delay action - properties: - correlation: - type: string - jitter: - type: string - latency: - type: string - reorder: - description: ReorderSpec defines details of packet reorder. - properties: - correlation: - type: string - gap: - type: integer - reorder: + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. + If the operator is In or NotIn, the values array + must be non-empty. If the operator is Exists or + DoesNotExist, the values array must be empty. + This array is replaced during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + fieldSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can be + used to select objects. A selector based on fields. + type: object + labelSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can be + used to select objects. A selector based on labels. + type: object + namespaces: + description: Namespaces is a set of namespace to which + objects belong. + items: + type: string + type: array + nodeSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can be + used to select nodes. Selector which must match a node's + labels, and objects must belong to these selected nodes. + type: object + nodes: + description: Nodes is a set of node name and objects must + belong to these nodes. + items: + type: string + type: array + podPhaseSelectors: + description: 'PodPhaseSelectors is a set of condition + of a pod at the current time. supported value: Pending + / Running / Succeeded / Failed / Unknown' + items: + type: string + type: array + pods: + additionalProperties: + items: type: string - required: - - correlation - - gap - - reorder + type: array + description: Pods is a map of string keys and a set values + that used to select pods. The key defines the namespace + which pods belong, and the each values is a set of pod + names. type: object - required: - - latency type: object - direction: - description: Direction represents the direction, this applies - on netem and network partition action - enum: - - to - - from - - both - - "" + value: + description: Value is required when the mode is set to `FixedPodMode` + / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. If `FixedPodMode`, + provide an integer of pods to do chaos action. If `FixedPercentPodMod`, + provide a number from 0-100 to specify the percent of pods + the server can do chaos action. IF `RandomMaxPercentPodMod`, provide + a number from 0-100 to specify the max percent of pods to + do chaos action type: string - duplicate: - description: DuplicateSpec represents the detail about loss - action - properties: - correlation: - type: string - duplicate: - type: string - required: - - correlation - - duplicate - type: object + required: + - action + - mode + - selector + type: object + schedule: + type: string + startingDeadlineSeconds: + exclusiveMinimum: true + format: int64 + minimum: 0 + nullable: true + type: integer + stressChaos: + description: StressChaosSpec defines the desired state of StressChaos + properties: + containerNames: + description: ContainerNames indicates list of the name of + affected container. If not set, all containers will be injected + items: + type: string + type: array duration: description: Duration represents the duration of the chaos action type: string - externalTargets: - description: ExternalTargets represents network targets outside - k8s - items: - type: string - type: array - loss: - description: Loss represents the detail about loss action - properties: - correlation: - type: string - loss: - type: string - required: - - correlation - - loss - type: object mode: description: 'Mode defines the mode to run chaos action. Supported mode: one / all / fixed / fixed-percent / random-max-percent' @@ -12888,127 +15905,64 @@ spec: names. type: object type: object - target: - description: Target represents network target, this applies - on netem and network partition action + stressngStressors: + description: StressngStressors defines plenty of stressors + just like `Stressors` except that it's an experimental feature + and more powerful. You can define stressors in `stress-ng` + (see also `man stress-ng`) dialect, however not all of the + supported stressors are well tested. It maybe retired in + later releases. You should always use `Stressors` to define + the stressors and use this only when you want more stressors + unsupported by `Stressors`. When both `StressngStressors` + and `Stressors` are defined, `StressngStressors` wins. + type: string + stressors: + description: Stressors defines plenty of stressors supported + to stress system components out. You can use one or more + of them to make up various kinds of stresses. At least one + of the stressors should be specified. properties: - mode: - description: 'Mode defines the mode to run chaos action. - Supported mode: one / all / fixed / fixed-percent / - random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - selector: - description: Selector is used to select pods that are - used to inject chaos action. + cpu: + description: CPUStressor stresses CPU out properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list of selectors - based on set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, - NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values - array must be non-empty. If the operator is - Exists or DoesNotExist, the values array must - be empty. This array is replaced during a - strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which - objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select nodes. Selector which must match - a node's labels, and objects must belong to these - selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects - must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: Pending - / Running / Succeeded / Failed / Unknown' + load: + description: Load specifies P percent loading per + CPU worker. 0 is effectively a sleep (no load) and + 100 is full loading. + type: integer + options: + description: extend stress-ng options items: type: string type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set - values that used to select pods. The key defines - the namespace which pods belong, and the each values - is a set of pod names. - type: object + workers: + description: Workers specifies N workers to apply + the stressor. + type: integer + required: + - workers + type: object + memory: + description: MemoryStressor stresses virtual memory out + properties: + options: + description: extend stress-ng options + items: + type: string + type: array + size: + description: Size specifies N bytes consumed per vm + worker, default is the total available memory. One + can specify the size as % of total available memory + or in units of B, KB/KiB, MB/MiB, GB/GiB, TB/TiB. + type: string + workers: + description: Workers specifies N workers to apply + the stressor. + type: integer + required: + - workers type: object - value: - description: Value is required when the mode is set to - `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. - If `FixedPodMode`, provide an integer of pods to do - chaos action. If `FixedPercentPodMod`, provide a number - from 0-100 to specify the percent of pods the server - can do chaos action. IF `RandomMaxPercentPodMod`, provide - a number from 0-100 to specify the max percent of pods - to do chaos action - type: string - required: - - mode - - selector type: object value: description: Value is required when the mode is set to `FixedPodMode` @@ -13020,23 +15974,20 @@ spec: do chaos action type: string required: - - action - mode - selector type: object - podChaos: - description: PodChaosSpec defines the attributes that a user creates - on a chaos experiment about pods. + timeChaos: + description: TimeChaosSpec defines the desired state of TimeChaos properties: - action: - description: 'Action defines the specific pod chaos action. - Supported action: pod-kill / pod-failure / container-kill - Default action: pod-kill' - enum: - - pod-kill - - pod-failure - - container-kill - type: string + clockIds: + description: ClockIds defines all affected clock id All available + options are ["CLOCK_REALTIME","CLOCK_MONOTONIC","CLOCK_PROCESS_CPUTIME_ID","CLOCK_THREAD_CPUTIME_ID", + "CLOCK_MONOTONIC_RAW","CLOCK_REALTIME_COARSE","CLOCK_MONOTONIC_COARSE","CLOCK_BOOTTIME","CLOCK_REALTIME_ALARM", + "CLOCK_BOOTTIME_ALARM"] Default value is ["CLOCK_REALTIME"] + items: + type: string + type: array containerNames: description: ContainerNames indicates list of the name of affected container. If not set, all containers will be injected @@ -13045,20 +15996,8 @@ spec: type: array duration: description: Duration represents the duration of the chaos - action. It is required when the action is `PodFailureAction`. - A duration string is a possibly signed sequence of decimal - numbers, each with optional fraction and a unit suffix, - such as "300ms", "-1.5h" or "2h45m". Valid time units are - "ns", "us" (or "µs"), "ms", "s", "m", "h". + action type: string - gracePeriod: - description: GracePeriod is used in pod-kill action. It represents - the duration in seconds before the pod should be deleted. - Value must be non-negative integer. The default value is - zero that indicates delete immediately. - format: int64 - minimum: 0 - type: integer mode: description: 'Mode defines the mode to run chaos action. Supported mode: one / all / fixed / fixed-percent / random-max-percent' @@ -13097,489 +16036,926 @@ spec: to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. + values: + description: values is an array of string values. + If the operator is In or NotIn, the values array + must be non-empty. If the operator is Exists or + DoesNotExist, the values array must be empty. + This array is replaced during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + fieldSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can be + used to select objects. A selector based on fields. + type: object + labelSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can be + used to select objects. A selector based on labels. + type: object + namespaces: + description: Namespaces is a set of namespace to which + objects belong. + items: + type: string + type: array + nodeSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can be + used to select nodes. Selector which must match a node's + labels, and objects must belong to these selected nodes. + type: object + nodes: + description: Nodes is a set of node name and objects must + belong to these nodes. + items: + type: string + type: array + podPhaseSelectors: + description: 'PodPhaseSelectors is a set of condition + of a pod at the current time. supported value: Pending + / Running / Succeeded / Failed / Unknown' + items: + type: string + type: array + pods: + additionalProperties: + items: + type: string + type: array + description: Pods is a map of string keys and a set values + that used to select pods. The key defines the namespace + which pods belong, and the each values is a set of pod + names. + type: object + type: object + timeOffset: + description: TimeOffset defines the delta time of injected + program. It's a possibly signed sequence of decimal numbers, + such as "300ms", "-1.5h" or "2h45m". Valid time units are + "ns", "us" (or "µs"), "ms", "s", "m", "h". + type: string + value: + description: Value is required when the mode is set to `FixedPodMode` + / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. If `FixedPodMode`, + provide an integer of pods to do chaos action. If `FixedPercentPodMod`, + provide a number from 0-100 to specify the percent of pods + the server can do chaos action. IF `RandomMaxPercentPodMod`, provide + a number from 0-100 to specify the max percent of pods to + do chaos action + type: string + required: + - mode + - selector + - timeOffset + type: object + type: + description: 'TODO: use a custom type, as `TemplateType` contains + other possible values' + type: string + workflow: + properties: + entry: + type: string + templates: + items: + properties: + awsChaos: + description: AwsChaosSpec is the content of the specification + for an AwsChaos + properties: + action: + description: 'Action defines the specific aws chaos + action. Supported action: ec2-stop / ec2-restart + / detach-volume Default action: ec2-stop' + enum: + - ec2-stop + - ec2-restart + - detach-volume + type: string + awsRegion: + description: AwsRegion defines the region of aws. + type: string + deviceName: + description: DeviceName indicates the name of the + device. Needed in detach-volume. + type: string + duration: + description: Duration represents the duration of + the chaos action. + type: string + ec2Instance: + description: Ec2Instance indicates the ID of the + ec2 instance. + type: string + endpoint: + description: Endpoint indicates the endpoint of + the aws server. Just used it in test now. + type: string + secretName: + description: SecretName defines the name of kubernetes + secret. + type: string + volumeID: + description: EbsVolume indicates the ID of the EBS + volume. Needed in detach-volume. + type: string + required: + - action + - awsRegion + - ec2Instance + type: object + conditionalTasks: + description: ConditionalTasks describes the conditional + branches of custom tasks. Only used when Type is TypeTask. + items: + properties: + expression: + type: string + task: + type: string + required: + - task + type: object + type: array + dnsChaos: + description: DNSChaosSpec defines the desired state + of DNSChaos + properties: + action: + description: 'Action defines the specific DNS chaos + action. Supported action: error, random Default + action: error' + enum: + - error + - random + type: string + containerNames: + description: ContainerNames indicates list of the + name of affected container. If not set, all containers + will be injected + items: + type: string + type: array + duration: + description: Duration represents the duration of + the chaos action + type: string + mode: + description: 'Mode defines the mode to run chaos + action. Supported mode: one / all / fixed / fixed-percent + / random-max-percent' + enum: + - one + - all + - fixed + - fixed-percent + - random-max-percent + type: string + patterns: + description: "Choose which domain names to take + effect, support the placeholder ? and wildcard + *, or the Specified domain name. Note: 1. + The wildcard * must be at the end of the string. + For example, chaos-*.org is invalid. 2. if + the patterns is empty, will take effect on all + the domain names. For example: \t\tThe value is + [\"google.com\", \"github.*\", \"chaos-mes?.org\"], + \t\twill take effect on \"google.com\", \"github.com\" + and \"chaos-mesh.org\"" items: type: string type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which - objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select nodes. Selector which must match a node's - labels, and objects must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects must - belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: Pending - / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values - that used to select pods. The key defines the namespace - which pods belong, and the each values is a set of pod - names. - type: object - type: object - value: - description: Value is required when the mode is set to `FixedPodMode` - / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. If `FixedPodMode`, - provide an integer of pods to do chaos action. If `FixedPercentPodMod`, - provide a number from 0-100 to specify the percent of pods - the server can do chaos action. IF `RandomMaxPercentPodMod`, provide - a number from 0-100 to specify the max percent of pods to - do chaos action - type: string - required: - - action - - mode - - selector - type: object - schedule: - type: string - startingDeadlineSeconds: - exclusiveMinimum: true - format: int64 - minimum: 0 - nullable: true - type: integer - stressChaos: - description: StressChaosSpec defines the desired state of StressChaos - properties: - containerNames: - description: ContainerNames indicates list of the name of - affected container. If not set, all containers will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of the chaos - action - type: string - mode: - description: 'Mode defines the mode to run chaos action. Supported - mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - selector: - description: Selector is used to select pods that are used - to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that - can be used to select objects. A list of selectors based - on set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. + selector: + description: Selector is used to select pods that + are used to inject chaos action. + properties: + annotationSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select objects. A selector + based on annotations. + type: object + expressionSelectors: + description: a slice of label selector expressions + that can be used to select objects. A list + of selectors based on set-based label expressions. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + fieldSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select objects. A selector + based on fields. + type: object + labelSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select objects. A selector + based on labels. + type: object + namespaces: + description: Namespaces is a set of namespace + to which objects belong. + items: + type: string + type: array + nodeSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select nodes. Selector which + must match a node's labels, and objects must + belong to these selected nodes. + type: object + nodes: + description: Nodes is a set of node name and + objects must belong to these nodes. + items: + type: string + type: array + podPhaseSelectors: + description: 'PodPhaseSelectors is a set of + condition of a pod at the current time. supported + value: Pending / Running / Succeeded / Failed + / Unknown' + items: + type: string + type: array + pods: + additionalProperties: + items: + type: string + type: array + description: Pods is a map of string keys and + a set values that used to select pods. The + key defines the namespace which pods belong, + and the each values is a set of pod names. + type: object + type: object + value: + description: Value is required when the mode is + set to `FixedPodMode` / `FixedPercentPodMod` / + `RandomMaxPercentPodMod`. If `FixedPodMode`, provide + an integer of pods to do chaos action. If `FixedPercentPodMod`, + provide a number from 0-100 to specify the percent + of pods the server can do chaos action. IF `RandomMaxPercentPodMod`, provide + a number from 0-100 to specify the max percent + of pods to do chaos action type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. + required: + - action + - mode + - selector + type: object + duration: + type: string + gcpChaos: + description: GcpChaosSpec is the content of the specification + for a GcpChaos + properties: + action: + description: 'Action defines the specific gcp chaos + action. Supported action: node-stop / node-reset + / disk-loss Default action: node-stop' + enum: + - node-stop + - node-reset + - disk-loss type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. + deviceNames: + description: The device name of disks to detach. + Needed in disk-loss. items: type: string type: array + duration: + description: Duration represents the duration of + the chaos action. + type: string + instance: + description: Instance defines the name of the instance + type: string + project: + description: Project defines the name of gcp project. + type: string + secretName: + description: SecretName defines the name of kubernetes + secret. It is used for GCP credentials. + type: string + zone: + description: Zone defines the zone of gcp project. + type: string required: - - key - - operator + - action + - instance + - project + - zone type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which - objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select nodes. Selector which must match a node's - labels, and objects must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects must - belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: Pending - / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values - that used to select pods. The key defines the namespace - which pods belong, and the each values is a set of pod - names. - type: object - type: object - stressngStressors: - description: StressngStressors defines plenty of stressors - just like `Stressors` except that it's an experimental feature - and more powerful. You can define stressors in `stress-ng` - (see also `man stress-ng`) dialect, however not all of the - supported stressors are well tested. It maybe retired in - later releases. You should always use `Stressors` to define - the stressors and use this only when you want more stressors - unsupported by `Stressors`. When both `StressngStressors` - and `Stressors` are defined, `StressngStressors` wins. - type: string - stressors: - description: Stressors defines plenty of stressors supported - to stress system components out. You can use one or more - of them to make up various kinds of stresses. At least one - of the stressors should be specified. - properties: - cpu: - description: CPUStressor stresses CPU out - properties: - load: - description: Load specifies P percent loading per - CPU worker. 0 is effectively a sleep (no load) and - 100 is full loading. - type: integer - options: - description: extend stress-ng options - items: + httpChaos: + properties: + abort: + description: Abort is a rule to abort a http session. + type: boolean + code: + description: Code is a rule to select target by + http status code in response. + format: int32 + type: integer + delay: + description: Delay represents the delay of the target + request/response. A duration string is a possibly + unsigned sequence of decimal numbers, each with + optional fraction and a unit suffix, such as "300ms", + "2h45m". Valid time units are "ns", "us" (or "µs"), + "ms", "s", "m", "h". type: string - type: array - workers: - description: Workers specifies N workers to apply - the stressor. - type: integer - required: - - workers - type: object - memory: - description: MemoryStressor stresses virtual memory out - properties: - options: - description: extend stress-ng options - items: + duration: + description: Duration represents the duration of + the chaos action. type: string - type: array - size: - description: Size specifies N bytes consumed per vm - worker, default is the total available memory. One - can specify the size as % of total available memory - or in units of B, KB/KiB, MB/MiB, GB/GiB, TB/TiB. - type: string - workers: - description: Workers specifies N workers to apply - the stressor. - type: integer - required: - - workers - type: object - type: object - value: - description: Value is required when the mode is set to `FixedPodMode` - / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. If `FixedPodMode`, - provide an integer of pods to do chaos action. If `FixedPercentPodMod`, - provide a number from 0-100 to specify the percent of pods - the server can do chaos action. IF `RandomMaxPercentPodMod`, provide - a number from 0-100 to specify the max percent of pods to - do chaos action - type: string - required: - - mode - - selector - type: object - timeChaos: - description: TimeChaosSpec defines the desired state of TimeChaos - properties: - clockIds: - description: ClockIds defines all affected clock id All available - options are ["CLOCK_REALTIME","CLOCK_MONOTONIC","CLOCK_PROCESS_CPUTIME_ID","CLOCK_THREAD_CPUTIME_ID", - "CLOCK_MONOTONIC_RAW","CLOCK_REALTIME_COARSE","CLOCK_MONOTONIC_COARSE","CLOCK_BOOTTIME","CLOCK_REALTIME_ALARM", - "CLOCK_BOOTTIME_ALARM"] Default value is ["CLOCK_REALTIME"] - items: - type: string - type: array - containerNames: - description: ContainerNames indicates list of the name of - affected container. If not set, all containers will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of the chaos - action - type: string - mode: - description: 'Mode defines the mode to run chaos action. Supported - mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - selector: - description: Selector is used to select pods that are used - to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that - can be used to select objects. A list of selectors based - on set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. + method: + description: Method is a rule to select target by + http method in request. type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. + mode: + description: 'Mode defines the mode to run chaos + action. Supported mode: one / all / fixed / fixed-percent + / random-max-percent' + enum: + - one + - all + - fixed + - fixed-percent + - random-max-percent type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: + patch: + description: Patch is a rule to patch some contents + in target. + properties: + body: + description: Body is a rule to patch message + body of target. + properties: + type: + description: Type represents the patch type, + only support `JSON` as [merge patch json](https://tools.ietf.org/html/rfc7396) + currently. + type: string + value: + description: Value is the patch contents. + type: string + required: + - type + - value + type: object + headers: + description: 'Headers is a rule to append http + headers of target. For example: `[["Set-Cookie", + ""], ["Set-Cookie", ""]]`.' + items: + items: + type: string + type: array + type: array + queries: + description: 'Queries is a rule to append uri + queries of target(Request only). For example: + `[["foo", "bar"], ["foo", "unknown"]]`.' + items: + items: + type: string + type: array + type: array + type: object + path: + description: Path is a rule to select target by + uri path in http request. + type: string + port: + description: Port represents the target port to + be proxy of. + format: int32 + type: integer + replace: + description: Replace is a rule to replace some contents + in target. + properties: + body: + description: Body is a rule to replace http + message body in target. + format: byte + type: string + code: + description: Code is a rule to replace http + status code in response. + format: int32 + type: integer + headers: + additionalProperties: + type: string + description: Headers is a rule to replace http + headers of target. The key-value pairs represent + header name and header value pairs. + type: object + method: + description: Method is a rule to replace http + method in request. + type: string + path: + description: Path is rule to to replace uri + path in http request. + type: string + queries: + additionalProperties: + type: string + description: 'Queries is a rule to replace uri + queries in http request. For example, with + value `{ "foo": "unknown" }`, the `/?foo=bar` + will be altered to `/?foo=unknown`,' + type: object + type: object + request_headers: + additionalProperties: type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which - objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select nodes. Selector which must match a node's - labels, and objects must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects must - belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: Pending - / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values - that used to select pods. The key defines the namespace - which pods belong, and the each values is a set of pod - names. - type: object - type: object - timeOffset: - description: TimeOffset defines the delta time of injected - program. It's a possibly signed sequence of decimal numbers, - such as "300ms", "-1.5h" or "2h45m". Valid time units are - "ns", "us" (or "µs"), "ms", "s", "m", "h". - type: string - value: - description: Value is required when the mode is set to `FixedPodMode` - / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. If `FixedPodMode`, - provide an integer of pods to do chaos action. If `FixedPercentPodMod`, - provide a number from 0-100 to specify the percent of pods - the server can do chaos action. IF `RandomMaxPercentPodMod`, provide - a number from 0-100 to specify the max percent of pods to - do chaos action - type: string - required: - - mode - - selector - - timeOffset - type: object - type: - description: 'TODO: use a custom type, as `TemplateType` contains - other possible values' - type: string - workflow: - properties: - entry: - type: string - templates: - items: - properties: - awsChaos: - description: AwsChaosSpec is the content of the specification - for an AwsChaos + description: RequestHeaders is a rule to select + target by http headers in request. The key-value + pairs represent header name and header value pairs. + type: object + response_headers: + additionalProperties: + type: string + description: ResponseHeaders is a rule to select + target by http headers in response. The key-value + pairs represent header name and header value pairs. + type: object + selector: + description: Selector is used to select pods that + are used to inject chaos action. + properties: + annotationSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select objects. A selector + based on annotations. + type: object + expressionSelectors: + description: a slice of label selector expressions + that can be used to select objects. A list + of selectors based on set-based label expressions. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + fieldSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select objects. A selector + based on fields. + type: object + labelSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select objects. A selector + based on labels. + type: object + namespaces: + description: Namespaces is a set of namespace + to which objects belong. + items: + type: string + type: array + nodeSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select nodes. Selector which + must match a node's labels, and objects must + belong to these selected nodes. + type: object + nodes: + description: Nodes is a set of node name and + objects must belong to these nodes. + items: + type: string + type: array + podPhaseSelectors: + description: 'PodPhaseSelectors is a set of + condition of a pod at the current time. supported + value: Pending / Running / Succeeded / Failed + / Unknown' + items: + type: string + type: array + pods: + additionalProperties: + items: + type: string + type: array + description: Pods is a map of string keys and + a set values that used to select pods. The + key defines the namespace which pods belong, + and the each values is a set of pod names. + type: object + type: object + target: + description: Target is the object to be selected + and injected. + enum: + - Request + - Response + type: string + value: + description: Value is required when the mode is + set to `FixedPodMode` / `FixedPercentPodMod` / + `RandomMaxPercentPodMod`. If `FixedPodMode`, provide + an integer of pods to do chaos action. If `FixedPercentPodMod`, + provide a number from 0-100 to specify the percent + of pods the server can do chaos action. IF `RandomMaxPercentPodMod`, provide + a number from 0-100 to specify the max percent + of pods to do chaos action + type: string + required: + - mode + - selector + - target + type: object + ioChaos: + description: IOChaosSpec defines the desired state of + IOChaos properties: action: - description: 'Action defines the specific aws chaos - action. Supported action: ec2-stop / ec2-restart - / detach-volume Default action: ec2-stop' + description: 'Action defines the specific pod chaos + action. Supported action: latency / fault / attrOverride + / mistake' enum: - - ec2-stop - - ec2-restart - - detach-volume - type: string - awsRegion: - description: AwsRegion defines the region of aws. + - latency + - fault + - attrOverride + - mistake type: string - deviceName: - description: DeviceName indicates the name of the - device. Needed in detach-volume. + attr: + description: Attr defines the overrided attribution + properties: + atime: + description: Timespec represents a time + properties: + nsec: + format: int64 + type: integer + sec: + format: int64 + type: integer + required: + - nsec + - sec + type: object + blocks: + format: int64 + type: integer + ctime: + description: Timespec represents a time + properties: + nsec: + format: int64 + type: integer + sec: + format: int64 + type: integer + required: + - nsec + - sec + type: object + gid: + format: int32 + type: integer + ino: + format: int64 + type: integer + kind: + description: FileType represents type of a file + type: string + mtime: + description: Timespec represents a time + properties: + nsec: + format: int64 + type: integer + sec: + format: int64 + type: integer + required: + - nsec + - sec + type: object + nlink: + format: int32 + type: integer + perm: + type: integer + rdev: + format: int32 + type: integer + size: + format: int64 + type: integer + uid: + format: int32 + type: integer + type: object + containerNames: + description: ContainerNames indicates list of the + name of affected container. If not set, all containers + will be injected + items: + type: string + type: array + delay: + description: Delay defines the value of I/O chaos + action delay. A delay string is a possibly signed + sequence of decimal numbers, each with optional + fraction and a unit suffix, such as "300ms". Valid + time units are "ns", "us" (or "µs"), "ms", "s", + "m", "h". type: string duration: description: Duration represents the duration of - the chaos action. + the chaos action. It is required when the action + is `PodFailureAction`. A duration string is a + possibly signed sequence of decimal numbers, each + with optional fraction and a unit suffix, such + as "300ms", "-1.5h" or "2h45m". Valid time units + are "ns", "us" (or "µs"), "ms", "s", "m", "h". type: string - ec2Instance: - description: Ec2Instance indicates the ID of the - ec2 instance. + errno: + description: 'Errno defines the error code that + returned by I/O action. refer to: https://www-numi.fnal.gov/offline_software/srt_public_context/WebDocs/Errors/unix_system_errors.html' + format: int32 + type: integer + methods: + description: 'Methods defines the I/O methods for + injecting I/O chaos action. default: all I/O methods.' + items: + type: string + type: array + mistake: + description: Mistake defines what types of incorrectness + are injected to IO operations + properties: + filling: + description: Filling determines what is filled + in the miskate data. + enum: + - zero + - random + type: string + maxLength: + description: Max length of each wrong data segment + in bytes + format: int64 + minimum: 1 + type: integer + maxOccurrences: + description: There will be [1, MaxOccurrences] + segments of wrong data. + format: int64 + minimum: 1 + type: integer + type: object + mode: + description: 'Mode defines the mode to run chaos + action. Supported mode: one / all / fixed / fixed-percent + / random-max-percent' + enum: + - one + - all + - fixed + - fixed-percent + - random-max-percent type: string - endpoint: - description: Endpoint indicates the endpoint of - the aws server. Just used it in test now. + path: + description: Path defines the path of files for + injecting I/O chaos action. type: string - secretName: - description: SecretName defines the name of kubernetes - secret. + percent: + description: 'Percent defines the percentage of + injection errors and provides a number from 0-100. + default: 100.' + type: integer + selector: + description: Selector is used to select pods that + are used to inject chaos action. + properties: + annotationSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select objects. A selector + based on annotations. + type: object + expressionSelectors: + description: a slice of label selector expressions + that can be used to select objects. A list + of selectors based on set-based label expressions. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + fieldSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select objects. A selector + based on fields. + type: object + labelSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select objects. A selector + based on labels. + type: object + namespaces: + description: Namespaces is a set of namespace + to which objects belong. + items: + type: string + type: array + nodeSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select nodes. Selector which + must match a node's labels, and objects must + belong to these selected nodes. + type: object + nodes: + description: Nodes is a set of node name and + objects must belong to these nodes. + items: + type: string + type: array + podPhaseSelectors: + description: 'PodPhaseSelectors is a set of + condition of a pod at the current time. supported + value: Pending / Running / Succeeded / Failed + / Unknown' + items: + type: string + type: array + pods: + additionalProperties: + items: + type: string + type: array + description: Pods is a map of string keys and + a set values that used to select pods. The + key defines the namespace which pods belong, + and the each values is a set of pod names. + type: object + type: object + value: + description: Value is required when the mode is + set to `FixedPodMode` / `FixedPercentPodMod` / + `RandomMaxPercentPodMod`. If `FixedPodMode`, provide + an integer of pods to do chaos action. If `FixedPercentPodMod`, + provide a number from 0-100 to specify the percent + of pods the server can do chaos action. IF `RandomMaxPercentPodMod`, provide + a number from 0-100 to specify the max percent + of pods to do chaos action type: string - volumeID: - description: EbsVolume indicates the ID of the EBS - volume. Needed in detach-volume. + volumePath: + description: VolumePath represents the mount path + of injected volume type: string required: - action - - awsRegion - - ec2Instance + - mode + - selector + - volumePath type: object - dnsChaos: - description: DNSChaosSpec defines the desired state - of DNSChaos + jvmChaos: + description: JVMChaosSpec defines the desired state + of JVMChaos properties: action: - description: 'Action defines the specific DNS chaos - action. Supported action: error, random Default - action: error' + description: 'Action defines the specific jvm chaos + action. Supported action: delay;return;script;cfl;oom;ccf;tce;cpf;tde;tpf' enum: - - error - - random + - delay + - return + - script + - cfl + - oom + - ccf + - tce + - cpf + - tde + - tpf type: string containerNames: description: ContainerNames indicates list of the @@ -13592,6 +16968,17 @@ spec: description: Duration represents the duration of the chaos action type: string + flags: + additionalProperties: + type: string + description: Flags represents the flags of action + type: object + matchers: + additionalProperties: + type: string + description: Matchers represents the matching rules + for the target + type: object mode: description: 'Mode defines the mode to run chaos action. Supported mode: one / all / fixed / fixed-percent @@ -13603,20 +16990,6 @@ spec: - fixed-percent - random-max-percent type: string - patterns: - description: "Choose which domain names to take - effect, support the placeholder ? and wildcard - *, or the Specified domain name. Note: 1. - The wildcard * must be at the end of the string. - For example, chaos-*.org is invalid. 2. if - the patterns is empty, will take effect on all - the domain names. For example: \t\tThe value is - [\"google.com\", \"github.*\", \"chaos-mes?.org\"], - \t\twill take effect on \"google.com\", \"github.com\" - and \"chaos-mesh.org\"" - items: - type: string - type: array selector: description: Selector is used to select pods that are used to inject chaos action. @@ -13717,6 +17090,24 @@ spec: and the each values is a set of pod names. type: object type: object + target: + description: 'Target defines the specific jvm chaos + target. Supported target: servlet;psql;jvm;jedis;http;dubbo;rocketmq;tars;mysql;druid;redisson;rabbitmq;mongodb' + enum: + - servlet + - psql + - jvm + - jedis + - http + - dubbo + - rocketmq + - tars + - mysql + - druid + - redisson + - rabbitmq + - mongodb + type: string value: description: Value is required when the mode is set to `FixedPodMode` / `FixedPercentPodMod` / @@ -13731,77 +17122,97 @@ spec: - action - mode - selector + - target type: object - duration: - type: string - gcpChaos: - description: GcpChaosSpec is the content of the specification - for a GcpChaos - properties: - action: - description: 'Action defines the specific gcp chaos - action. Supported action: node-stop / node-reset - / disk-loss Default action: node-stop' - enum: - - node-stop - - node-reset - - disk-loss - type: string - deviceNames: - description: The device name of disks to detach. - Needed in disk-loss. - items: - type: string - type: array - duration: - description: Duration represents the duration of - the chaos action. - type: string - instance: - description: Instance defines the name of the instance - type: string - project: - description: Project defines the name of gcp project. - type: string - secretName: - description: SecretName defines the name of kubernetes - secret. It is used for GCP credentials. - type: string - zone: - description: Zone defines the zone of gcp project. - type: string - required: - - action - - instance - - project - - zone - type: object - httpChaos: + kernelChaos: + description: KernelChaosSpec defines the desired state + of KernelChaos properties: - abort: - description: Abort is a rule to abort a http session. - type: boolean - code: - description: Code is a rule to select target by - http status code in response. - format: int32 - type: integer - delay: - description: Delay represents the delay of the target - request/response. A duration string is a possibly - unsigned sequence of decimal numbers, each with - optional fraction and a unit suffix, such as "300ms", - "2h45m". Valid time units are "ns", "us" (or "µs"), - "ms", "s", "m", "h". - type: string duration: description: Duration represents the duration of - the chaos action. - type: string - method: - description: Method is a rule to select target by - http method in request. + the chaos action type: string + failKernRequest: + description: FailKernRequest defines the request + of kernel injection + properties: + callchain: + description: 'Callchain indicate a special call + chain, such as: ext4_mount -> mount_subtree -> + ... -> should_failslab With an + optional set of predicates and an optional + set of parameters, which used with predicates. + You can read call chan and predicate examples + from https://github.com/chaos-mesh/bpfki/tree/develop/examples + to learn more. If no special call chain, just + keep Callchain empty, which means it will + fail at any call chain with slab alloc (eg: + kmalloc).' + items: + description: Frame defines the function signature + and predicate in function's body + properties: + funcname: + description: Funcname can be find from + kernel source or `/proc/kallsyms`, such + as `ext4_mount` + type: string + parameters: + description: Parameters is used with predicate, + for example, if you want to inject slab + error in `d_alloc_parallel(struct dentry + *parent, const struct qstr *name)` with + a special name `bananas`, you need to + set it to `struct dentry *parent, const + struct qstr *name` otherwise omit it. + type: string + predicate: + description: Predicate will access the + arguments of this Frame, example with + Parameters's, you can set it to `STRNCMP(name->name, + "bananas", 8)` to make inject only with + it, or omit it to inject for all d_alloc_parallel + call chain. + type: string + type: object + type: array + failtype: + description: 'FailType indicates what to fail, + can be set to ''0'' / ''1'' / ''2'' If `0`, + indicates slab to fail (should_failslab) If + `1`, indicates alloc_page to fail (should_fail_alloc_page) + If `2`, indicates bio to fail (should_fail_bio) + You can read: 1. https://www.kernel.org/doc/html/latest/fault-injection/fault-injection.html 2. + http://github.com/iovisor/bcc/blob/master/tools/inject_example.txt + to learn more' + format: int32 + maximum: 2 + minimum: 0 + type: integer + headers: + description: 'Headers indicates the appropriate + kernel headers you need. Eg: "linux/mmzone.h", + "linux/blkdev.h" and so on' + items: + type: string + type: array + probability: + description: Probability indicates the fails + with probability. If you want 1%, please set + this field with 1. + format: int32 + maximum: 100 + minimum: 0 + type: integer + times: + description: Times indicates the max times of + fails. + format: int32 + minimum: 0 + type: integer + required: + - failtype + type: object mode: description: 'Mode defines the mode to run chaos action. Supported mode: one / all / fixed / fixed-percent @@ -13813,107 +17224,6 @@ spec: - fixed-percent - random-max-percent type: string - patch: - description: Patch is a rule to patch some contents - in target. - properties: - body: - description: Body is a rule to patch message - body of target. - properties: - type: - description: Type represents the patch type, - only support `JSON` as [merge patch json](https://tools.ietf.org/html/rfc7396) - currently. - type: string - value: - description: Value is the patch contents. - type: string - required: - - type - - value - type: object - headers: - description: 'Headers is a rule to append http - headers of target. For example: `[["Set-Cookie", - ""], ["Set-Cookie", ""]]`.' - items: - items: - type: string - type: array - type: array - queries: - description: 'Queries is a rule to append uri - queries of target(Request only). For example: - `[["foo", "bar"], ["foo", "unknown"]]`.' - items: - items: - type: string - type: array - type: array - type: object - path: - description: Path is a rule to select target by - uri path in http request. - type: string - port: - description: Port represents the target port to - be proxy of. - format: int32 - type: integer - replace: - description: Replace is a rule to replace some contents - in target. - properties: - body: - description: Body is a rule to replace http - message body in target. - format: byte - type: string - code: - description: Code is a rule to replace http - status code in response. - format: int32 - type: integer - headers: - additionalProperties: - type: string - description: Headers is a rule to replace http - headers of target. The key-value pairs represent - header name and header value pairs. - type: object - method: - description: Method is a rule to replace http - method in request. - type: string - path: - description: Path is rule to to replace uri - path in http request. - type: string - queries: - additionalProperties: - type: string - description: 'Queries is a rule to replace uri - queries in http request. For example, with - value `{ "foo": "unknown" }`, the `/?foo=bar` - will be altered to `/?foo=unknown`,' - type: object - type: object - request_headers: - additionalProperties: - type: string - description: RequestHeaders is a rule to select - target by http headers in request. The key-value - pairs represent header name and header value pairs. - type: object - response_headers: - additionalProperties: - type: string - description: ResponseHeaders is a rule to select - target by http headers in response. The key-value - pairs represent header name and header value pairs. - type: object selector: description: Selector is used to select pods that are used to inject chaos action. @@ -14014,13 +17324,6 @@ spec: and the each values is a set of pod names. type: object type: object - target: - description: Target is the object to be selected - and injected. - enum: - - Request - - Response - type: string value: description: Value is required when the mode is set to `FixedPodMode` / `FixedPercentPodMod` / @@ -14032,151 +17335,158 @@ spec: of pods to do chaos action type: string required: + - failKernRequest - mode - selector - - target type: object - ioChaos: - description: IOChaosSpec defines the desired state of - IOChaos + name: + type: string + networkChaos: + description: NetworkChaosSpec defines the desired state + of NetworkChaos properties: action: - description: 'Action defines the specific pod chaos - action. Supported action: latency / fault / attrOverride - / mistake' + description: 'Action defines the specific network + chaos action. Supported action: partition, netem, + delay, loss, duplicate, corrupt Default action: + delay' enum: - - latency - - fault - - attrOverride - - mistake + - netem + - delay + - loss + - duplicate + - corrupt + - partition + - bandwidth type: string - attr: - description: Attr defines the overrided attribution + bandwidth: + description: Bandwidth represents the detail about + bandwidth control action properties: - atime: - description: Timespec represents a time - properties: - nsec: - format: int64 - type: integer - sec: - format: int64 - type: integer - required: - - nsec - - sec - type: object - blocks: - format: int64 + buffer: + description: Buffer is the maximum amount of + bytes that tokens can be available for instantaneously. + format: int32 + minimum: 1 type: integer - ctime: - description: Timespec represents a time - properties: - nsec: - format: int64 - type: integer - sec: - format: int64 - type: integer - required: - - nsec - - sec - type: object - gid: + limit: + description: Limit is the number of bytes that + can be queued waiting for tokens to become + available. format: int32 + minimum: 1 type: integer - ino: + minburst: + description: Minburst specifies the size of + the peakrate bucket. For perfect accuracy, + should be set to the MTU of the interface. If + a peakrate is needed, but some burstiness + is acceptable, this size can be raised. A + 3000 byte minburst allows around 3mbit/s of + peakrate, given 1000 byte packets. + format: int32 + minimum: 0 + type: integer + peakrate: + description: Peakrate is the maximum depletion + rate of the bucket. The peakrate does not + need to be set, it is only necessary if perfect + millisecond timescale shaping is required. format: int64 + minimum: 0 type: integer - kind: - description: FileType represents type of a file + rate: + description: Rate is the speed knob. Allows + bps, kbps, mbps, gbps, tbps unit. bps means + bytes per second. type: string - mtime: - description: Timespec represents a time + required: + - buffer + - limit + - rate + type: object + corrupt: + description: Corrupt represents the detail about + corrupt action + properties: + correlation: + type: string + corrupt: + type: string + required: + - correlation + - corrupt + type: object + delay: + description: Delay represents the detail about delay + action + properties: + correlation: + type: string + jitter: + type: string + latency: + type: string + reorder: + description: ReorderSpec defines details of + packet reorder. properties: - nsec: - format: int64 - type: integer - sec: - format: int64 + correlation: + type: string + gap: type: integer + reorder: + type: string required: - - nsec - - sec + - correlation + - gap + - reorder type: object - nlink: - format: int32 - type: integer - perm: - type: integer - rdev: - format: int32 - type: integer - size: - format: int64 - type: integer - uid: - format: int32 - type: integer + required: + - latency type: object - containerNames: - description: ContainerNames indicates list of the - name of affected container. If not set, all containers - will be injected - items: - type: string - type: array - delay: - description: Delay defines the value of I/O chaos - action delay. A delay string is a possibly signed - sequence of decimal numbers, each with optional - fraction and a unit suffix, such as "300ms". Valid - time units are "ns", "us" (or "µs"), "ms", "s", - "m", "h". + direction: + description: Direction represents the direction, + this applies on netem and network partition action + enum: + - to + - from + - both + - "" type: string + duplicate: + description: DuplicateSpec represents the detail + about loss action + properties: + correlation: + type: string + duplicate: + type: string + required: + - correlation + - duplicate + type: object duration: description: Duration represents the duration of - the chaos action. It is required when the action - is `PodFailureAction`. A duration string is a - possibly signed sequence of decimal numbers, each - with optional fraction and a unit suffix, such - as "300ms", "-1.5h" or "2h45m". Valid time units - are "ns", "us" (or "µs"), "ms", "s", "m", "h". + the chaos action type: string - errno: - description: 'Errno defines the error code that - returned by I/O action. refer to: https://www-numi.fnal.gov/offline_software/srt_public_context/WebDocs/Errors/unix_system_errors.html' - format: int32 - type: integer - methods: - description: 'Methods defines the I/O methods for - injecting I/O chaos action. default: all I/O methods.' + externalTargets: + description: ExternalTargets represents network + targets outside k8s items: type: string type: array - mistake: - description: Mistake defines what types of incorrectness - are injected to IO operations + loss: + description: Loss represents the detail about loss + action properties: - filling: - description: Filling determines what is filled - in the miskate data. - enum: - - zero - - random + correlation: type: string - maxLength: - description: Max length of each wrong data segment - in bytes - format: int64 - minimum: 1 - type: integer - maxOccurrences: - description: There will be [1, MaxOccurrences] - segments of wrong data. - format: int64 - minimum: 1 - type: integer + loss: + type: string + required: + - correlation + - loss type: object mode: description: 'Mode defines the mode to run chaos @@ -14189,15 +17499,6 @@ spec: - fixed-percent - random-max-percent type: string - path: - description: Path defines the path of files for - injecting I/O chaos action. - type: string - percent: - description: 'Percent defines the percentage of - injection errors and provides a number from 0-100. - default: 100.' - type: integer selector: description: Selector is used to select pods that are used to inject chaos action. @@ -14298,6 +17599,140 @@ spec: and the each values is a set of pod names. type: object type: object + target: + description: Target represents network target, this + applies on netem and network partition action + properties: + mode: + description: 'Mode defines the mode to run chaos + action. Supported mode: one / all / fixed + / fixed-percent / random-max-percent' + enum: + - one + - all + - fixed + - fixed-percent + - random-max-percent + type: string + selector: + description: Selector is used to select pods + that are used to inject chaos action. + properties: + annotationSelectors: + additionalProperties: + type: string + description: Map of string keys and values + that can be used to select objects. A + selector based on annotations. + type: object + expressionSelectors: + description: a slice of label selector expressions + that can be used to select objects. A + list of selectors based on set-based label + expressions. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents a + key's relationship to a set of values. + Valid operators are In, NotIn, Exists + and DoesNotExist. + type: string + values: + description: values is an array of + string values. If the operator is + In or NotIn, the values array must + be non-empty. If the operator is + Exists or DoesNotExist, the values + array must be empty. This array + is replaced during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + fieldSelectors: + additionalProperties: + type: string + description: Map of string keys and values + that can be used to select objects. A + selector based on fields. + type: object + labelSelectors: + additionalProperties: + type: string + description: Map of string keys and values + that can be used to select objects. A + selector based on labels. + type: object + namespaces: + description: Namespaces is a set of namespace + to which objects belong. + items: + type: string + type: array + nodeSelectors: + additionalProperties: + type: string + description: Map of string keys and values + that can be used to select nodes. Selector + which must match a node's labels, and + objects must belong to these selected + nodes. + type: object + nodes: + description: Nodes is a set of node name + and objects must belong to these nodes. + items: + type: string + type: array + podPhaseSelectors: + description: 'PodPhaseSelectors is a set + of condition of a pod at the current time. + supported value: Pending / Running / Succeeded + / Failed / Unknown' + items: + type: string + type: array + pods: + additionalProperties: + items: + type: string + type: array + description: Pods is a map of string keys + and a set values that used to select pods. + The key defines the namespace which pods + belong, and the each values is a set of + pod names. + type: object + type: object + value: + description: Value is required when the mode + is set to `FixedPodMode` / `FixedPercentPodMod` + / `RandomMaxPercentPodMod`. If `FixedPodMode`, + provide an integer of pods to do chaos action. + If `FixedPercentPodMod`, provide a number + from 0-100 to specify the percent of pods + the server can do chaos action. IF `RandomMaxPercentPodMod`, provide + a number from 0-100 to specify the max percent + of pods to do chaos action + type: string + required: + - mode + - selector + type: object value: description: Value is required when the mode is set to `FixedPodMode` / `FixedPercentPodMod` / @@ -14308,34 +17743,23 @@ spec: a number from 0-100 to specify the max percent of pods to do chaos action type: string - volumePath: - description: VolumePath represents the mount path - of injected volume - type: string required: - action - mode - selector - - volumePath type: object - jvmChaos: - description: JVMChaosSpec defines the desired state - of JVMChaos + podChaos: + description: PodChaosSpec defines the attributes that + a user creates on a chaos experiment about pods. properties: action: - description: 'Action defines the specific jvm chaos - action. Supported action: delay;return;script;cfl;oom;ccf;tce;cpf;tde;tpf' + description: 'Action defines the specific pod chaos + action. Supported action: pod-kill / pod-failure + / container-kill Default action: pod-kill' enum: - - delay - - return - - script - - cfl - - oom - - ccf - - tce - - cpf - - tde - - tpf + - pod-kill + - pod-failure + - container-kill type: string containerNames: description: ContainerNames indicates list of the @@ -14346,19 +17770,22 @@ spec: type: array duration: description: Duration represents the duration of - the chaos action + the chaos action. It is required when the action + is `PodFailureAction`. A duration string is a + possibly signed sequence of decimal numbers, each + with optional fraction and a unit suffix, such + as "300ms", "-1.5h" or "2h45m". Valid time units + are "ns", "us" (or "µs"), "ms", "s", "m", "h". type: string - flags: - additionalProperties: - type: string - description: Flags represents the flags of action - type: object - matchers: - additionalProperties: - type: string - description: Matchers represents the matching rules - for the target - type: object + gracePeriod: + description: GracePeriod is used in pod-kill action. + It represents the duration in seconds before the + pod should be deleted. Value must be non-negative + integer. The default value is zero that indicates + delete immediately. + format: int64 + minimum: 0 + type: integer mode: description: 'Mode defines the mode to run chaos action. Supported mode: one / all / fixed / fixed-percent @@ -14447,542 +17874,732 @@ spec: type: object nodes: description: Nodes is a set of node name and - objects must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of - condition of a pod at the current time. supported - value: Pending / Running / Succeeded / Failed - / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and - a set values that used to select pods. The - key defines the namespace which pods belong, - and the each values is a set of pod names. - type: object - type: object - target: - description: 'Target defines the specific jvm chaos - target. Supported target: servlet;psql;jvm;jedis;http;dubbo;rocketmq;tars;mysql;druid;redisson;rabbitmq;mongodb' - enum: - - servlet - - psql - - jvm - - jedis - - http - - dubbo - - rocketmq - - tars - - mysql - - druid - - redisson - - rabbitmq - - mongodb - type: string - value: - description: Value is required when the mode is - set to `FixedPodMode` / `FixedPercentPodMod` / - `RandomMaxPercentPodMod`. If `FixedPodMode`, provide - an integer of pods to do chaos action. If `FixedPercentPodMod`, - provide a number from 0-100 to specify the percent - of pods the server can do chaos action. IF `RandomMaxPercentPodMod`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action - type: string - required: - - action - - mode - - selector - - target - type: object - kernelChaos: - description: KernelChaosSpec defines the desired state - of KernelChaos - properties: - duration: - description: Duration represents the duration of - the chaos action - type: string - failKernRequest: - description: FailKernRequest defines the request - of kernel injection - properties: - callchain: - description: 'Callchain indicate a special call - chain, such as: ext4_mount -> mount_subtree -> - ... -> should_failslab With an - optional set of predicates and an optional - set of parameters, which used with predicates. - You can read call chan and predicate examples - from https://github.com/chaos-mesh/bpfki/tree/develop/examples - to learn more. If no special call chain, just - keep Callchain empty, which means it will - fail at any call chain with slab alloc (eg: - kmalloc).' - items: - description: Frame defines the function signature - and predicate in function's body - properties: - funcname: - description: Funcname can be find from - kernel source or `/proc/kallsyms`, such - as `ext4_mount` - type: string - parameters: - description: Parameters is used with predicate, - for example, if you want to inject slab - error in `d_alloc_parallel(struct dentry - *parent, const struct qstr *name)` with - a special name `bananas`, you need to - set it to `struct dentry *parent, const - struct qstr *name` otherwise omit it. - type: string - predicate: - description: Predicate will access the - arguments of this Frame, example with - Parameters's, you can set it to `STRNCMP(name->name, - "bananas", 8)` to make inject only with - it, or omit it to inject for all d_alloc_parallel - call chain. - type: string - type: object - type: array - failtype: - description: 'FailType indicates what to fail, - can be set to ''0'' / ''1'' / ''2'' If `0`, - indicates slab to fail (should_failslab) If - `1`, indicates alloc_page to fail (should_fail_alloc_page) - If `2`, indicates bio to fail (should_fail_bio) - You can read: 1. https://www.kernel.org/doc/html/latest/fault-injection/fault-injection.html 2. - http://github.com/iovisor/bcc/blob/master/tools/inject_example.txt - to learn more' - format: int32 - maximum: 2 - minimum: 0 - type: integer - headers: - description: 'Headers indicates the appropriate - kernel headers you need. Eg: "linux/mmzone.h", - "linux/blkdev.h" and so on' - items: - type: string - type: array - probability: - description: Probability indicates the fails - with probability. If you want 1%, please set - this field with 1. - format: int32 - maximum: 100 - minimum: 0 - type: integer - times: - description: Times indicates the max times of - fails. - format: int32 - minimum: 0 - type: integer + objects must belong to these nodes. + items: + type: string + type: array + podPhaseSelectors: + description: 'PodPhaseSelectors is a set of + condition of a pod at the current time. supported + value: Pending / Running / Succeeded / Failed + / Unknown' + items: + type: string + type: array + pods: + additionalProperties: + items: + type: string + type: array + description: Pods is a map of string keys and + a set values that used to select pods. The + key defines the namespace which pods belong, + and the each values is a set of pod names. + type: object + type: object + value: + description: Value is required when the mode is + set to `FixedPodMode` / `FixedPercentPodMod` / + `RandomMaxPercentPodMod`. If `FixedPodMode`, provide + an integer of pods to do chaos action. If `FixedPercentPodMod`, + provide a number from 0-100 to specify the percent + of pods the server can do chaos action. IF `RandomMaxPercentPodMod`, provide + a number from 0-100 to specify the max percent + of pods to do chaos action + type: string + required: + - action + - mode + - selector + type: object + schedule: + description: Schedule describe the Schedule(describing + scheduled chaos) to be injected with chaos nodes. + Only used when Type is TypeSchedule. + properties: + awsChaos: + description: AwsChaosSpec is the content of the + specification for an AwsChaos + properties: + action: + description: 'Action defines the specific aws + chaos action. Supported action: ec2-stop / + ec2-restart / detach-volume Default action: + ec2-stop' + enum: + - ec2-stop + - ec2-restart + - detach-volume + type: string + awsRegion: + description: AwsRegion defines the region of + aws. + type: string + deviceName: + description: DeviceName indicates the name of + the device. Needed in detach-volume. + type: string + duration: + description: Duration represents the duration + of the chaos action. + type: string + ec2Instance: + description: Ec2Instance indicates the ID of + the ec2 instance. + type: string + endpoint: + description: Endpoint indicates the endpoint + of the aws server. Just used it in test now. + type: string + secretName: + description: SecretName defines the name of + kubernetes secret. + type: string + volumeID: + description: EbsVolume indicates the ID of the + EBS volume. Needed in detach-volume. + type: string required: - - failtype + - action + - awsRegion + - ec2Instance type: object - mode: - description: 'Mode defines the mode to run chaos - action. Supported mode: one / all / fixed / fixed-percent - / random-max-percent' + concurrencyPolicy: enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent + - Forbid + - Allow type: string - selector: - description: Selector is used to select pods that - are used to inject chaos action. + dnsChaos: + description: DNSChaosSpec defines the desired state + of DNSChaos properties: - annotationSelectors: - additionalProperties: + action: + description: 'Action defines the specific DNS + chaos action. Supported action: error, random + Default action: error' + enum: + - error + - random + type: string + containerNames: + description: ContainerNames indicates list of + the name of affected container. If not set, + all containers will be injected + items: type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list - of selectors based on set-based label expressions. + type: array + duration: + description: Duration represents the duration + of the chaos action + type: string + mode: + description: 'Mode defines the mode to run chaos + action. Supported mode: one / all / fixed + / fixed-percent / random-max-percent' + enum: + - one + - all + - fixed + - fixed-percent + - random-max-percent + type: string + patterns: + description: "Choose which domain names to take + effect, support the placeholder ? and wildcard + *, or the Specified domain name. Note: 1. + The wildcard * must be at the end of the string. + For example, chaos-*.org is invalid. 2. + if the patterns is empty, will take effect + on all the domain names. For example: \t\tThe + value is [\"google.com\", \"github.*\", \"chaos-mes?.org\"], + \t\twill take effect on \"google.com\", \"github.com\" + and \"chaos-mesh.org\"" items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. + type: string + type: array + selector: + description: Selector is used to select pods + that are used to inject chaos action. + properties: + annotationSelectors: + additionalProperties: type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. + description: Map of string keys and values + that can be used to select objects. A + selector based on annotations. + type: object + expressionSelectors: + description: a slice of label selector expressions + that can be used to select objects. A + list of selectors based on set-based label + expressions. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents a + key's relationship to a set of values. + Valid operators are In, NotIn, Exists + and DoesNotExist. + type: string + values: + description: values is an array of + string values. If the operator is + In or NotIn, the values array must + be non-empty. If the operator is + Exists or DoesNotExist, the values + array must be empty. This array + is replaced during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + fieldSelectors: + additionalProperties: + type: string + description: Map of string keys and values + that can be used to select objects. A + selector based on fields. + type: object + labelSelectors: + additionalProperties: + type: string + description: Map of string keys and values + that can be used to select objects. A + selector based on labels. + type: object + namespaces: + description: Namespaces is a set of namespace + to which objects belong. + items: + type: string + type: array + nodeSelectors: + additionalProperties: + type: string + description: Map of string keys and values + that can be used to select nodes. Selector + which must match a node's labels, and + objects must belong to these selected + nodes. + type: object + nodes: + description: Nodes is a set of node name + and objects must belong to these nodes. + items: + type: string + type: array + podPhaseSelectors: + description: 'PodPhaseSelectors is a set + of condition of a pod at the current time. + supported value: Pending / Running / Succeeded + / Failed / Unknown' + items: type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. This - array is replaced during a strategic - merge patch. + type: array + pods: + additionalProperties: items: type: string type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which - must match a node's labels, and objects must - belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and - objects must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of - condition of a pod at the current time. supported - value: Pending / Running / Succeeded / Failed - / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and - a set values that used to select pods. The - key defines the namespace which pods belong, - and the each values is a set of pod names. + description: Pods is a map of string keys + and a set values that used to select pods. + The key defines the namespace which pods + belong, and the each values is a set of + pod names. + type: object type: object - type: object - value: - description: Value is required when the mode is - set to `FixedPodMode` / `FixedPercentPodMod` / - `RandomMaxPercentPodMod`. If `FixedPodMode`, provide - an integer of pods to do chaos action. If `FixedPercentPodMod`, - provide a number from 0-100 to specify the percent - of pods the server can do chaos action. IF `RandomMaxPercentPodMod`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action - type: string - required: - - failKernRequest - - mode - - selector - type: object - name: - type: string - networkChaos: - description: NetworkChaosSpec defines the desired state - of NetworkChaos - properties: - action: - description: 'Action defines the specific network - chaos action. Supported action: partition, netem, - delay, loss, duplicate, corrupt Default action: - delay' - enum: - - netem - - delay - - loss - - duplicate - - corrupt - - partition - - bandwidth - type: string - bandwidth: - description: Bandwidth represents the detail about - bandwidth control action - properties: - buffer: - description: Buffer is the maximum amount of - bytes that tokens can be available for instantaneously. - format: int32 - minimum: 1 - type: integer - limit: - description: Limit is the number of bytes that - can be queued waiting for tokens to become - available. - format: int32 - minimum: 1 - type: integer - minburst: - description: Minburst specifies the size of - the peakrate bucket. For perfect accuracy, - should be set to the MTU of the interface. If - a peakrate is needed, but some burstiness - is acceptable, this size can be raised. A - 3000 byte minburst allows around 3mbit/s of - peakrate, given 1000 byte packets. - format: int32 - minimum: 0 - type: integer - peakrate: - description: Peakrate is the maximum depletion - rate of the bucket. The peakrate does not - need to be set, it is only necessary if perfect - millisecond timescale shaping is required. - format: int64 - minimum: 0 - type: integer - rate: - description: Rate is the speed knob. Allows - bps, kbps, mbps, gbps, tbps unit. bps means - bytes per second. + value: + description: Value is required when the mode + is set to `FixedPodMode` / `FixedPercentPodMod` + / `RandomMaxPercentPodMod`. If `FixedPodMode`, + provide an integer of pods to do chaos action. + If `FixedPercentPodMod`, provide a number + from 0-100 to specify the percent of pods + the server can do chaos action. IF `RandomMaxPercentPodMod`, provide + a number from 0-100 to specify the max percent + of pods to do chaos action type: string required: - - buffer - - limit - - rate + - action + - mode + - selector type: object - corrupt: - description: Corrupt represents the detail about - corrupt action + gcpChaos: + description: GcpChaosSpec is the content of the + specification for a GcpChaos properties: - correlation: + action: + description: 'Action defines the specific gcp + chaos action. Supported action: node-stop + / node-reset / disk-loss Default action: node-stop' + enum: + - node-stop + - node-reset + - disk-loss type: string - corrupt: + deviceNames: + description: The device name of disks to detach. + Needed in disk-loss. + items: + type: string + type: array + duration: + description: Duration represents the duration + of the chaos action. + type: string + instance: + description: Instance defines the name of the + instance + type: string + project: + description: Project defines the name of gcp + project. + type: string + secretName: + description: SecretName defines the name of + kubernetes secret. It is used for GCP credentials. + type: string + zone: + description: Zone defines the zone of gcp project. type: string required: - - correlation - - corrupt + - action + - instance + - project + - zone type: object - delay: - description: Delay represents the detail about delay - action + historyLimit: + minimum: 1 + type: integer + httpChaos: properties: - correlation: + abort: + description: Abort is a rule to abort a http + session. + type: boolean + code: + description: Code is a rule to select target + by http status code in response. + format: int32 + type: integer + delay: + description: Delay represents the delay of the + target request/response. A duration string + is a possibly unsigned sequence of decimal + numbers, each with optional fraction and a + unit suffix, such as "300ms", "2h45m". Valid + time units are "ns", "us" (or "µs"), "ms", + "s", "m", "h". type: string - jitter: + duration: + description: Duration represents the duration + of the chaos action. + type: string + method: + description: Method is a rule to select target + by http method in request. + type: string + mode: + description: 'Mode defines the mode to run chaos + action. Supported mode: one / all / fixed + / fixed-percent / random-max-percent' + enum: + - one + - all + - fixed + - fixed-percent + - random-max-percent type: string - latency: + patch: + description: Patch is a rule to patch some contents + in target. + properties: + body: + description: Body is a rule to patch message + body of target. + properties: + type: + description: Type represents the patch + type, only support `JSON` as [merge + patch json](https://tools.ietf.org/html/rfc7396) + currently. + type: string + value: + description: Value is the patch contents. + type: string + required: + - type + - value + type: object + headers: + description: 'Headers is a rule to append + http headers of target. For example: `[["Set-Cookie", + ""], ["Set-Cookie", ""]]`.' + items: + items: + type: string + type: array + type: array + queries: + description: 'Queries is a rule to append + uri queries of target(Request only). For + example: `[["foo", "bar"], ["foo", "unknown"]]`.' + items: + items: + type: string + type: array + type: array + type: object + path: + description: Path is a rule to select target + by uri path in http request. type: string - reorder: - description: ReorderSpec defines details of - packet reorder. + port: + description: Port represents the target port + to be proxy of. + format: int32 + type: integer + replace: + description: Replace is a rule to replace some + contents in target. properties: - correlation: + body: + description: Body is a rule to replace http + message body in target. + format: byte type: string - gap: + code: + description: Code is a rule to replace http + status code in response. + format: int32 type: integer - reorder: + headers: + additionalProperties: + type: string + description: Headers is a rule to replace + http headers of target. The key-value + pairs represent header name and header + value pairs. + type: object + method: + description: Method is a rule to replace + http method in request. type: string - required: - - correlation - - gap - - reorder + path: + description: Path is rule to to replace + uri path in http request. + type: string + queries: + additionalProperties: + type: string + description: 'Queries is a rule to replace + uri queries in http request. For example, + with value `{ "foo": "unknown" }`, the + `/?foo=bar` will be altered to `/?foo=unknown`,' + type: object type: object - required: - - latency - type: object - direction: - description: Direction represents the direction, - this applies on netem and network partition action - enum: - - to - - from - - both - - "" - type: string - duplicate: - description: DuplicateSpec represents the detail - about loss action - properties: - correlation: - type: string - duplicate: - type: string - required: - - correlation - - duplicate - type: object - duration: - description: Duration represents the duration of - the chaos action - type: string - externalTargets: - description: ExternalTargets represents network - targets outside k8s - items: - type: string - type: array - loss: - description: Loss represents the detail about loss - action - properties: - correlation: - type: string - loss: - type: string - required: - - correlation - - loss - type: object - mode: - description: 'Mode defines the mode to run chaos - action. Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - selector: - description: Selector is used to select pods that - are used to inject chaos action. - properties: - annotationSelectors: + request_headers: additionalProperties: type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on annotations. + description: RequestHeaders is a rule to select + target by http headers in request. The key-value + pairs represent header name and header value + pairs. type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list - of selectors based on set-based label expressions. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. + response_headers: + additionalProperties: + type: string + description: ResponseHeaders is a rule to select + target by http headers in response. The key-value + pairs represent header name and header value + pairs. + type: object + selector: + description: Selector is used to select pods + that are used to inject chaos action. + properties: + annotationSelectors: + additionalProperties: + type: string + description: Map of string keys and values + that can be used to select objects. A + selector based on annotations. + type: object + expressionSelectors: + description: a slice of label selector expressions + that can be used to select objects. A + list of selectors based on set-based label + expressions. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents a + key's relationship to a set of values. + Valid operators are In, NotIn, Exists + and DoesNotExist. + type: string + values: + description: values is an array of + string values. If the operator is + In or NotIn, the values array must + be non-empty. If the operator is + Exists or DoesNotExist, the values + array must be empty. This array + is replaced during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + fieldSelectors: + additionalProperties: + type: string + description: Map of string keys and values + that can be used to select objects. A + selector based on fields. + type: object + labelSelectors: + additionalProperties: + type: string + description: Map of string keys and values + that can be used to select objects. A + selector based on labels. + type: object + namespaces: + description: Namespaces is a set of namespace + to which objects belong. + items: + type: string + type: array + nodeSelectors: + additionalProperties: type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. + description: Map of string keys and values + that can be used to select nodes. Selector + which must match a node's labels, and + objects must belong to these selected + nodes. + type: object + nodes: + description: Nodes is a set of node name + and objects must belong to these nodes. + items: type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. This - array is replaced during a strategic - merge patch. + type: array + podPhaseSelectors: + description: 'PodPhaseSelectors is a set + of condition of a pod at the current time. + supported value: Pending / Running / Succeeded + / Failed / Unknown' + items: + type: string + type: array + pods: + additionalProperties: items: type: string type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on labels. + description: Pods is a map of string keys + and a set values that used to select pods. + The key defines the namespace which pods + belong, and the each values is a set of + pod names. + type: object type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which - must match a node's labels, and objects must - belong to these selected nodes. + target: + description: Target is the object to be selected + and injected. + enum: + - Request + - Response + type: string + value: + description: Value is required when the mode + is set to `FixedPodMode` / `FixedPercentPodMod` + / `RandomMaxPercentPodMod`. If `FixedPodMode`, + provide an integer of pods to do chaos action. + If `FixedPercentPodMod`, provide a number + from 0-100 to specify the percent of pods + the server can do chaos action. IF `RandomMaxPercentPodMod`, provide + a number from 0-100 to specify the max percent + of pods to do chaos action + type: string + required: + - mode + - selector + - target + type: object + ioChaos: + description: IOChaosSpec defines the desired state + of IOChaos + properties: + action: + description: 'Action defines the specific pod + chaos action. Supported action: latency / + fault / attrOverride / mistake' + enum: + - latency + - fault + - attrOverride + - mistake + type: string + attr: + description: Attr defines the overrided attribution + properties: + atime: + description: Timespec represents a time + properties: + nsec: + format: int64 + type: integer + sec: + format: int64 + type: integer + required: + - nsec + - sec + type: object + blocks: + format: int64 + type: integer + ctime: + description: Timespec represents a time + properties: + nsec: + format: int64 + type: integer + sec: + format: int64 + type: integer + required: + - nsec + - sec + type: object + gid: + format: int32 + type: integer + ino: + format: int64 + type: integer + kind: + description: FileType represents type of + a file + type: string + mtime: + description: Timespec represents a time + properties: + nsec: + format: int64 + type: integer + sec: + format: int64 + type: integer + required: + - nsec + - sec + type: object + nlink: + format: int32 + type: integer + perm: + type: integer + rdev: + format: int32 + type: integer + size: + format: int64 + type: integer + uid: + format: int32 + type: integer type: object - nodes: - description: Nodes is a set of node name and - objects must belong to these nodes. + containerNames: + description: ContainerNames indicates list of + the name of affected container. If not set, + all containers will be injected items: type: string type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of - condition of a pod at the current time. supported - value: Pending / Running / Succeeded / Failed - / Unknown' + delay: + description: Delay defines the value of I/O + chaos action delay. A delay string is a possibly + signed sequence of decimal numbers, each with + optional fraction and a unit suffix, such + as "300ms". Valid time units are "ns", "us" + (or "µs"), "ms", "s", "m", "h". + type: string + duration: + description: Duration represents the duration + of the chaos action. It is required when the + action is `PodFailureAction`. A duration string + is a possibly signed sequence of decimal numbers, + each with optional fraction and a unit suffix, + such as "300ms", "-1.5h" or "2h45m". Valid + time units are "ns", "us" (or "µs"), "ms", + "s", "m", "h". + type: string + errno: + description: 'Errno defines the error code that + returned by I/O action. refer to: https://www-numi.fnal.gov/offline_software/srt_public_context/WebDocs/Errors/unix_system_errors.html' + format: int32 + type: integer + methods: + description: 'Methods defines the I/O methods + for injecting I/O chaos action. default: all + I/O methods.' items: type: string type: array - pods: - additionalProperties: - items: + mistake: + description: Mistake defines what types of incorrectness + are injected to IO operations + properties: + filling: + description: Filling determines what is + filled in the miskate data. + enum: + - zero + - random type: string - type: array - description: Pods is a map of string keys and - a set values that used to select pods. The - key defines the namespace which pods belong, - and the each values is a set of pod names. + maxLength: + description: Max length of each wrong data + segment in bytes + format: int64 + minimum: 1 + type: integer + maxOccurrences: + description: There will be [1, MaxOccurrences] + segments of wrong data. + format: int64 + minimum: 1 + type: integer type: object - type: object - target: - description: Target represents network target, this - applies on netem and network partition action - properties: mode: description: 'Mode defines the mode to run chaos action. Supported mode: one / all / fixed @@ -14994,6 +18611,15 @@ spec: - fixed-percent - random-max-percent type: string + path: + description: Path defines the path of files + for injecting I/O chaos action. + type: string + percent: + description: 'Percent defines the percentage + of injection errors and provides a number + from 0-100. default: 100.' + type: integer selector: description: Selector is used to select pods that are used to inject chaos action. @@ -15080,286 +18706,63 @@ spec: type: array podPhaseSelectors: description: 'PodPhaseSelectors is a set - of condition of a pod at the current time. - supported value: Pending / Running / Succeeded - / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys - and a set values that used to select pods. - The key defines the namespace which pods - belong, and the each values is a set of - pod names. - type: object - type: object - value: - description: Value is required when the mode - is set to `FixedPodMode` / `FixedPercentPodMod` - / `RandomMaxPercentPodMod`. If `FixedPodMode`, - provide an integer of pods to do chaos action. - If `FixedPercentPodMod`, provide a number - from 0-100 to specify the percent of pods - the server can do chaos action. IF `RandomMaxPercentPodMod`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action - type: string - required: - - mode - - selector - type: object - value: - description: Value is required when the mode is - set to `FixedPodMode` / `FixedPercentPodMod` / - `RandomMaxPercentPodMod`. If `FixedPodMode`, provide - an integer of pods to do chaos action. If `FixedPercentPodMod`, - provide a number from 0-100 to specify the percent - of pods the server can do chaos action. IF `RandomMaxPercentPodMod`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action - type: string - required: - - action - - mode - - selector - type: object - podChaos: - description: PodChaosSpec defines the attributes that - a user creates on a chaos experiment about pods. - properties: - action: - description: 'Action defines the specific pod chaos - action. Supported action: pod-kill / pod-failure - / container-kill Default action: pod-kill' - enum: - - pod-kill - - pod-failure - - container-kill - type: string - containerNames: - description: ContainerNames indicates list of the - name of affected container. If not set, all containers - will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of - the chaos action. It is required when the action - is `PodFailureAction`. A duration string is a - possibly signed sequence of decimal numbers, each - with optional fraction and a unit suffix, such - as "300ms", "-1.5h" or "2h45m". Valid time units - are "ns", "us" (or "µs"), "ms", "s", "m", "h". - type: string - gracePeriod: - description: GracePeriod is used in pod-kill action. - It represents the duration in seconds before the - pod should be deleted. Value must be non-negative - integer. The default value is zero that indicates - delete immediately. - format: int64 - minimum: 0 - type: integer - mode: - description: 'Mode defines the mode to run chaos - action. Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - selector: - description: Selector is used to select pods that - are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list - of selectors based on set-based label expressions. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. This - array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which - must match a node's labels, and objects must - belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and - objects must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of - condition of a pod at the current time. supported - value: Pending / Running / Succeeded / Failed - / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and - a set values that used to select pods. The - key defines the namespace which pods belong, - and the each values is a set of pod names. - type: object - type: object - value: - description: Value is required when the mode is - set to `FixedPodMode` / `FixedPercentPodMod` / - `RandomMaxPercentPodMod`. If `FixedPodMode`, provide - an integer of pods to do chaos action. If `FixedPercentPodMod`, - provide a number from 0-100 to specify the percent - of pods the server can do chaos action. IF `RandomMaxPercentPodMod`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action - type: string - required: - - action - - mode - - selector - type: object - schedule: - description: ChaosOnlyScheduleSpec is very similar with - ScheduleSpec, but it could not schedule Workflow because - we could not resolve nested CRD now - properties: - awsChaos: - description: AwsChaosSpec is the content of the - specification for an AwsChaos - properties: - action: - description: 'Action defines the specific aws - chaos action. Supported action: ec2-stop / - ec2-restart / detach-volume Default action: - ec2-stop' - enum: - - ec2-stop - - ec2-restart - - detach-volume - type: string - awsRegion: - description: AwsRegion defines the region of - aws. - type: string - deviceName: - description: DeviceName indicates the name of - the device. Needed in detach-volume. - type: string - duration: - description: Duration represents the duration - of the chaos action. - type: string - ec2Instance: - description: Ec2Instance indicates the ID of - the ec2 instance. - type: string - endpoint: - description: Endpoint indicates the endpoint - of the aws server. Just used it in test now. - type: string - secretName: - description: SecretName defines the name of - kubernetes secret. + of condition of a pod at the current time. + supported value: Pending / Running / Succeeded + / Failed / Unknown' + items: + type: string + type: array + pods: + additionalProperties: + items: + type: string + type: array + description: Pods is a map of string keys + and a set values that used to select pods. + The key defines the namespace which pods + belong, and the each values is a set of + pod names. + type: object + type: object + value: + description: Value is required when the mode + is set to `FixedPodMode` / `FixedPercentPodMod` + / `RandomMaxPercentPodMod`. If `FixedPodMode`, + provide an integer of pods to do chaos action. + If `FixedPercentPodMod`, provide a number + from 0-100 to specify the percent of pods + the server can do chaos action. IF `RandomMaxPercentPodMod`, provide + a number from 0-100 to specify the max percent + of pods to do chaos action type: string - volumeID: - description: EbsVolume indicates the ID of the - EBS volume. Needed in detach-volume. + volumePath: + description: VolumePath represents the mount + path of injected volume type: string required: - action - - awsRegion - - ec2Instance + - mode + - selector + - volumePath type: object - concurrencyPolicy: - enum: - - Forbid - - Allow - type: string - dnsChaos: - description: DNSChaosSpec defines the desired state - of DNSChaos + jvmChaos: + description: JVMChaosSpec defines the desired state + of JVMChaos properties: action: - description: 'Action defines the specific DNS - chaos action. Supported action: error, random - Default action: error' + description: 'Action defines the specific jvm + chaos action. Supported action: delay;return;script;cfl;oom;ccf;tce;cpf;tde;tpf' enum: - - error - - random + - delay + - return + - script + - cfl + - oom + - ccf + - tce + - cpf + - tde + - tpf type: string containerNames: description: ContainerNames indicates list of @@ -15372,6 +18775,17 @@ spec: description: Duration represents the duration of the chaos action type: string + flags: + additionalProperties: + type: string + description: Flags represents the flags of action + type: object + matchers: + additionalProperties: + type: string + description: Matchers represents the matching + rules for the target + type: object mode: description: 'Mode defines the mode to run chaos action. Supported mode: one / all / fixed @@ -15383,20 +18797,6 @@ spec: - fixed-percent - random-max-percent type: string - patterns: - description: "Choose which domain names to take - effect, support the placeholder ? and wildcard - *, or the Specified domain name. Note: 1. - The wildcard * must be at the end of the string. - For example, chaos-*.org is invalid. 2. - if the patterns is empty, will take effect - on all the domain names. For example: \t\tThe - value is [\"google.com\", \"github.*\", \"chaos-mes?.org\"], - \t\twill take effect on \"google.com\", \"github.com\" - and \"chaos-mesh.org\"" - items: - type: string - type: array selector: description: Selector is used to select pods that are used to inject chaos action. @@ -15501,6 +18901,24 @@ spec: pod names. type: object type: object + target: + description: 'Target defines the specific jvm + chaos target. Supported target: servlet;psql;jvm;jedis;http;dubbo;rocketmq;tars;mysql;druid;redisson;rabbitmq;mongodb' + enum: + - servlet + - psql + - jvm + - jedis + - http + - dubbo + - rocketmq + - tars + - mysql + - druid + - redisson + - rabbitmq + - mongodb + type: string value: description: Value is required when the mode is set to `FixedPodMode` / `FixedPercentPodMod` @@ -15516,82 +18934,101 @@ spec: - action - mode - selector + - target type: object - gcpChaos: - description: GcpChaosSpec is the content of the - specification for a GcpChaos - properties: - action: - description: 'Action defines the specific gcp - chaos action. Supported action: node-stop - / node-reset / disk-loss Default action: node-stop' - enum: - - node-stop - - node-reset - - disk-loss - type: string - deviceNames: - description: The device name of disks to detach. - Needed in disk-loss. - items: - type: string - type: array - duration: - description: Duration represents the duration - of the chaos action. - type: string - instance: - description: Instance defines the name of the - instance - type: string - project: - description: Project defines the name of gcp - project. - type: string - secretName: - description: SecretName defines the name of - kubernetes secret. It is used for GCP credentials. - type: string - zone: - description: Zone defines the zone of gcp project. - type: string - required: - - action - - instance - - project - - zone - type: object - historyLimit: - minimum: 1 - type: integer - httpChaos: + kernelChaos: + description: KernelChaosSpec defines the desired + state of KernelChaos properties: - abort: - description: Abort is a rule to abort a http - session. - type: boolean - code: - description: Code is a rule to select target - by http status code in response. - format: int32 - type: integer - delay: - description: Delay represents the delay of the - target request/response. A duration string - is a possibly unsigned sequence of decimal - numbers, each with optional fraction and a - unit suffix, such as "300ms", "2h45m". Valid - time units are "ns", "us" (or "µs"), "ms", - "s", "m", "h". - type: string duration: description: Duration represents the duration - of the chaos action. - type: string - method: - description: Method is a rule to select target - by http method in request. + of the chaos action type: string + failKernRequest: + description: FailKernRequest defines the request + of kernel injection + properties: + callchain: + description: 'Callchain indicate a special + call chain, such as: ext4_mount -> + mount_subtree -> ... -> + should_failslab With an optional set of + predicates and an optional set of parameters, + which used with predicates. You can read + call chan and predicate examples from + https://github.com/chaos-mesh/bpfki/tree/develop/examples + to learn more. If no special call chain, + just keep Callchain empty, which means + it will fail at any call chain with slab + alloc (eg: kmalloc).' + items: + description: Frame defines the function + signature and predicate in function's + body + properties: + funcname: + description: Funcname can be find + from kernel source or `/proc/kallsyms`, + such as `ext4_mount` + type: string + parameters: + description: Parameters is used with + predicate, for example, if you want + to inject slab error in `d_alloc_parallel(struct + dentry *parent, const struct qstr + *name)` with a special name `bananas`, + you need to set it to `struct dentry + *parent, const struct qstr *name` + otherwise omit it. + type: string + predicate: + description: Predicate will access + the arguments of this Frame, example + with Parameters's, you can set it + to `STRNCMP(name->name, "bananas", + 8)` to make inject only with it, + or omit it to inject for all d_alloc_parallel + call chain. + type: string + type: object + type: array + failtype: + description: 'FailType indicates what to + fail, can be set to ''0'' / ''1'' / ''2'' + If `0`, indicates slab to fail (should_failslab) + If `1`, indicates alloc_page to fail (should_fail_alloc_page) + If `2`, indicates bio to fail (should_fail_bio) + You can read: 1. https://www.kernel.org/doc/html/latest/fault-injection/fault-injection.html 2. + http://github.com/iovisor/bcc/blob/master/tools/inject_example.txt + to learn more' + format: int32 + maximum: 2 + minimum: 0 + type: integer + headers: + description: 'Headers indicates the appropriate + kernel headers you need. Eg: "linux/mmzone.h", + "linux/blkdev.h" and so on' + items: + type: string + type: array + probability: + description: Probability indicates the fails + with probability. If you want 1%, please + set this field with 1. + format: int32 + maximum: 100 + minimum: 0 + type: integer + times: + description: Times indicates the max times + of fails. + format: int32 + minimum: 0 + type: integer + required: + - failtype + type: object mode: description: 'Mode defines the mode to run chaos action. Supported mode: one / all / fixed @@ -15603,111 +19040,6 @@ spec: - fixed-percent - random-max-percent type: string - patch: - description: Patch is a rule to patch some contents - in target. - properties: - body: - description: Body is a rule to patch message - body of target. - properties: - type: - description: Type represents the patch - type, only support `JSON` as [merge - patch json](https://tools.ietf.org/html/rfc7396) - currently. - type: string - value: - description: Value is the patch contents. - type: string - required: - - type - - value - type: object - headers: - description: 'Headers is a rule to append - http headers of target. For example: `[["Set-Cookie", - ""], ["Set-Cookie", ""]]`.' - items: - items: - type: string - type: array - type: array - queries: - description: 'Queries is a rule to append - uri queries of target(Request only). For - example: `[["foo", "bar"], ["foo", "unknown"]]`.' - items: - items: - type: string - type: array - type: array - type: object - path: - description: Path is a rule to select target - by uri path in http request. - type: string - port: - description: Port represents the target port - to be proxy of. - format: int32 - type: integer - replace: - description: Replace is a rule to replace some - contents in target. - properties: - body: - description: Body is a rule to replace http - message body in target. - format: byte - type: string - code: - description: Code is a rule to replace http - status code in response. - format: int32 - type: integer - headers: - additionalProperties: - type: string - description: Headers is a rule to replace - http headers of target. The key-value - pairs represent header name and header - value pairs. - type: object - method: - description: Method is a rule to replace - http method in request. - type: string - path: - description: Path is rule to to replace - uri path in http request. - type: string - queries: - additionalProperties: - type: string - description: 'Queries is a rule to replace - uri queries in http request. For example, - with value `{ "foo": "unknown" }`, the - `/?foo=bar` will be altered to `/?foo=unknown`,' - type: object - type: object - request_headers: - additionalProperties: - type: string - description: RequestHeaders is a rule to select - target by http headers in request. The key-value - pairs represent header name and header value - pairs. - type: object - response_headers: - additionalProperties: - type: string - description: ResponseHeaders is a rule to select - target by http headers in response. The key-value - pairs represent header name and header value - pairs. - type: object selector: description: Selector is used to select pods that are used to inject chaos action. @@ -15812,13 +19144,6 @@ spec: pod names. type: object type: object - target: - description: Target is the object to be selected - and injected. - enum: - - Request - - Response - type: string value: description: Value is required when the mode is set to `FixedPodMode` / `FixedPercentPodMod` @@ -15831,154 +19156,159 @@ spec: of pods to do chaos action type: string required: + - failKernRequest - mode - selector - - target type: object - ioChaos: - description: IOChaosSpec defines the desired state - of IOChaos + networkChaos: + description: NetworkChaosSpec defines the desired + state of NetworkChaos properties: action: - description: 'Action defines the specific pod - chaos action. Supported action: latency / - fault / attrOverride / mistake' + description: 'Action defines the specific network + chaos action. Supported action: partition, + netem, delay, loss, duplicate, corrupt Default + action: delay' enum: - - latency - - fault - - attrOverride - - mistake + - netem + - delay + - loss + - duplicate + - corrupt + - partition + - bandwidth type: string - attr: - description: Attr defines the overrided attribution + bandwidth: + description: Bandwidth represents the detail + about bandwidth control action properties: - atime: - description: Timespec represents a time - properties: - nsec: - format: int64 - type: integer - sec: - format: int64 - type: integer - required: - - nsec - - sec - type: object - blocks: - format: int64 + buffer: + description: Buffer is the maximum amount + of bytes that tokens can be available + for instantaneously. + format: int32 + minimum: 1 type: integer - ctime: - description: Timespec represents a time - properties: - nsec: - format: int64 - type: integer - sec: - format: int64 - type: integer - required: - - nsec - - sec - type: object - gid: + limit: + description: Limit is the number of bytes + that can be queued waiting for tokens + to become available. format: int32 + minimum: 1 type: integer - ino: + minburst: + description: Minburst specifies the size + of the peakrate bucket. For perfect accuracy, + should be set to the MTU of the interface. If + a peakrate is needed, but some burstiness + is acceptable, this size can be raised. + A 3000 byte minburst allows around 3mbit/s + of peakrate, given 1000 byte packets. + format: int32 + minimum: 0 + type: integer + peakrate: + description: Peakrate is the maximum depletion + rate of the bucket. The peakrate does + not need to be set, it is only necessary + if perfect millisecond timescale shaping + is required. format: int64 + minimum: 0 type: integer - kind: - description: FileType represents type of - a file + rate: + description: Rate is the speed knob. Allows + bps, kbps, mbps, gbps, tbps unit. bps + means bytes per second. type: string - mtime: - description: Timespec represents a time + required: + - buffer + - limit + - rate + type: object + corrupt: + description: Corrupt represents the detail about + corrupt action + properties: + correlation: + type: string + corrupt: + type: string + required: + - correlation + - corrupt + type: object + delay: + description: Delay represents the detail about + delay action + properties: + correlation: + type: string + jitter: + type: string + latency: + type: string + reorder: + description: ReorderSpec defines details + of packet reorder. properties: - nsec: - format: int64 - type: integer - sec: - format: int64 + correlation: + type: string + gap: type: integer + reorder: + type: string required: - - nsec - - sec + - correlation + - gap + - reorder type: object - nlink: - format: int32 - type: integer - perm: - type: integer - rdev: - format: int32 - type: integer - size: - format: int64 - type: integer - uid: - format: int32 - type: integer + required: + - latency type: object - containerNames: - description: ContainerNames indicates list of - the name of affected container. If not set, - all containers will be injected - items: - type: string - type: array - delay: - description: Delay defines the value of I/O - chaos action delay. A delay string is a possibly - signed sequence of decimal numbers, each with - optional fraction and a unit suffix, such - as "300ms". Valid time units are "ns", "us" - (or "µs"), "ms", "s", "m", "h". + direction: + description: Direction represents the direction, + this applies on netem and network partition + action + enum: + - to + - from + - both + - "" type: string + duplicate: + description: DuplicateSpec represents the detail + about loss action + properties: + correlation: + type: string + duplicate: + type: string + required: + - correlation + - duplicate + type: object duration: description: Duration represents the duration - of the chaos action. It is required when the - action is `PodFailureAction`. A duration string - is a possibly signed sequence of decimal numbers, - each with optional fraction and a unit suffix, - such as "300ms", "-1.5h" or "2h45m". Valid - time units are "ns", "us" (or "µs"), "ms", - "s", "m", "h". + of the chaos action type: string - errno: - description: 'Errno defines the error code that - returned by I/O action. refer to: https://www-numi.fnal.gov/offline_software/srt_public_context/WebDocs/Errors/unix_system_errors.html' - format: int32 - type: integer - methods: - description: 'Methods defines the I/O methods - for injecting I/O chaos action. default: all - I/O methods.' + externalTargets: + description: ExternalTargets represents network + targets outside k8s items: type: string type: array - mistake: - description: Mistake defines what types of incorrectness - are injected to IO operations + loss: + description: Loss represents the detail about + loss action properties: - filling: - description: Filling determines what is - filled in the miskate data. - enum: - - zero - - random + correlation: type: string - maxLength: - description: Max length of each wrong data - segment in bytes - format: int64 - minimum: 1 - type: integer - maxOccurrences: - description: There will be [1, MaxOccurrences] - segments of wrong data. - format: int64 - minimum: 1 - type: integer + loss: + type: string + required: + - correlation + - loss type: object mode: description: 'Mode defines the mode to run chaos @@ -15991,15 +19321,6 @@ spec: - fixed-percent - random-max-percent type: string - path: - description: Path defines the path of files - for injecting I/O chaos action. - type: string - percent: - description: 'Percent defines the percentage - of injection errors and provides a number - from 0-100. default: 100.' - type: integer selector: description: Selector is used to select pods that are used to inject chaos action. @@ -16104,6 +19425,144 @@ spec: pod names. type: object type: object + target: + description: Target represents network target, + this applies on netem and network partition + action + properties: + mode: + description: 'Mode defines the mode to run + chaos action. Supported mode: one / all + / fixed / fixed-percent / random-max-percent' + enum: + - one + - all + - fixed + - fixed-percent + - random-max-percent + type: string + selector: + description: Selector is used to select + pods that are used to inject chaos action. + properties: + annotationSelectors: + additionalProperties: + type: string + description: Map of string keys and + values that can be used to select + objects. A selector based on annotations. + type: object + expressionSelectors: + description: a slice of label selector + expressions that can be used to select + objects. A list of selectors based + on set-based label expressions. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label + key that the selector applies + to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. + This array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + fieldSelectors: + additionalProperties: + type: string + description: Map of string keys and + values that can be used to select + objects. A selector based on fields. + type: object + labelSelectors: + additionalProperties: + type: string + description: Map of string keys and + values that can be used to select + objects. A selector based on labels. + type: object + namespaces: + description: Namespaces is a set of + namespace to which objects belong. + items: + type: string + type: array + nodeSelectors: + additionalProperties: + type: string + description: Map of string keys and + values that can be used to select + nodes. Selector which must match a + node's labels, and objects must belong + to these selected nodes. + type: object + nodes: + description: Nodes is a set of node + name and objects must belong to these + nodes. + items: + type: string + type: array + podPhaseSelectors: + description: 'PodPhaseSelectors is a + set of condition of a pod at the current + time. supported value: Pending / Running + / Succeeded / Failed / Unknown' + items: + type: string + type: array + pods: + additionalProperties: + items: + type: string + type: array + description: Pods is a map of string + keys and a set values that used to + select pods. The key defines the namespace + which pods belong, and the each values + is a set of pod names. + type: object + type: object + value: + description: Value is required when the + mode is set to `FixedPodMode` / `FixedPercentPodMod` + / `RandomMaxPercentPodMod`. If `FixedPodMode`, + provide an integer of pods to do chaos + action. If `FixedPercentPodMod`, provide + a number from 0-100 to specify the percent + of pods the server can do chaos action. + IF `RandomMaxPercentPodMod`, provide + a number from 0-100 to specify the max + percent of pods to do chaos action + type: string + required: + - mode + - selector + type: object value: description: Value is required when the mode is set to `FixedPodMode` / `FixedPercentPodMod` @@ -16115,34 +19574,25 @@ spec: a number from 0-100 to specify the max percent of pods to do chaos action type: string - volumePath: - description: VolumePath represents the mount - path of injected volume - type: string required: - action - mode - selector - - volumePath type: object - jvmChaos: - description: JVMChaosSpec defines the desired state - of JVMChaos + podChaos: + description: PodChaosSpec defines the attributes + that a user creates on a chaos experiment about + pods. properties: action: - description: 'Action defines the specific jvm - chaos action. Supported action: delay;return;script;cfl;oom;ccf;tce;cpf;tde;tpf' + description: 'Action defines the specific pod + chaos action. Supported action: pod-kill / + pod-failure / container-kill Default action: + pod-kill' enum: - - delay - - return - - script - - cfl - - oom - - ccf - - tce - - cpf - - tde - - tpf + - pod-kill + - pod-failure + - container-kill type: string containerNames: description: ContainerNames indicates list of @@ -16153,19 +19603,23 @@ spec: type: array duration: description: Duration represents the duration - of the chaos action + of the chaos action. It is required when the + action is `PodFailureAction`. A duration string + is a possibly signed sequence of decimal numbers, + each with optional fraction and a unit suffix, + such as "300ms", "-1.5h" or "2h45m". Valid + time units are "ns", "us" (or "µs"), "ms", + "s", "m", "h". type: string - flags: - additionalProperties: - type: string - description: Flags represents the flags of action - type: object - matchers: - additionalProperties: - type: string - description: Matchers represents the matching - rules for the target - type: object + gracePeriod: + description: GracePeriod is used in pod-kill + action. It represents the duration in seconds + before the pod should be deleted. Value must + be non-negative integer. The default value + is zero that indicates delete immediately. + format: int64 + minimum: 0 + type: integer mode: description: 'Mode defines the mode to run chaos action. Supported mode: one / all / fixed @@ -16281,24 +19735,6 @@ spec: pod names. type: object type: object - target: - description: 'Target defines the specific jvm - chaos target. Supported target: servlet;psql;jvm;jedis;http;dubbo;rocketmq;tars;mysql;druid;redisson;rabbitmq;mongodb' - enum: - - servlet - - psql - - jvm - - jedis - - http - - dubbo - - rocketmq - - tars - - mysql - - druid - - redisson - - rabbitmq - - mongodb - type: string value: description: Value is required when the mode is set to `FixedPodMode` / `FixedPercentPodMod` @@ -16314,101 +19750,29 @@ spec: - action - mode - selector - - target type: object - kernelChaos: - description: KernelChaosSpec defines the desired - state of KernelChaos + schedule: + type: string + startingDeadlineSeconds: + format: int64 + minimum: 0 + nullable: true + type: integer + stressChaos: + description: StressChaosSpec defines the desired + state of StressChaos properties: + containerNames: + description: ContainerNames indicates list of + the name of affected container. If not set, + all containers will be injected + items: + type: string + type: array duration: description: Duration represents the duration of the chaos action type: string - failKernRequest: - description: FailKernRequest defines the request - of kernel injection - properties: - callchain: - description: 'Callchain indicate a special - call chain, such as: ext4_mount -> - mount_subtree -> ... -> - should_failslab With an optional set of - predicates and an optional set of parameters, - which used with predicates. You can read - call chan and predicate examples from - https://github.com/chaos-mesh/bpfki/tree/develop/examples - to learn more. If no special call chain, - just keep Callchain empty, which means - it will fail at any call chain with slab - alloc (eg: kmalloc).' - items: - description: Frame defines the function - signature and predicate in function's - body - properties: - funcname: - description: Funcname can be find - from kernel source or `/proc/kallsyms`, - such as `ext4_mount` - type: string - parameters: - description: Parameters is used with - predicate, for example, if you want - to inject slab error in `d_alloc_parallel(struct - dentry *parent, const struct qstr - *name)` with a special name `bananas`, - you need to set it to `struct dentry - *parent, const struct qstr *name` - otherwise omit it. - type: string - predicate: - description: Predicate will access - the arguments of this Frame, example - with Parameters's, you can set it - to `STRNCMP(name->name, "bananas", - 8)` to make inject only with it, - or omit it to inject for all d_alloc_parallel - call chain. - type: string - type: object - type: array - failtype: - description: 'FailType indicates what to - fail, can be set to ''0'' / ''1'' / ''2'' - If `0`, indicates slab to fail (should_failslab) - If `1`, indicates alloc_page to fail (should_fail_alloc_page) - If `2`, indicates bio to fail (should_fail_bio) - You can read: 1. https://www.kernel.org/doc/html/latest/fault-injection/fault-injection.html 2. - http://github.com/iovisor/bcc/blob/master/tools/inject_example.txt - to learn more' - format: int32 - maximum: 2 - minimum: 0 - type: integer - headers: - description: 'Headers indicates the appropriate - kernel headers you need. Eg: "linux/mmzone.h", - "linux/blkdev.h" and so on' - items: - type: string - type: array - probability: - description: Probability indicates the fails - with probability. If you want 1%, please - set this field with 1. - format: int32 - maximum: 100 - minimum: 0 - type: integer - times: - description: Times indicates the max times - of fails. - format: int32 - minimum: 0 - type: integer - required: - - failtype - type: object mode: description: 'Mode defines the mode to run chaos action. Supported mode: one / all / fixed @@ -16524,6 +19888,73 @@ spec: pod names. type: object type: object + stressngStressors: + description: StressngStressors defines plenty + of stressors just like `Stressors` except + that it's an experimental feature and more + powerful. You can define stressors in `stress-ng` + (see also `man stress-ng`) dialect, however + not all of the supported stressors are well + tested. It maybe retired in later releases. + You should always use `Stressors` to define + the stressors and use this only when you want + more stressors unsupported by `Stressors`. + When both `StressngStressors` and `Stressors` + are defined, `StressngStressors` wins. + type: string + stressors: + description: Stressors defines plenty of stressors + supported to stress system components out. + You can use one or more of them to make up + various kinds of stresses. At least one of + the stressors should be specified. + properties: + cpu: + description: CPUStressor stresses CPU out + properties: + load: + description: Load specifies P percent + loading per CPU worker. 0 is effectively + a sleep (no load) and 100 is full + loading. + type: integer + options: + description: extend stress-ng options + items: + type: string + type: array + workers: + description: Workers specifies N workers + to apply the stressor. + type: integer + required: + - workers + type: object + memory: + description: MemoryStressor stresses virtual + memory out + properties: + options: + description: extend stress-ng options + items: + type: string + type: array + size: + description: Size specifies N bytes + consumed per vm worker, default is + the total available memory. One can + specify the size as % of total available + memory or in units of B, KB/KiB, MB/MiB, + GB/GiB, TB/TiB. + type: string + workers: + description: Workers specifies N workers + to apply the stressor. + type: integer + required: + - workers + type: object + type: object value: description: Value is required when the mode is set to `FixedPodMode` / `FixedPercentPodMod` @@ -16536,160 +19967,32 @@ spec: of pods to do chaos action type: string required: - - failKernRequest - mode - selector type: object - networkChaos: - description: NetworkChaosSpec defines the desired - state of NetworkChaos + timeChaos: + description: TimeChaosSpec defines the desired state + of TimeChaos properties: - action: - description: 'Action defines the specific network - chaos action. Supported action: partition, - netem, delay, loss, duplicate, corrupt Default - action: delay' - enum: - - netem - - delay - - loss - - duplicate - - corrupt - - partition - - bandwidth - type: string - bandwidth: - description: Bandwidth represents the detail - about bandwidth control action - properties: - buffer: - description: Buffer is the maximum amount - of bytes that tokens can be available - for instantaneously. - format: int32 - minimum: 1 - type: integer - limit: - description: Limit is the number of bytes - that can be queued waiting for tokens - to become available. - format: int32 - minimum: 1 - type: integer - minburst: - description: Minburst specifies the size - of the peakrate bucket. For perfect accuracy, - should be set to the MTU of the interface. If - a peakrate is needed, but some burstiness - is acceptable, this size can be raised. - A 3000 byte minburst allows around 3mbit/s - of peakrate, given 1000 byte packets. - format: int32 - minimum: 0 - type: integer - peakrate: - description: Peakrate is the maximum depletion - rate of the bucket. The peakrate does - not need to be set, it is only necessary - if perfect millisecond timescale shaping - is required. - format: int64 - minimum: 0 - type: integer - rate: - description: Rate is the speed knob. Allows - bps, kbps, mbps, gbps, tbps unit. bps - means bytes per second. - type: string - required: - - buffer - - limit - - rate - type: object - corrupt: - description: Corrupt represents the detail about - corrupt action - properties: - correlation: - type: string - corrupt: - type: string - required: - - correlation - - corrupt - type: object - delay: - description: Delay represents the detail about - delay action - properties: - correlation: - type: string - jitter: - type: string - latency: - type: string - reorder: - description: ReorderSpec defines details - of packet reorder. - properties: - correlation: - type: string - gap: - type: integer - reorder: - type: string - required: - - correlation - - gap - - reorder - type: object - required: - - latency - type: object - direction: - description: Direction represents the direction, - this applies on netem and network partition - action - enum: - - to - - from - - both - - "" - type: string - duplicate: - description: DuplicateSpec represents the detail - about loss action - properties: - correlation: - type: string - duplicate: - type: string - required: - - correlation - - duplicate - type: object + clockIds: + description: ClockIds defines all affected clock + id All available options are ["CLOCK_REALTIME","CLOCK_MONOTONIC","CLOCK_PROCESS_CPUTIME_ID","CLOCK_THREAD_CPUTIME_ID", + "CLOCK_MONOTONIC_RAW","CLOCK_REALTIME_COARSE","CLOCK_MONOTONIC_COARSE","CLOCK_BOOTTIME","CLOCK_REALTIME_ALARM", + "CLOCK_BOOTTIME_ALARM"] Default value is ["CLOCK_REALTIME"] + items: + type: string + type: array + containerNames: + description: ContainerNames indicates list of + the name of affected container. If not set, + all containers will be injected + items: + type: string + type: array duration: description: Duration represents the duration of the chaos action type: string - externalTargets: - description: ExternalTargets represents network - targets outside k8s - items: - type: string - type: array - loss: - description: Loss represents the detail about - loss action - properties: - correlation: - type: string - loss: - type: string - required: - - correlation - - loss - type: object mode: description: 'Mode defines the mode to run chaos action. Supported mode: one / all / fixed @@ -16792,1299 +20095,5664 @@ spec: / Failed / Unknown' items: type: string - type: array - pods: - additionalProperties: + type: array + pods: + additionalProperties: + items: + type: string + type: array + description: Pods is a map of string keys + and a set values that used to select pods. + The key defines the namespace which pods + belong, and the each values is a set of + pod names. + type: object + type: object + timeOffset: + description: TimeOffset defines the delta time + of injected program. It's a possibly signed + sequence of decimal numbers, such as "300ms", + "-1.5h" or "2h45m". Valid time units are "ns", + "us" (or "µs"), "ms", "s", "m", "h". + type: string + value: + description: Value is required when the mode + is set to `FixedPodMode` / `FixedPercentPodMod` + / `RandomMaxPercentPodMod`. If `FixedPodMode`, + provide an integer of pods to do chaos action. + If `FixedPercentPodMod`, provide a number + from 0-100 to specify the percent of pods + the server can do chaos action. IF `RandomMaxPercentPodMod`, provide + a number from 0-100 to specify the max percent + of pods to do chaos action + type: string + required: + - mode + - selector + - timeOffset + type: object + type: + description: 'TODO: use a custom type, as `TemplateType` + contains other possible values' + type: string + required: + - schedule + - type + type: object + stressChaos: + description: StressChaosSpec defines the desired state + of StressChaos + properties: + containerNames: + description: ContainerNames indicates list of the + name of affected container. If not set, all containers + will be injected + items: + type: string + type: array + duration: + description: Duration represents the duration of + the chaos action + type: string + mode: + description: 'Mode defines the mode to run chaos + action. Supported mode: one / all / fixed / fixed-percent + / random-max-percent' + enum: + - one + - all + - fixed + - fixed-percent + - random-max-percent + type: string + selector: + description: Selector is used to select pods that + are used to inject chaos action. + properties: + annotationSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select objects. A selector + based on annotations. + type: object + expressionSelectors: + description: a slice of label selector expressions + that can be used to select objects. A list + of selectors based on set-based label expressions. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. items: type: string type: array - description: Pods is a map of string keys - and a set values that used to select pods. - The key defines the namespace which pods - belong, and the each values is a set of - pod names. - type: object + required: + - key + - operator + type: object + type: array + fieldSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select objects. A selector + based on fields. type: object - target: - description: Target represents network target, - this applies on netem and network partition - action - properties: - mode: - description: 'Mode defines the mode to run - chaos action. Supported mode: one / all - / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent + labelSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select objects. A selector + based on labels. + type: object + namespaces: + description: Namespaces is a set of namespace + to which objects belong. + items: + type: string + type: array + nodeSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select nodes. Selector which + must match a node's labels, and objects must + belong to these selected nodes. + type: object + nodes: + description: Nodes is a set of node name and + objects must belong to these nodes. + items: + type: string + type: array + podPhaseSelectors: + description: 'PodPhaseSelectors is a set of + condition of a pod at the current time. supported + value: Pending / Running / Succeeded / Failed + / Unknown' + items: + type: string + type: array + pods: + additionalProperties: + items: type: string - selector: - description: Selector is used to select - pods that are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and - values that can be used to select - objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector - expressions that can be used to select - objects. A list of selectors based - on set-based label expressions. - items: - description: A label selector requirement - is a selector that contains values, - a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label - key that the selector applies - to. - type: string - operator: - description: operator represents - a key's relationship to a set - of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array - of string values. If the operator - is In or NotIn, the values array - must be non-empty. If the operator - is Exists or DoesNotExist, the - values array must be empty. - This array is replaced during - a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and - values that can be used to select - objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and - values that can be used to select - objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of - namespace to which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and - values that can be used to select - nodes. Selector which must match a - node's labels, and objects must belong - to these selected nodes. - type: object - nodes: - description: Nodes is a set of node - name and objects must belong to these - nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a - set of condition of a pod at the current - time. supported value: Pending / Running - / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string - keys and a set values that used to - select pods. The key defines the namespace - which pods belong, and the each values - is a set of pod names. - type: object - type: object - value: - description: Value is required when the - mode is set to `FixedPodMode` / `FixedPercentPodMod` - / `RandomMaxPercentPodMod`. If `FixedPodMode`, - provide an integer of pods to do chaos - action. If `FixedPercentPodMod`, provide - a number from 0-100 to specify the percent - of pods the server can do chaos action. - IF `RandomMaxPercentPodMod`, provide - a number from 0-100 to specify the max - percent of pods to do chaos action + type: array + description: Pods is a map of string keys and + a set values that used to select pods. The + key defines the namespace which pods belong, + and the each values is a set of pod names. + type: object + type: object + stressngStressors: + description: StressngStressors defines plenty of + stressors just like `Stressors` except that it's + an experimental feature and more powerful. You + can define stressors in `stress-ng` (see also + `man stress-ng`) dialect, however not all of the + supported stressors are well tested. It maybe + retired in later releases. You should always use + `Stressors` to define the stressors and use this + only when you want more stressors unsupported + by `Stressors`. When both `StressngStressors` + and `Stressors` are defined, `StressngStressors` + wins. + type: string + stressors: + description: Stressors defines plenty of stressors + supported to stress system components out. You + can use one or more of them to make up various + kinds of stresses. At least one of the stressors + should be specified. + properties: + cpu: + description: CPUStressor stresses CPU out + properties: + load: + description: Load specifies P percent loading + per CPU worker. 0 is effectively a sleep + (no load) and 100 is full loading. + type: integer + options: + description: extend stress-ng options + items: + type: string + type: array + workers: + description: Workers specifies N workers + to apply the stressor. + type: integer + required: + - workers + type: object + memory: + description: MemoryStressor stresses virtual + memory out + properties: + options: + description: extend stress-ng options + items: + type: string + type: array + size: + description: Size specifies N bytes consumed + per vm worker, default is the total available + memory. One can specify the size as % + of total available memory or in units + of B, KB/KiB, MB/MiB, GB/GiB, TB/TiB. type: string + workers: + description: Workers specifies N workers + to apply the stressor. + type: integer required: - - mode - - selector + - workers type: object - value: - description: Value is required when the mode - is set to `FixedPodMode` / `FixedPercentPodMod` - / `RandomMaxPercentPodMod`. If `FixedPodMode`, - provide an integer of pods to do chaos action. - If `FixedPercentPodMod`, provide a number - from 0-100 to specify the percent of pods - the server can do chaos action. IF `RandomMaxPercentPodMod`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action - type: string - required: - - action - - mode - - selector type: object - podChaos: - description: PodChaosSpec defines the attributes - that a user creates on a chaos experiment about - pods. + value: + description: Value is required when the mode is + set to `FixedPodMode` / `FixedPercentPodMod` / + `RandomMaxPercentPodMod`. If `FixedPodMode`, provide + an integer of pods to do chaos action. If `FixedPercentPodMod`, + provide a number from 0-100 to specify the percent + of pods the server can do chaos action. IF `RandomMaxPercentPodMod`, provide + a number from 0-100 to specify the max percent + of pods to do chaos action + type: string + required: + - mode + - selector + type: object + task: + description: Task describes the behavior of the custom + task. Only used when Type is TypeTask. + properties: + container: + description: Container is the main container image + to run in the pod properties: - action: - description: 'Action defines the specific pod - chaos action. Supported action: pod-kill / - pod-failure / container-kill Default action: - pod-kill' - enum: - - pod-kill - - pod-failure - - container-kill - type: string - containerNames: - description: ContainerNames indicates list of - the name of affected container. If not set, - all containers will be injected + args: + description: '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. 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. Cannot be updated. + More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' items: type: string type: array - duration: - description: Duration represents the duration - of the chaos action. It is required when the - action is `PodFailureAction`. A duration string - is a possibly signed sequence of decimal numbers, - each with optional fraction and a unit suffix, - such as "300ms", "-1.5h" or "2h45m". Valid - time units are "ns", "us" (or "µs"), "ms", - "s", "m", "h". - type: string - gracePeriod: - description: GracePeriod is used in pod-kill - action. It represents the duration in seconds - before the pod should be deleted. Value must - be non-negative integer. The default value - is zero that indicates delete immediately. - format: int64 - minimum: 0 - type: integer - mode: - description: 'Mode defines the mode to run chaos - action. Supported mode: one / all / fixed - / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - selector: - description: Selector is used to select pods - that are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: + command: + description: '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. 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. Cannot be updated. More info: + https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + env: + description: List of environment variables to + set in the container. Cannot be updated. + items: + description: EnvVar represents an environment + variable present in a Container. + properties: + name: + description: Name of the environment variable. + Must be a C_IDENTIFIER. type: string - description: Map of string keys and values - that can be used to select objects. A - selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A - list of selectors based on set-based label - expressions. - items: - description: A label selector requirement - is a selector that contains values, - a key, and an operator that relates - the key and values. + value: + description: '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 "".' + type: string + valueFrom: + description: Source for the environment + variable's value. Cannot be used if + value is not empty. properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: operator represents a - key's relationship to a set of values. - Valid operators are In, NotIn, Exists - and DoesNotExist. + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. + apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the + ConfigMap or its key must be + defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the + pod: supports metadata.name, metadata.namespace, + metadata.labels, metadata.annotations, + spec.nodeName, spec.serviceAccountName, + status.hostIP, status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema + the FieldPath is written in + terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field + to select in the specified API + version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: '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.' + properties: + containerName: + description: 'Container name: + required for volumes, optional + for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output + format of the exposed resources, + defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource + to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret + in the pod's namespace + properties: + key: + description: The key of the secret + to select from. Must be a valid + secret key. + type: string + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. + apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the + Secret or its key must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + description: 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. + items: + description: EnvFromSource represents the + source of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' type: string - values: - description: values is an array of - string values. If the operator is - In or NotIn, the values array must - be non-empty. If the operator is - Exists or DoesNotExist, the values - array must be empty. This array - is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator + optional: + description: Specify whether the ConfigMap + must be defined + type: boolean type: object - type: array - fieldSelectors: - additionalProperties: + prefix: + description: An optional identifier to + prepend to each key in the ConfigMap. + Must be a C_IDENTIFIER. type: string - description: Map of string keys and values - that can be used to select objects. A - selector based on fields. + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret + must be defined + type: boolean + type: object + type: object + type: array + image: + description: '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.' + type: string + imagePullPolicy: + description: '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' + type: string + lifecycle: + description: Actions that the management system + should take in response to container lifecycle + events. Cannot be updated. + properties: + postStart: + description: 'PostStart is called immediately + after a container is created. If the handler + fails, the container is terminated and + restarted according to its restart policy. + Other management of the container blocks + until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the + following should be specified. Exec + specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http + request to perform. + properties: + host: + description: Host name to connect + to, defaults to the pod IP. You + probably want to set "Host" in + httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set + in the request. HTTP allows repeated + headers. + items: + description: HTTPHeader describes + a custom header to be used in + HTTP probes + properties: + name: + description: The header field + name + type: string + value: + description: The header field + value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the + HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the + port to access on the container. + Number must be in the range 1 + to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an + action involving a TCP port. TCP hooks + not yet supported TODO: implement + a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name + to connect to, defaults to the + pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the + port to access on the container. + Number must be in the range 1 + to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select objects. A - selector based on labels. + preStop: + description: 'PreStop is called immediately + before a container is terminated due to + an API request or management event such + as liveness/startup probe failure, preemption, + resource contention, etc. The handler + is not called if the container crashes + or exits. The reason for termination is + passed to the handler. The Pod''s termination + grace period countdown begins before the + PreStop hooked is executed. Regardless + of the outcome of the handler, the container + will eventually terminate within the Pod''s + termination grace period. Other management + of the container blocks until the hook + completes or until the termination grace + period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the + following should be specified. Exec + specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http + request to perform. + properties: + host: + description: Host name to connect + to, defaults to the pod IP. You + probably want to set "Host" in + httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set + in the request. HTTP allows repeated + headers. + items: + description: HTTPHeader describes + a custom header to be used in + HTTP probes + properties: + name: + description: The header field + name + type: string + value: + description: The header field + value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the + HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the + port to access on the container. + Number must be in the range 1 + to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an + action involving a TCP port. TCP hooks + not yet supported TODO: implement + a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name + to connect to, defaults to the + pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the + port to access on the container. + Number must be in the range 1 + to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select nodes. Selector - which must match a node's labels, and - objects must belong to these selected - nodes. + type: object + livenessProbe: + description: 'Periodic probe of container liveness. + Container will be restarted if the probe fails. + Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following + should be specified. Exec specifies the + action to take. + properties: + command: + description: 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. + items: + type: string + type: array type: object - nodes: - description: Nodes is a set of node name - and objects must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set - of condition of a pod at the current time. - supported value: Pending / Running / Succeeded - / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: + failureThreshold: + description: Minimum consecutive failures + for the probe to be considered failed + after having succeeded. Defaults to 3. + Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http + request to perform. + properties: + host: + description: Host name to connect to, + defaults to the pod IP. You probably + want to set "Host" in httpHeaders + instead. type: string - type: array - description: Pods is a map of string keys - and a set values that used to select pods. - The key defines the namespace which pods - belong, and the each values is a set of - pod names. + httpHeaders: + description: Custom headers to set in + the request. HTTP allows repeated + headers. + items: + description: HTTPHeader describes + a custom header to be used in HTTP + probes + properties: + name: + description: The header field + name + type: string + value: + description: The header field + value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP + server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port + to access on the container. Number + must be in the range 1 to 65535. Name + must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: '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' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform + the probe. Default to 10 seconds. Minimum + value is 1. + format: int32 + type: integer + successThreshold: + description: 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. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action + involving a TCP port. TCP hooks not yet + supported TODO: implement a realistic + TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to + connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port + to access on the container. Number + must be in the range 1 to 65535. Name + must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port type: object + timeoutSeconds: + description: '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' + format: int32 + type: integer type: object - value: - description: Value is required when the mode - is set to `FixedPodMode` / `FixedPercentPodMod` - / `RandomMaxPercentPodMod`. If `FixedPodMode`, - provide an integer of pods to do chaos action. - If `FixedPercentPodMod`, provide a number - from 0-100 to specify the percent of pods - the server can do chaos action. IF `RandomMaxPercentPodMod`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action + name: + description: Name of the container specified + as a DNS_LABEL. Each container in a pod must + have a unique name (DNS_LABEL). Cannot be + updated. type: string - required: - - action - - mode - - selector - type: object - schedule: - type: string - startingDeadlineSeconds: - format: int64 - minimum: 0 - nullable: true - type: integer - stressChaos: - description: StressChaosSpec defines the desired - state of StressChaos - properties: - containerNames: - description: ContainerNames indicates list of - the name of affected container. If not set, - all containers will be injected + ports: + description: 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. items: - type: string + description: ContainerPort represents a network + port in a single container. + properties: + containerPort: + description: Number of port to expose + on the pod's IP address. This must be + a valid port number, 0 < x < 65536. + format: int32 + type: integer + hostIP: + description: What host IP to bind the + external port to. + type: string + hostPort: + description: Number of port to expose + on the host. If specified, this must + be a valid port number, 0 < x < 65536. + If HostNetwork is specified, this must + match ContainerPort. Most containers + do not need this. + format: int32 + type: integer + name: + description: If specified, this must be + an IANA_SVC_NAME and unique within the + pod. Each named port in a pod must have + a unique name. Name for the port that + can be referred to by services. + type: string + protocol: + default: TCP + description: Protocol for port. Must be + UDP, TCP, or SCTP. Defaults to "TCP". + type: string + required: + - containerPort + type: object type: array - duration: - description: Duration represents the duration - of the chaos action - type: string - mode: - description: 'Mode defines the mode to run chaos - action. Supported mode: one / all / fixed - / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - selector: - description: Selector is used to select pods - that are used to inject chaos action. + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + description: 'Periodic probe of container service + readiness. Container will be removed from + service endpoints if the probe fails. Cannot + be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select objects. A - selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A - list of selectors based on set-based label - expressions. - items: - description: A label selector requirement - is a selector that contains values, - a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: operator represents a - key's relationship to a set of values. - Valid operators are In, NotIn, Exists - and DoesNotExist. + exec: + description: One and only one of the following + should be specified. Exec specifies the + action to take. + properties: + command: + description: 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. + items: type: string - values: - description: values is an array of - string values. If the operator is - In or NotIn, the values array must - be non-empty. If the operator is - Exists or DoesNotExist, the values - array must be empty. This array - is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select objects. A - selector based on fields. + type: array type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select objects. A - selector based on labels. + failureThreshold: + description: Minimum consecutive failures + for the probe to be considered failed + after having succeeded. Defaults to 3. + Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http + request to perform. + properties: + host: + description: Host name to connect to, + defaults to the pod IP. You probably + want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in + the request. HTTP allows repeated + headers. + items: + description: HTTPHeader describes + a custom header to be used in HTTP + probes + properties: + name: + description: The header field + name + type: string + value: + description: The header field + value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP + server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port + to access on the container. Number + must be in the range 1 to 65535. Name + must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. + type: string + required: + - port type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: - type: string - type: array - nodeSelectors: + initialDelaySeconds: + description: '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' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform + the probe. Default to 10 seconds. Minimum + value is 1. + format: int32 + type: integer + successThreshold: + description: 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. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action + involving a TCP port. TCP hooks not yet + supported TODO: implement a realistic + TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to + connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port + to access on the container. Number + must be in the range 1 to 65535. Name + must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: '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' + format: int32 + type: integer + type: object + resources: + description: 'Compute Resources required by + this container. Cannot be updated. More info: + https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + properties: + limits: additionalProperties: - type: string - description: Map of string keys and values - that can be used to select nodes. Selector - which must match a node's labels, and - objects must belong to these selected - nodes. + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum + amount of compute resources allowed. More + info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' type: object - nodes: - description: Nodes is a set of node name - and objects must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set - of condition of a pod at the current time. - supported value: Pending / Running / Succeeded - / Failed / Unknown' - items: - type: string - type: array - pods: + requests: additionalProperties: - items: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: '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-compute-resources-container/' + type: object + type: object + securityContext: + description: 'Security options the pod should + run with. More info: https://kubernetes.io/docs/concepts/policy/security-context/ + More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/' + properties: + allowPrivilegeEscalation: + description: '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' + type: boolean + capabilities: + description: The capabilities to add/drop + when running containers. Defaults to the + default set of capabilities granted by + the container runtime. + properties: + add: + description: Added capabilities + items: + description: Capability represent + POSIX capabilities type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent + POSIX capabilities type + type: string + type: array + type: object + privileged: + description: Run container in privileged + mode. Processes in privileged containers + are essentially equivalent to root on + the host. Defaults to false. + type: boolean + procMount: + description: 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. + type: string + readOnlyRootFilesystem: + description: Whether this container has + a read-only root filesystem. Default is + false. + type: boolean + runAsGroup: + description: 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. + format: int64 + type: integer + runAsNonRoot: + description: 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. + type: boolean + runAsUser: + description: 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. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied + to the container. If unspecified, the + container runtime will allocate a random + SELinux context for each container. May + also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext + takes precedence. + properties: + level: + description: Level is SELinux level + label that applies to the container. + type: string + role: + description: Role is a SELinux role + label that applies to the container. + type: string + type: + description: Type is a SELinux type + label that applies to the container. + type: string + user: + description: User is a SELinux user + label that applies to the container. + type: string + type: object + windowsOptions: + description: The Windows specific settings + applied to all containers. If unspecified, + the options from the PodSecurityContext + will be used. If set in both SecurityContext + and PodSecurityContext, the value specified + in SecurityContext takes precedence. + properties: + gmsaCredentialSpec: + description: 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. This field is alpha-level and + is only honored by servers that enable + the WindowsGMSA feature flag. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName + is the name of the GMSA credential + spec to use. This field is alpha-level + and is only honored by servers that + enable the WindowsGMSA feature flag. + type: string + runAsUserName: + description: 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. + This field is beta-level and may be + disabled with the WindowsRunAsUserName + feature flag. type: string - type: array - description: Pods is a map of string keys - and a set values that used to select pods. - The key defines the namespace which pods - belong, and the each values is a set of - pod names. type: object type: object - stressngStressors: - description: StressngStressors defines plenty - of stressors just like `Stressors` except - that it's an experimental feature and more - powerful. You can define stressors in `stress-ng` - (see also `man stress-ng`) dialect, however - not all of the supported stressors are well - tested. It maybe retired in later releases. - You should always use `Stressors` to define - the stressors and use this only when you want - more stressors unsupported by `Stressors`. - When both `StressngStressors` and `Stressors` - are defined, `StressngStressors` wins. - type: string - stressors: - description: Stressors defines plenty of stressors - supported to stress system components out. - You can use one or more of them to make up - various kinds of stresses. At least one of - the stressors should be specified. + startupProbe: + description: 'StartupProbe indicates that the + Pod has successfully initialized. If specified, + no other probes are executed until this completes + successfully. If this probe fails, the Pod + will be restarted, just as if the livenessProbe + failed. This can be used to provide different + probe parameters at the beginning of a Pod''s + lifecycle, when it might take a long time + to load data or warm a cache, than during + steady-state operation. This cannot be updated. + This is an alpha feature enabled by the StartupProbe + feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' properties: - cpu: - description: CPUStressor stresses CPU out + exec: + description: One and only one of the following + should be specified. Exec specifies the + action to take. properties: - load: - description: Load specifies P percent - loading per CPU worker. 0 is effectively - a sleep (no load) and 100 is full - loading. - type: integer - options: - description: extend stress-ng options + command: + description: 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. items: type: string type: array - workers: - description: Workers specifies N workers - to apply the stressor. - type: integer - required: - - workers type: object - memory: - description: MemoryStressor stresses virtual - memory out + failureThreshold: + description: Minimum consecutive failures + for the probe to be considered failed + after having succeeded. Defaults to 3. + Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http + request to perform. properties: - options: - description: extend stress-ng options + host: + description: Host name to connect to, + defaults to the pod IP. You probably + want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in + the request. HTTP allows repeated + headers. items: - type: string + description: HTTPHeader describes + a custom header to be used in HTTP + probes + properties: + name: + description: The header field + name + type: string + value: + description: The header field + value + type: string + required: + - name + - value + type: object type: array - size: - description: Size specifies N bytes - consumed per vm worker, default is - the total available memory. One can - specify the size as % of total available - memory or in units of B, KB/KiB, MB/MiB, - GB/GiB, TB/TiB. + path: + description: Path to access on the HTTP + server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port + to access on the container. Number + must be in the range 1 to 65535. Name + must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. type: string - workers: - description: Workers specifies N workers - to apply the stressor. - type: integer required: - - workers + - port + type: object + initialDelaySeconds: + description: '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' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform + the probe. Default to 10 seconds. Minimum + value is 1. + format: int32 + type: integer + successThreshold: + description: 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. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action + involving a TCP port. TCP hooks not yet + supported TODO: implement a realistic + TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to + connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port + to access on the container. Number + must be in the range 1 to 65535. Name + must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port type: object + timeoutSeconds: + description: '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' + format: int32 + type: integer type: object - value: - description: Value is required when the mode - is set to `FixedPodMode` / `FixedPercentPodMod` - / `RandomMaxPercentPodMod`. If `FixedPodMode`, - provide an integer of pods to do chaos action. - If `FixedPercentPodMod`, provide a number - from 0-100 to specify the percent of pods - the server can do chaos action. IF `RandomMaxPercentPodMod`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action + stdin: + description: 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. + type: boolean + stdinOnce: + description: 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 + type: boolean + terminationMessagePath: + description: '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.' type: string - required: - - mode - - selector - type: object - timeChaos: - description: TimeChaosSpec defines the desired state - of TimeChaos - properties: - clockIds: - description: ClockIds defines all affected clock - id All available options are ["CLOCK_REALTIME","CLOCK_MONOTONIC","CLOCK_PROCESS_CPUTIME_ID","CLOCK_THREAD_CPUTIME_ID", - "CLOCK_MONOTONIC_RAW","CLOCK_REALTIME_COARSE","CLOCK_MONOTONIC_COARSE","CLOCK_BOOTTIME","CLOCK_REALTIME_ALARM", - "CLOCK_BOOTTIME_ALARM"] Default value is ["CLOCK_REALTIME"] + terminationMessagePolicy: + description: 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. + type: string + tty: + description: Whether this container should allocate + a TTY for itself, also requires 'stdin' to + be true. Default is false. + type: boolean + volumeDevices: + description: volumeDevices is the list of block + devices to be used by the container. This + is a beta feature. items: - type: string + description: volumeDevice describes a mapping + of a raw block device within a container. + properties: + devicePath: + description: devicePath is the path inside + of the container that the device will + be mapped to. + type: string + name: + description: name must match the name + of a persistentVolumeClaim in the pod + type: string + required: + - devicePath + - name + type: object type: array - containerNames: - description: ContainerNames indicates list of - the name of affected container. If not set, - all containers will be injected + volumeMounts: + description: Pod volumes to mount into the container's + filesystem. Cannot be updated. items: - type: string + description: VolumeMount describes a mounting + of a Volume within a container. + properties: + mountPath: + description: Path within the container + at which the volume should be mounted. Must + not contain ':'. + type: string + mountPropagation: + description: 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. + type: string + name: + description: This must match the Name + of a Volume. + type: string + readOnly: + description: Mounted read-only if true, + read-write otherwise (false or unspecified). + Defaults to false. + type: boolean + subPath: + description: Path within the volume from + which the container's volume should + be mounted. Defaults to "" (volume's + root). + type: string + subPathExpr: + description: 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. + type: string + required: + - mountPath + - name + type: object type: array - duration: - description: Duration represents the duration - of the chaos action - type: string - mode: - description: 'Mode defines the mode to run chaos - action. Supported mode: one / all / fixed - / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent + workingDir: + description: 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. type: string - selector: - description: Selector is used to select pods - that are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: + required: + - name + type: object + volumes: + description: Volumes is a list of volumes that can + be mounted by containers in a template. + items: + description: Volume represents a named volume + in a pod that may be accessed by any container + in the pod. + properties: + awsElasticBlockStore: + description: 'AWSElasticBlockStore represents + an AWS Disk resource that is attached to + a kubelet''s host machine and then exposed + to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + properties: + fsType: + description: 'Filesystem type of the volume + that you want to mount. Tip: Ensure + that the filesystem type is supported + by the host operating system. Examples: + "ext4", "xfs", "ntfs". Implicitly inferred + to be "ext4" if unspecified. More info: + https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + TODO: how do we prevent errors in the + filesystem from compromising the machine' + type: string + partition: + description: 'The partition in the volume + that you want to mount. If omitted, + the default is to mount by volume name. + Examples: For volume /dev/sda1, you + specify the partition as "1". Similarly, + the volume partition for /dev/sda is + "0" (or you can leave the property empty).' + format: int32 + type: integer + readOnly: + description: 'Specify "true" to force + and set the ReadOnly property in VolumeMounts + to "true". If omitted, the default is + "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: boolean + volumeID: + description: 'Unique ID of the persistent + disk resource in AWS (Amazon EBS volume). + More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: string + required: + - volumeID + type: object + azureDisk: + description: AzureDisk represents an Azure + Data Disk mount on the host and bind mount + to the pod. + properties: + cachingMode: + description: 'Host Caching mode: None, + Read Only, Read Write.' + type: string + diskName: + description: The Name of the data disk + in the blob storage + type: string + diskURI: + description: The URI the data disk in + the blob storage + type: string + fsType: + description: Filesystem type to mount. + Must be a filesystem type supported + by the host operating system. Ex. "ext4", + "xfs", "ntfs". Implicitly inferred to + be "ext4" if unspecified. + type: string + kind: + description: 'Expected values Shared: + multiple blob disks per storage account Dedicated: + single blob disk per storage account Managed: + azure managed data disk (only in managed + availability set). defaults to shared' + type: string + readOnly: + description: Defaults to false (read/write). + ReadOnly here will force the ReadOnly + setting in VolumeMounts. + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + description: AzureFile represents an Azure + File Service mount on the host and bind + mount to the pod. + properties: + readOnly: + description: Defaults to false (read/write). + ReadOnly here will force the ReadOnly + setting in VolumeMounts. + type: boolean + secretName: + description: the name of secret that contains + Azure Storage Account Name and Key + type: string + shareName: + description: Share Name + type: string + required: + - secretName + - shareName + type: object + cephfs: + description: CephFS represents a Ceph FS mount + on the host that shares a pod's lifetime + properties: + monitors: + description: 'Required: Monitors is a + collection of Ceph monitors More info: + https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + items: + type: string + type: array + path: + description: 'Optional: Used as the mounted + root, rather than the full Ceph tree, + default is /' + type: string + readOnly: + description: 'Optional: Defaults to false + (read/write). ReadOnly here will force + the ReadOnly setting in VolumeMounts. + More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: boolean + secretFile: + description: 'Optional: SecretFile is + the path to key ring for User, default + is /etc/ceph/user.secret More info: + https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + secretRef: + description: 'Optional: SecretRef is reference + to the authentication secret for User, + default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + user: + description: 'Optional: User is the rados + user name, default is admin More info: + https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + required: + - monitors + type: object + cinder: + description: 'Cinder represents a cinder volume + attached and mounted on kubelets host machine. + More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + properties: + fsType: + description: 'Filesystem type to mount. + Must be a filesystem type supported + by the host operating system. Examples: + "ext4", "xfs", "ntfs". Implicitly inferred + to be "ext4" if unspecified. More info: + https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + readOnly: + description: 'Optional: Defaults to false + (read/write). ReadOnly here will force + the ReadOnly setting in VolumeMounts. + More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: boolean + secretRef: + description: 'Optional: points to a secret + object containing parameters used to + connect to OpenStack.' + properties: + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + volumeID: + description: 'volume id used to identify + the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + required: + - volumeID + type: object + configMap: + description: ConfigMap represents a configMap + that should populate this volume + properties: + defaultMode: + description: 'Optional: mode bits to use + on created files by default. Must be + a value between 0 and 0777. Defaults + to 0644. Directories within the path + are not affected by this setting. This + might be in conflict with other options + that affect the file mode, like fsGroup, + and the result can be other mode bits + set.' + format: int32 + type: integer + items: + description: If unspecified, each key-value + pair in the Data field of the referenced + ConfigMap will be projected into the + volume as a file whose name is the key + and content is the value. If specified, + the listed keys will be projected into + the specified paths, and unlisted keys + will not be present. If a key is specified + which is not present in the ConfigMap, + the volume setup will error unless it + is marked optional. Paths must be relative + and may not contain the '..' path or + start with '..'. + items: + description: Maps a string key to a + path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits + to use on this file, must be a + value between 0 and 0777. If not + specified, the volume defaultMode + will be used. This might be in + conflict with other options that + affect the file mode, like fsGroup, + and the result can be other mode + bits set.' + format: int32 + type: integer + path: + description: The relative path of + the file to map the key to. May + not be an absolute path. May not + contain the path element '..'. + May not start with the string + '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap + or its keys must be defined + type: boolean + type: object + csi: + description: CSI (Container Storage Interface) + represents storage that is handled by an + external CSI driver (Alpha feature). + properties: + driver: + description: Driver is the name of the + CSI driver that handles this volume. + Consult with your admin for the correct + name as registered in the cluster. + type: string + fsType: + description: Filesystem type to mount. + Ex. "ext4", "xfs", "ntfs". If not provided, + the empty value is passed to the associated + CSI driver which will determine the + default filesystem to apply. + type: string + nodePublishSecretRef: + description: NodePublishSecretRef is a + reference to the secret object containing + sensitive information to pass to the + CSI driver to complete the CSI NodePublishVolume + and NodeUnpublishVolume calls. This + field is optional, and may be empty + if no secret is required. If the secret + object contains more than one secret, + all secret references are passed. + properties: + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + readOnly: + description: Specifies a read-only configuration + for the volume. Defaults to false (read/write). + type: boolean + volumeAttributes: + additionalProperties: + type: string + description: VolumeAttributes stores driver-specific + properties that are passed to the CSI + driver. Consult your driver's documentation + for supported values. + type: object + required: + - driver + type: object + downwardAPI: + description: DownwardAPI represents downward + API about the pod that should populate this + volume + properties: + defaultMode: + description: 'Optional: mode bits to use + on created files by default. Must be + a value between 0 and 0777. Defaults + to 0644. Directories within the path + are not affected by this setting. This + might be in conflict with other options + that affect the file mode, like fsGroup, + and the result can be other mode bits + set.' + format: int32 + type: integer + items: + description: Items is a list of downward + API volume file + items: + description: DownwardAPIVolumeFile represents + information to create the file containing + the pod field + properties: + fieldRef: + description: 'Required: Selects + a field of the pod: only annotations, + labels, name and namespace are + supported.' + properties: + apiVersion: + description: Version of the + schema the FieldPath is written + in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field + to select in the specified + API version. + type: string + required: + - fieldPath + type: object + mode: + description: 'Optional: mode bits + to use on this file, must be a + value between 0 and 0777. If not + specified, the volume defaultMode + will be used. This might be in + conflict with other options that + affect the file mode, like fsGroup, + and the result can be other mode + bits set.' + format: int32 + type: integer + path: + description: 'Required: Path is the + relative path name of the file + to be created. Must not be absolute + or contain the ''..'' path. Must + be utf-8 encoded. The first item + of the relative path must not + start with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource + of the container: only resources + limits and requests (limits.cpu, + limits.memory, requests.cpu and + requests.memory) are currently + supported.' + properties: + containerName: + description: 'Container name: + required for volumes, optional + for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output + format of the exposed resources, + defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource + to select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + emptyDir: + description: 'EmptyDir represents a temporary + directory that shares a pod''s lifetime. + More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + properties: + medium: + description: 'What type of storage medium + should back this directory. The default + is "" which means to use the node''s + default medium. Must be an empty string + (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + description: 'Total amount of local storage + required for this EmptyDir volume. The + size limit is also applicable for memory + medium. The maximum usage on memory + medium EmptyDir would be the minimum + value between the SizeLimit specified + here and the sum of memory limits of + all containers in a pod. The default + is nil which means that the limit is + undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir' + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + fc: + description: FC represents a Fibre Channel + resource that is attached to a kubelet's + host machine and then exposed to the pod. + properties: + fsType: + description: 'Filesystem type to mount. + Must be a filesystem type supported + by the host operating system. Ex. "ext4", + "xfs", "ntfs". Implicitly inferred to + be "ext4" if unspecified. TODO: how + do we prevent errors in the filesystem + from compromising the machine' + type: string + lun: + description: 'Optional: FC target lun + number' + format: int32 + type: integer + readOnly: + description: 'Optional: Defaults to false + (read/write). ReadOnly here will force + the ReadOnly setting in VolumeMounts.' + type: boolean + targetWWNs: + description: 'Optional: FC target worldwide + names (WWNs)' + items: + type: string + type: array + wwids: + description: 'Optional: FC volume world + wide identifiers (wwids) Either wwids + or combination of targetWWNs and lun + must be set, but not both simultaneously.' + items: + type: string + type: array + type: object + flexVolume: + description: FlexVolume represents a generic + volume resource that is provisioned/attached + using an exec based plugin. + properties: + driver: + description: Driver is the name of the + driver to use for this volume. + type: string + fsType: + description: Filesystem type to mount. + Must be a filesystem type supported + by the host operating system. Ex. "ext4", + "xfs", "ntfs". The default filesystem + depends on FlexVolume script. + type: string + options: + additionalProperties: + type: string + description: 'Optional: Extra command + options if any.' + type: object + readOnly: + description: 'Optional: Defaults to false + (read/write). ReadOnly here will force + the ReadOnly setting in VolumeMounts.' + type: boolean + secretRef: + description: 'Optional: SecretRef is reference + to the secret object containing sensitive + information to pass to the plugin scripts. + This may be empty if no secret object + is specified. If the secret object contains + more than one secret, all secrets are + passed to the plugin scripts.' + properties: + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + required: + - driver + type: object + flocker: + description: Flocker represents a Flocker + volume attached to a kubelet's host machine. + This depends on the Flocker control service + being running + properties: + datasetName: + description: Name of the dataset stored + as metadata -> name on the dataset for + Flocker should be considered as deprecated + type: string + datasetUUID: + description: UUID of the dataset. This + is unique identifier of a Flocker dataset + type: string + type: object + gcePersistentDisk: + description: 'GCEPersistentDisk represents + a GCE Disk resource that is attached to + a kubelet''s host machine and then exposed + to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + properties: + fsType: + description: 'Filesystem type of the volume + that you want to mount. Tip: Ensure + that the filesystem type is supported + by the host operating system. Examples: + "ext4", "xfs", "ntfs". Implicitly inferred + to be "ext4" if unspecified. More info: + https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + TODO: how do we prevent errors in the + filesystem from compromising the machine' + type: string + partition: + description: 'The partition in the volume + that you want to mount. If omitted, + the default is to mount by volume name. + Examples: For volume /dev/sda1, you + specify the partition as "1". Similarly, + the volume partition for /dev/sda is + "0" (or you can leave the property empty). + More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + format: int32 + type: integer + pdName: + description: 'Unique name of the PD resource + in GCE. Used to identify the disk in + GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: string + readOnly: + description: 'ReadOnly here will force + the ReadOnly setting in VolumeMounts. + Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: boolean + required: + - pdName + type: object + gitRepo: + description: 'GitRepo represents a git repository + at a particular revision. DEPRECATED: GitRepo + is deprecated. To provision a container + with a git repo, mount an EmptyDir into + an InitContainer that clones the repo using + git, then mount the EmptyDir into the Pod''s + container.' + properties: + directory: + description: Target directory name. Must + not contain or start with '..'. If + '.' is supplied, the volume directory + will be the git repository. Otherwise, + if specified, the volume will contain + the git repository in the subdirectory + with the given name. + type: string + repository: + description: Repository URL + type: string + revision: + description: Commit hash for the specified + revision. + type: string + required: + - repository + type: object + glusterfs: + description: 'Glusterfs represents a Glusterfs + mount on the host that shares a pod''s lifetime. + More info: https://examples.k8s.io/volumes/glusterfs/README.md' + properties: + endpoints: + description: 'EndpointsName is the endpoint + name that details Glusterfs topology. + More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + path: + description: 'Path is the Glusterfs volume + path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + readOnly: + description: 'ReadOnly here will force + the Glusterfs volume to be mounted with + read-only permissions. Defaults to false. + More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: boolean + required: + - endpoints + - path + type: object + hostPath: + description: 'HostPath represents a pre-existing + file or directory on the host machine that + is directly exposed to the container. This + is generally used for system agents or other + privileged things that are allowed to see + the host machine. Most containers will NOT + need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath + --- TODO(jonesdl) We need to restrict who + can use host directory mounts and who can/can + not mount host directories as read/write.' + properties: + path: + description: 'Path of the directory on + the host. If the path is a symlink, + it will follow the link to the real + path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + type: + description: 'Type for HostPath Volume + Defaults to "" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + required: + - path + type: object + iscsi: + description: 'ISCSI represents an ISCSI Disk + resource that is attached to a kubelet''s + host machine and then exposed to the pod. + More info: https://examples.k8s.io/volumes/iscsi/README.md' + properties: + chapAuthDiscovery: + description: whether support iSCSI Discovery + CHAP authentication + type: boolean + chapAuthSession: + description: whether support iSCSI Session + CHAP authentication + type: boolean + fsType: + description: 'Filesystem type of the volume + that you want to mount. Tip: Ensure + that the filesystem type is supported + by the host operating system. Examples: + "ext4", "xfs", "ntfs". Implicitly inferred + to be "ext4" if unspecified. More info: + https://kubernetes.io/docs/concepts/storage/volumes#iscsi + TODO: how do we prevent errors in the + filesystem from compromising the machine' + type: string + initiatorName: + description: Custom iSCSI Initiator Name. + If initiatorName is specified with iscsiInterface + simultaneously, new iSCSI interface + : will be + created for the connection. + type: string + iqn: + description: Target iSCSI Qualified Name. + type: string + iscsiInterface: + description: iSCSI Interface Name that + uses an iSCSI transport. Defaults to + 'default' (tcp). + type: string + lun: + description: iSCSI Target Lun number. + format: int32 + type: integer + portals: + description: iSCSI Target Portal List. + The portal is either an IP or ip_addr:port + if the port is other than default (typically + TCP ports 860 and 3260). + items: + type: string + type: array + readOnly: + description: ReadOnly here will force + the ReadOnly setting in VolumeMounts. + Defaults to false. + type: boolean + secretRef: + description: CHAP Secret for iSCSI target + and initiator authentication + properties: + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + targetPortal: + description: iSCSI Target Portal. The + Portal is either an IP or ip_addr:port + if the port is other than default (typically + TCP ports 860 and 3260). + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + description: 'Volume''s name. Must be a DNS_LABEL + and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + nfs: + description: 'NFS represents an NFS mount + on the host that shares a pod''s lifetime + More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + properties: + path: + description: 'Path that is exported by + the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + readOnly: + description: 'ReadOnly here will force + the NFS export to be mounted with read-only + permissions. Defaults to false. More + info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: boolean + server: + description: 'Server is the hostname or + IP address of the NFS server. More info: + https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + description: 'PersistentVolumeClaimVolumeSource + represents a reference to a PersistentVolumeClaim + in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + properties: + claimName: + description: 'ClaimName is the name of + a PersistentVolumeClaim in the same + namespace as the pod using this volume. + More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' type: string - description: Map of string keys and values - that can be used to select objects. A - selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A - list of selectors based on set-based label - expressions. - items: - description: A label selector requirement - is a selector that contains values, - a key, and an operator that relates - the key and values. + readOnly: + description: Will force the ReadOnly setting + in VolumeMounts. Default false. + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + description: PhotonPersistentDisk represents + a PhotonController persistent disk attached + and mounted on kubelets host machine + properties: + fsType: + description: Filesystem type to mount. + Must be a filesystem type supported + by the host operating system. Ex. "ext4", + "xfs", "ntfs". Implicitly inferred to + be "ext4" if unspecified. + type: string + pdID: + description: ID that identifies Photon + Controller persistent disk + type: string + required: + - pdID + type: object + portworxVolume: + description: PortworxVolume represents a portworx + volume attached and mounted on kubelets + host machine + properties: + fsType: + description: FSType represents the filesystem + type to mount Must be a filesystem type + supported by the host operating system. + Ex. "ext4", "xfs". Implicitly inferred + to be "ext4" if unspecified. + type: string + readOnly: + description: Defaults to false (read/write). + ReadOnly here will force the ReadOnly + setting in VolumeMounts. + type: boolean + volumeID: + description: VolumeID uniquely identifies + a Portworx volume + type: string + required: + - volumeID + type: object + projected: + description: Items for all in one resources + secrets, configmaps, and downward API + properties: + defaultMode: + description: Mode bits to use on created + files by default. Must be a value between + 0 and 0777. Directories within the path + are not affected by this setting. This + might be in conflict with other options + that affect the file mode, like fsGroup, + and the result can be other mode bits + set. + format: int32 + type: integer + sources: + description: list of volume projections + items: + description: Projection that may be + projected along with other supported + volume types + properties: + configMap: + description: information about the + configMap data to project + properties: + items: + description: If unspecified, + each key-value pair in the + Data field of the referenced + ConfigMap will be projected + into the volume as a file + whose name is the key and + content is the value. If specified, + the listed keys will be projected + into the specified paths, + and unlisted keys will not + be present. If a key is specified + which is not present in the + ConfigMap, the volume setup + will error unless it is marked + optional. Paths must be relative + and may not contain the '..' + path or start with '..'. + items: + description: Maps a string + key to a path within a volume. + properties: + key: + description: The key to + project. + type: string + mode: + description: 'Optional: + mode bits to use on + this file, must be a + value between 0 and + 0777. If not specified, + the volume defaultMode + will be used. This might + be in conflict with + other options that affect + the file mode, like + fsGroup, and the result + can be other mode bits + set.' + format: int32 + type: integer + path: + description: The relative + path of the file to + map the key to. May + not be an absolute path. + May not contain the + path element '..'. May + not start with the string + '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. + apiVersion, kind, uid?' + type: string + optional: + description: Specify whether + the ConfigMap or its keys + must be defined + type: boolean + type: object + downwardAPI: + description: information about the + downwardAPI data to project + properties: + items: + description: Items is a list + of DownwardAPIVolume file + items: + description: DownwardAPIVolumeFile + represents information to + create the file containing + the pod field + properties: + fieldRef: + description: 'Required: + Selects a field of the + pod: only annotations, + labels, name and namespace + are supported.' + properties: + apiVersion: + description: Version + of the schema the + FieldPath is written + in terms of, defaults + to "v1". + type: string + fieldPath: + description: Path + of the field to + select in the specified + API version. + type: string + required: + - fieldPath + type: object + mode: + description: 'Optional: + mode bits to use on + this file, must be a + value between 0 and + 0777. If not specified, + the volume defaultMode + will be used. This might + be in conflict with + other options that affect + the file mode, like + fsGroup, and the result + can be other mode bits + set.' + format: int32 + type: integer + path: + description: 'Required: + Path is the relative + path name of the file + to be created. Must + not be absolute or contain + the ''..'' path. Must + be utf-8 encoded. The + first item of the relative + path must not start + with ''..''' + type: string + resourceFieldRef: + description: 'Selects + a resource of the container: + only resources limits + and requests (limits.cpu, + limits.memory, requests.cpu + and requests.memory) + are currently supported.' + properties: + containerName: + description: 'Container + name: required for + volumes, optional + for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies + the output format + of the exposed resources, + defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: + resource to select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + secret: + description: information about the + secret data to project + properties: + items: + description: If unspecified, + each key-value pair in the + Data field of the referenced + Secret will be projected into + the volume as a file whose + name is the key and content + is the value. If specified, + the listed keys will be projected + into the specified paths, + and unlisted keys will not + be present. If a key is specified + which is not present in the + Secret, the volume setup will + error unless it is marked + optional. Paths must be relative + and may not contain the '..' + path or start with '..'. + items: + description: Maps a string + key to a path within a volume. + properties: + key: + description: The key to + project. + type: string + mode: + description: 'Optional: + mode bits to use on + this file, must be a + value between 0 and + 0777. If not specified, + the volume defaultMode + will be used. This might + be in conflict with + other options that affect + the file mode, like + fsGroup, and the result + can be other mode bits + set.' + format: int32 + type: integer + path: + description: The relative + path of the file to + map the key to. May + not be an absolute path. + May not contain the + path element '..'. May + not start with the string + '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. + apiVersion, kind, uid?' + type: string + optional: + description: Specify whether + the Secret or its key must + be defined + type: boolean + type: object + serviceAccountToken: + description: information about the + serviceAccountToken data to project + properties: + audience: + description: Audience is the + intended audience of the token. + A recipient of a token must + identify itself with an identifier + specified in the audience + of the token, and otherwise + should reject the token. The + audience defaults to the identifier + of the apiserver. + type: string + expirationSeconds: + description: ExpirationSeconds + is the requested duration + of validity of the service + account token. As the token + approaches expiration, the + kubelet volume plugin will + proactively rotate the service + account token. The kubelet + will start trying to rotate + the token if the token is + older than 80 percent of its + time to live or if the token + is older than 24 hours.Defaults + to 1 hour and must be at least + 10 minutes. + format: int64 + type: integer + path: + description: Path is the path + relative to the mount point + of the file to project the + token into. + type: string + required: + - path + type: object + type: object + type: array + required: + - sources + type: object + quobyte: + description: Quobyte represents a Quobyte + mount on the host that shares a pod's lifetime + properties: + group: + description: Group to map volume access + to Default is no group + type: string + readOnly: + description: ReadOnly here will force + the Quobyte volume to be mounted with + read-only permissions. Defaults to false. + type: boolean + registry: + description: Registry represents a single + or multiple Quobyte Registry services + specified as a string as host:port pair + (multiple entries are separated with + commas) which acts as the central registry + for volumes + type: string + tenant: + description: Tenant owning the given Quobyte + volume in the Backend Used with dynamically + provisioned Quobyte volumes, value is + set by the plugin + type: string + user: + description: User to map volume access + to Defaults to serivceaccount user + type: string + volume: + description: Volume is a string that references + an already created Quobyte volume by + name. + type: string + required: + - registry + - volume + type: object + rbd: + description: 'RBD represents a Rados Block + Device mount on the host that shares a pod''s + lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md' + properties: + fsType: + description: 'Filesystem type of the volume + that you want to mount. Tip: Ensure + that the filesystem type is supported + by the host operating system. Examples: + "ext4", "xfs", "ntfs". Implicitly inferred + to be "ext4" if unspecified. More info: + https://kubernetes.io/docs/concepts/storage/volumes#rbd + TODO: how do we prevent errors in the + filesystem from compromising the machine' + type: string + image: + description: 'The rados image name. More + info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + keyring: + description: 'Keyring is the path to key + ring for RBDUser. Default is /etc/ceph/keyring. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + monitors: + description: 'A collection of Ceph monitors. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + items: + type: string + type: array + pool: + description: 'The rados pool name. Default + is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + readOnly: + description: 'ReadOnly here will force + the ReadOnly setting in VolumeMounts. + Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: boolean + secretRef: + description: 'SecretRef is name of the + authentication secret for RBDUser. If + provided overrides keyring. Default + is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' properties: - key: - description: key is the label key - that the selector applies to. + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' type: string - operator: - description: operator represents a - key's relationship to a set of values. - Valid operators are In, NotIn, Exists - and DoesNotExist. + type: object + user: + description: 'The rados user name. Default + is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + required: + - image + - monitors + type: object + scaleIO: + description: ScaleIO represents a ScaleIO + persistent volume attached and mounted on + Kubernetes nodes. + properties: + fsType: + description: Filesystem type to mount. + Must be a filesystem type supported + by the host operating system. Ex. "ext4", + "xfs", "ntfs". Default is "xfs". + type: string + gateway: + description: The host address of the ScaleIO + API Gateway. + type: string + protectionDomain: + description: The name of the ScaleIO Protection + Domain for the configured storage. + type: string + readOnly: + description: Defaults to false (read/write). + ReadOnly here will force the ReadOnly + setting in VolumeMounts. + type: boolean + secretRef: + description: SecretRef references to the + secret for ScaleIO user and other sensitive + information. If this is not provided, + Login operation will fail. + properties: + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' type: string - values: - description: values is an array of - string values. If the operator is - In or NotIn, the values array must - be non-empty. If the operator is - Exists or DoesNotExist, the values - array must be empty. This array - is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator type: object - type: array - fieldSelectors: - additionalProperties: + sslEnabled: + description: Flag to enable/disable SSL + communication with Gateway, default + false + type: boolean + storageMode: + description: Indicates whether the storage + for a volume should be ThickProvisioned + or ThinProvisioned. Default is ThinProvisioned. type: string - description: Map of string keys and values - that can be used to select objects. A - selector based on fields. - type: object - labelSelectors: - additionalProperties: + storagePool: + description: The ScaleIO Storage Pool + associated with the protection domain. type: string - description: Map of string keys and values - that can be used to select objects. A - selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: + system: + description: The name of the storage system + as configured in ScaleIO. type: string - type: array - nodeSelectors: - additionalProperties: + volumeName: + description: The name of a volume already + created in the ScaleIO system that is + associated with this volume source. type: string - description: Map of string keys and values - that can be used to select nodes. Selector - which must match a node's labels, and - objects must belong to these selected - nodes. - type: object - nodes: - description: Nodes is a set of node name - and objects must belong to these nodes. + required: + - gateway + - secretRef + - system + type: object + secret: + description: 'Secret represents a secret that + should populate this volume. More info: + https://kubernetes.io/docs/concepts/storage/volumes#secret' + properties: + defaultMode: + description: 'Optional: mode bits to use + on created files by default. Must be + a value between 0 and 0777. Defaults + to 0644. Directories within the path + are not affected by this setting. This + might be in conflict with other options + that affect the file mode, like fsGroup, + and the result can be other mode bits + set.' + format: int32 + type: integer items: + description: If unspecified, each key-value + pair in the Data field of the referenced + Secret will be projected into the volume + as a file whose name is the key and + content is the value. If specified, + the listed keys will be projected into + the specified paths, and unlisted keys + will not be present. If a key is specified + which is not present in the Secret, + the volume setup will error unless it + is marked optional. Paths must be relative + and may not contain the '..' path or + start with '..'. + items: + description: Maps a string key to a + path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits + to use on this file, must be a + value between 0 and 0777. If not + specified, the volume defaultMode + will be used. This might be in + conflict with other options that + affect the file mode, like fsGroup, + and the result can be other mode + bits set.' + format: int32 + type: integer + path: + description: The relative path of + the file to map the key to. May + not be an absolute path. May not + contain the path element '..'. + May not start with the string + '..'. + type: string + required: + - key + - path + type: object + type: array + optional: + description: Specify whether the Secret + or its keys must be defined + type: boolean + secretName: + description: 'Name of the secret in the + pod''s namespace to use. More info: + https://kubernetes.io/docs/concepts/storage/volumes#secret' type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set - of condition of a pod at the current time. - supported value: Pending / Running / Succeeded - / Failed / Unknown' - items: + type: object + storageos: + description: StorageOS represents a StorageOS + volume attached and mounted on Kubernetes + nodes. + properties: + fsType: + description: Filesystem type to mount. + Must be a filesystem type supported + by the host operating system. Ex. "ext4", + "xfs", "ntfs". Implicitly inferred to + be "ext4" if unspecified. type: string - type: array - pods: - additionalProperties: + readOnly: + description: Defaults to false (read/write). + ReadOnly here will force the ReadOnly + setting in VolumeMounts. + type: boolean + secretRef: + description: SecretRef specifies the secret + to use for obtaining the StorageOS API + credentials. If not specified, default + values will be attempted. + properties: + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + volumeName: + description: VolumeName is the human-readable + name of the StorageOS volume. Volume + names are only unique within a namespace. + type: string + volumeNamespace: + description: VolumeNamespace specifies + the scope of the volume within StorageOS. If + no namespace is specified then the Pod's + namespace will be used. This allows + the Kubernetes name scoping to be mirrored + within StorageOS for tighter integration. + Set VolumeName to any name to override + the default behaviour. Set to "default" + if you are not using namespaces within + StorageOS. Namespaces that do not pre-exist + within StorageOS will be created. + type: string + type: object + vsphereVolume: + description: VsphereVolume represents a vSphere + volume attached and mounted on kubelets + host machine + properties: + fsType: + description: Filesystem type to mount. + Must be a filesystem type supported + by the host operating system. Ex. "ext4", + "xfs", "ntfs". Implicitly inferred to + be "ext4" if unspecified. + type: string + storagePolicyID: + description: Storage Policy Based Management + (SPBM) profile ID associated with the + StoragePolicyName. + type: string + storagePolicyName: + description: Storage Policy Based Management + (SPBM) profile name. + type: string + volumePath: + description: Path that identifies vSphere + volume vmdk + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + type: object + tasks: + description: Tasks describes the children steps of serial + or parallel node. Only used when Type is TypeSerial + or TypeParallel. + items: + type: string + type: array + templateType: + type: string + timeChaos: + description: TimeChaosSpec defines the desired state + of TimeChaos + properties: + clockIds: + description: ClockIds defines all affected clock + id All available options are ["CLOCK_REALTIME","CLOCK_MONOTONIC","CLOCK_PROCESS_CPUTIME_ID","CLOCK_THREAD_CPUTIME_ID", + "CLOCK_MONOTONIC_RAW","CLOCK_REALTIME_COARSE","CLOCK_MONOTONIC_COARSE","CLOCK_BOOTTIME","CLOCK_REALTIME_ALARM", + "CLOCK_BOOTTIME_ALARM"] Default value is ["CLOCK_REALTIME"] + items: + type: string + type: array + containerNames: + description: ContainerNames indicates list of the + name of affected container. If not set, all containers + will be injected + items: + type: string + type: array + duration: + description: Duration represents the duration of + the chaos action + type: string + mode: + description: 'Mode defines the mode to run chaos + action. Supported mode: one / all / fixed / fixed-percent + / random-max-percent' + enum: + - one + - all + - fixed + - fixed-percent + - random-max-percent + type: string + selector: + description: Selector is used to select pods that + are used to inject chaos action. + properties: + annotationSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select objects. A selector + based on annotations. + type: object + expressionSelectors: + description: a slice of label selector expressions + that can be used to select objects. A list + of selectors based on set-based label expressions. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. items: type: string type: array - description: Pods is a map of string keys - and a set values that used to select pods. - The key defines the namespace which pods - belong, and the each values is a set of - pod names. - type: object + required: + - key + - operator + type: object + type: array + fieldSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select objects. A selector + based on fields. + type: object + labelSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select objects. A selector + based on labels. type: object - timeOffset: - description: TimeOffset defines the delta time - of injected program. It's a possibly signed - sequence of decimal numbers, such as "300ms", - "-1.5h" or "2h45m". Valid time units are "ns", - "us" (or "µs"), "ms", "s", "m", "h". + namespaces: + description: Namespaces is a set of namespace + to which objects belong. + items: + type: string + type: array + nodeSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select nodes. Selector which + must match a node's labels, and objects must + belong to these selected nodes. + type: object + nodes: + description: Nodes is a set of node name and + objects must belong to these nodes. + items: + type: string + type: array + podPhaseSelectors: + description: 'PodPhaseSelectors is a set of + condition of a pod at the current time. supported + value: Pending / Running / Succeeded / Failed + / Unknown' + items: + type: string + type: array + pods: + additionalProperties: + items: + type: string + type: array + description: Pods is a map of string keys and + a set values that used to select pods. The + key defines the namespace which pods belong, + and the each values is a set of pod names. + type: object + type: object + timeOffset: + description: TimeOffset defines the delta time of + injected program. It's a possibly signed sequence + of decimal numbers, such as "300ms", "-1.5h" or + "2h45m". Valid time units are "ns", "us" (or "µs"), + "ms", "s", "m", "h". + type: string + value: + description: Value is required when the mode is + set to `FixedPodMode` / `FixedPercentPodMod` / + `RandomMaxPercentPodMod`. If `FixedPodMode`, provide + an integer of pods to do chaos action. If `FixedPercentPodMod`, + provide a number from 0-100 to specify the percent + of pods the server can do chaos action. IF `RandomMaxPercentPodMod`, provide + a number from 0-100 to specify the max percent + of pods to do chaos action + type: string + required: + - mode + - selector + - timeOffset + type: object + required: + - name + - templateType + type: object + type: array + required: + - entry + - templates + type: object + required: + - schedule + - type + type: object + startTime: + format: date-time + type: string + stressChaos: + description: StressChaosSpec defines the desired state of StressChaos + properties: + containerNames: + description: ContainerNames indicates list of the name of affected + container. If not set, all containers will be injected + items: + type: string + type: array + duration: + description: Duration represents the duration of the chaos action + type: string + mode: + description: 'Mode defines the mode to run chaos action. Supported + mode: one / all / fixed / fixed-percent / random-max-percent' + enum: + - one + - all + - fixed + - fixed-percent + - random-max-percent + type: string + selector: + description: Selector is used to select pods that are used to + inject chaos action. + properties: + annotationSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can be used + to select objects. A selector based on annotations. + type: object + expressionSelectors: + description: a slice of label selector expressions that can + be used to select objects. A list of selectors based on + set-based label expressions. + items: + description: A label selector requirement is a selector + that contains values, a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key that the selector + applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. If + the operator is In or NotIn, the values array must + be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced + during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + fieldSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can be used + to select objects. A selector based on fields. + type: object + labelSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can be used + to select objects. A selector based on labels. + type: object + namespaces: + description: Namespaces is a set of namespace to which objects + belong. + items: + type: string + type: array + nodeSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can be used + to select nodes. Selector which must match a node's labels, + and objects must belong to these selected nodes. + type: object + nodes: + description: Nodes is a set of node name and objects must + belong to these nodes. + items: + type: string + type: array + podPhaseSelectors: + description: 'PodPhaseSelectors is a set of condition of a + pod at the current time. supported value: Pending / Running + / Succeeded / Failed / Unknown' + items: + type: string + type: array + pods: + additionalProperties: + items: + type: string + type: array + description: Pods is a map of string keys and a set values + that used to select pods. The key defines the namespace + which pods belong, and the each values is a set of pod names. + type: object + type: object + stressngStressors: + description: StressngStressors defines plenty of stressors just + like `Stressors` except that it's an experimental feature and + more powerful. You can define stressors in `stress-ng` (see + also `man stress-ng`) dialect, however not all of the supported + stressors are well tested. It maybe retired in later releases. + You should always use `Stressors` to define the stressors and + use this only when you want more stressors unsupported by `Stressors`. + When both `StressngStressors` and `Stressors` are defined, `StressngStressors` + wins. + type: string + stressors: + description: Stressors defines plenty of stressors supported to + stress system components out. You can use one or more of them + to make up various kinds of stresses. At least one of the stressors + should be specified. + properties: + cpu: + description: CPUStressor stresses CPU out + properties: + load: + description: Load specifies P percent loading per CPU + worker. 0 is effectively a sleep (no load) and 100 is + full loading. + type: integer + options: + description: extend stress-ng options + items: + type: string + type: array + workers: + description: Workers specifies N workers to apply the + stressor. + type: integer + required: + - workers + type: object + memory: + description: MemoryStressor stresses virtual memory out + properties: + options: + description: extend stress-ng options + items: + type: string + type: array + size: + description: Size specifies N bytes consumed per vm worker, + default is the total available memory. One can specify + the size as % of total available memory or in units + of B, KB/KiB, MB/MiB, GB/GiB, TB/TiB. + type: string + workers: + description: Workers specifies N workers to apply the + stressor. + type: integer + required: + - workers + type: object + type: object + value: + description: Value is required when the mode is set to `FixedPodMode` + / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. If `FixedPodMode`, + provide an integer of pods to do chaos action. If `FixedPercentPodMod`, + provide a number from 0-100 to specify the percent of pods the + server can do chaos action. IF `RandomMaxPercentPodMod`, provide + a number from 0-100 to specify the max percent of pods to do + chaos action + type: string + required: + - mode + - selector + type: object + task: + properties: + container: + description: Container is the main container image to run in the + pod + properties: + args: + description: '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. 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. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + command: + description: '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. 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. Cannot be updated. More info: + https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + env: + description: List of environment variables to set in the container. + Cannot be updated. + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must + be a C_IDENTIFIER. + type: string + value: + description: '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 + "".' + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. type: string - value: - description: Value is required when the mode - is set to `FixedPodMode` / `FixedPercentPodMod` - / `RandomMaxPercentPodMod`. If `FixedPodMode`, - provide an integer of pods to do chaos action. - If `FixedPercentPodMod`, provide a number - from 0-100 to specify the percent of pods - the server can do chaos action. IF `RandomMaxPercentPodMod`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' type: string + optional: + description: Specify whether the ConfigMap or + its key must be defined + type: boolean required: - - mode - - selector - - timeOffset + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports + metadata.name, metadata.namespace, metadata.labels, + metadata.annotations, spec.nodeName, spec.serviceAccountName, + status.hostIP, status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in + the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: '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.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of + the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select + from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret or its + key must be defined + type: boolean + required: + - key type: object - type: - description: 'TODO: use a custom type, as `TemplateType` - contains other possible values' - type: string - required: - - schedule - - type type: object - stressChaos: - description: StressChaosSpec defines the desired state - of StressChaos + required: + - name + type: object + type: array + envFrom: + description: 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. + items: + description: EnvFromSource represents the source of a set + of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from properties: - containerNames: - description: ContainerNames indicates list of the - name of affected container. If not set, all containers - will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of - the chaos action - type: string - mode: - description: 'Mode defines the mode to run chaos - action. Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' type: string - selector: - description: Selector is used to select pods that - are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list - of selectors based on set-based label expressions. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. This - array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which - must match a node's labels, and objects must - belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and - objects must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of - condition of a pod at the current time. supported - value: Pending / Running / Succeeded / Failed - / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and - a set values that used to select pods. The - key defines the namespace which pods belong, - and the each values is a set of pod names. - type: object - type: object - stressngStressors: - description: StressngStressors defines plenty of - stressors just like `Stressors` except that it's - an experimental feature and more powerful. You - can define stressors in `stress-ng` (see also - `man stress-ng`) dialect, however not all of the - supported stressors are well tested. It maybe - retired in later releases. You should always use - `Stressors` to define the stressors and use this - only when you want more stressors unsupported - by `Stressors`. When both `StressngStressors` - and `Stressors` are defined, `StressngStressors` - wins. + optional: + description: Specify whether the ConfigMap must + be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to each + key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' type: string - stressors: - description: Stressors defines plenty of stressors - supported to stress system components out. You - can use one or more of them to make up various - kinds of stresses. At least one of the stressors - should be specified. - properties: - cpu: - description: CPUStressor stresses CPU out + optional: + description: Specify whether the Secret must be + defined + type: boolean + type: object + type: object + type: array + image: + description: '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.' + type: string + imagePullPolicy: + description: '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' + type: string + lifecycle: + description: Actions that the management system should take + in response to container lifecycle events. Cannot be updated. + properties: + postStart: + description: 'PostStart is called immediately after a + container is created. If the handler fails, the container + is terminated and restarted according to its restart + policy. Other management of the container blocks until + the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following should + be specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to + perform. + properties: + host: + description: Host name to connect to, defaults + to the pod IP. You probably want to set "Host" + in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes properties: - load: - description: Load specifies P percent loading - per CPU worker. 0 is effectively a sleep - (no load) and 100 is full loading. - type: integer - options: - description: extend stress-ng options - items: - type: string - type: array - workers: - description: Workers specifies N workers - to apply the stressor. - type: integer + name: + description: The header field name + type: string + value: + description: The header field value + type: string required: - - workers + - name + - value type: object - memory: - description: MemoryStressor stresses virtual - memory out + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the + host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action involving + a TCP port. TCP hooks not yet supported TODO: implement + a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, + defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + description: 'PreStop is called immediately before a container + is terminated due to an API request or management event + such as liveness/startup probe failure, preemption, + resource contention, etc. The handler is not called + if the container crashes or exits. The reason for termination + is passed to the handler. The Pod''s termination grace + period countdown begins before the PreStop hooked is + executed. Regardless of the outcome of the handler, + the container will eventually terminate within the Pod''s + termination grace period. Other management of the container + blocks until the hook completes or until the termination + grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following should + be specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to + perform. + properties: + host: + description: Host name to connect to, defaults + to the pod IP. You probably want to set "Host" + in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes properties: - options: - description: extend stress-ng options - items: - type: string - type: array - size: - description: Size specifies N bytes consumed - per vm worker, default is the total available - memory. One can specify the size as % - of total available memory or in units - of B, KB/KiB, MB/MiB, GB/GiB, TB/TiB. + name: + description: The header field name + type: string + value: + description: The header field value type: string - workers: - description: Workers specifies N workers - to apply the stressor. - type: integer required: - - workers + - name + - value type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the + host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action involving + a TCP port. TCP hooks not yet supported TODO: implement + a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, + defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + description: 'Periodic probe of container liveness. Container + will be restarted if the probe fails. Cannot be updated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following should + be specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe + to be considered failed after having succeeded. Defaults + to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to + the pod IP. You probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value type: object - value: - description: Value is required when the mode is - set to `FixedPodMode` / `FixedPercentPodMod` / - `RandomMaxPercentPodMod`. If `FixedPodMode`, provide - an integer of pods to do chaos action. If `FixedPercentPodMod`, - provide a number from 0-100 to specify the percent - of pods the server can do chaos action. IF `RandomMaxPercentPodMod`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access + on the container. Number must be in the range 1 + to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: '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' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: 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. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving + a TCP port. TCP hooks not yet supported TODO: implement + a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access + on the container. Number must be in the range 1 + to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: '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' + format: int32 + type: integer + type: object + name: + description: Name of the container specified as a DNS_LABEL. + Each container in a pod must have a unique name (DNS_LABEL). + Cannot be updated. + type: string + ports: + description: 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. + items: + description: ContainerPort represents a network port in + a single container. + properties: + containerPort: + description: Number of port to expose on the pod's IP + address. This must be a valid port number, 0 < x < + 65536. + format: int32 + type: integer + hostIP: + description: What host IP to bind the external port + to. + type: string + hostPort: + description: Number of port to expose on the host. If + specified, this must be a valid port number, 0 < x + < 65536. If HostNetwork is specified, this must match + ContainerPort. Most containers do not need this. + format: int32 + type: integer + name: + description: If specified, this must be an IANA_SVC_NAME + and unique within the pod. Each named port in a pod + must have a unique name. Name for the port that can + be referred to by services. + type: string + protocol: + default: TCP + description: Protocol for port. Must be UDP, TCP, or + SCTP. Defaults to "TCP". + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + description: 'Periodic probe of container service readiness. + Container will be removed from service endpoints if the + probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following should + be specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: type: string - required: - - mode - - selector - type: object - tasks: + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe + to be considered failed after having succeeded. Defaults + to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to + the pod IP. You probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access + on the container. Number must be in the range 1 + to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: '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' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: 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. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving + a TCP port. TCP hooks not yet supported TODO: implement + a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access + on the container. Number must be in the range 1 + to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: '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' + format: int32 + type: integer + type: object + resources: + description: 'Compute Resources required by this container. + Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: '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-compute-resources-container/' + type: object + type: object + securityContext: + description: 'Security options the pod should run with. More + info: https://kubernetes.io/docs/concepts/policy/security-context/ + More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/' + properties: + allowPrivilegeEscalation: + description: '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' + type: boolean + capabilities: + description: The capabilities to add/drop when running + containers. Defaults to the default set of capabilities + granted by the container runtime. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes + in privileged containers are essentially equivalent + to root on the host. Defaults to false. + type: boolean + procMount: + description: 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. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only root + filesystem. Default is false. + type: boolean + runAsGroup: + description: 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. + format: int64 + type: integer + runAsNonRoot: + description: 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. + type: boolean + runAsUser: + description: 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. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to the + container. If unspecified, the container runtime will + allocate a random SELinux context for each container. May + also be set in PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. + properties: + level: + description: Level is SELinux level label that applies + to the container. + type: string + role: + description: Role is a SELinux role label that applies + to the container. + type: string + type: + description: Type is a SELinux type label that applies + to the container. + type: string + user: + description: User is a SELinux user label that applies + to the container. + type: string + type: object + windowsOptions: + description: The Windows specific settings applied to + all containers. If unspecified, the options from the + PodSecurityContext will be used. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. + properties: + gmsaCredentialSpec: + description: 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. This + field is alpha-level and is only honored by servers + that enable the WindowsGMSA feature flag. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of + the GMSA credential spec to use. This field is alpha-level + and is only honored by servers that enable the WindowsGMSA + feature flag. + type: string + runAsUserName: + description: 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. This field is beta-level and may + be disabled with the WindowsRunAsUserName feature + flag. + type: string + type: object + type: object + startupProbe: + description: 'StartupProbe indicates that the Pod has successfully + initialized. If specified, no other probes are executed + until this completes successfully. If this probe fails, + the Pod will be restarted, just as if the livenessProbe + failed. This can be used to provide different probe parameters + at the beginning of a Pod''s lifecycle, when it might take + a long time to load data or warm a cache, than during steady-state + operation. This cannot be updated. This is an alpha feature + enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following should + be specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe + to be considered failed after having succeeded. Defaults + to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to + the pod IP. You probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access + on the container. Number must be in the range 1 + to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: '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' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: 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. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving + a TCP port. TCP hooks not yet supported TODO: implement + a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access + on the container. Number must be in the range 1 + to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: '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' + format: int32 + type: integer + type: object + stdin: + description: 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. + type: boolean + stdinOnce: + description: 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 + type: boolean + terminationMessagePath: + description: '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.' + type: string + terminationMessagePolicy: + description: 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. + type: string + tty: + description: Whether this container should allocate a TTY + for itself, also requires 'stdin' to be true. Default is + false. + type: boolean + volumeDevices: + description: volumeDevices is the list of block devices to + be used by the container. This is a beta feature. + items: + description: volumeDevice describes a mapping of a raw block + device within a container. + properties: + devicePath: + description: devicePath is the path inside of the container + that the device will be mapped to. + type: string + name: + description: name must match the name of a persistentVolumeClaim + in the pod + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + description: Pod volumes to mount into the container's filesystem. + Cannot be updated. + items: + description: VolumeMount describes a mounting of a Volume + within a container. + properties: + mountPath: + description: Path within the container at which the + volume should be mounted. Must not contain ':'. + type: string + mountPropagation: + description: 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. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write otherwise + (false or unspecified). Defaults to false. + type: boolean + subPath: + description: Path within the volume from which the container's + volume should be mounted. Defaults to "" (volume's + root). + type: string + subPathExpr: + description: 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. + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: 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. + type: string + required: + - name + type: object + volumes: + description: Volumes is a list of volumes that can be mounted + by containers in a template. + items: + description: Volume represents a named volume in a pod that + may be accessed by any container in the pod. + properties: + awsElasticBlockStore: + description: 'AWSElasticBlockStore represents an AWS Disk + resource that is attached to a kubelet''s host machine + and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + properties: + fsType: + description: 'Filesystem type of the volume that you + want to mount. Tip: Ensure that the filesystem type + is supported by the host operating system. Examples: + "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + TODO: how do we prevent errors in the filesystem from + compromising the machine' + type: string + partition: + description: 'The partition in the volume that you want + to mount. If omitted, the default is to mount by volume + name. Examples: For volume /dev/sda1, you specify + the partition as "1". Similarly, the volume partition + for /dev/sda is "0" (or you can leave the property + empty).' + format: int32 + type: integer + readOnly: + description: 'Specify "true" to force and set the ReadOnly + property in VolumeMounts to "true". If omitted, the + default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: boolean + volumeID: + description: 'Unique ID of the persistent disk resource + in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: string + required: + - volumeID + type: object + azureDisk: + description: AzureDisk represents an Azure Data Disk mount + on the host and bind mount to the pod. + properties: + cachingMode: + description: 'Host Caching mode: None, Read Only, Read + Write.' + type: string + diskName: + description: The Name of the data disk in the blob storage + type: string + diskURI: + description: The URI the data disk in the blob storage + type: string + fsType: + description: Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". Implicitly inferred to be "ext4" if + unspecified. + type: string + kind: + description: 'Expected values Shared: multiple blob + disks per storage account Dedicated: single blob + disk per storage account Managed: azure managed data + disk (only in managed availability set). defaults + to shared' + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + description: AzureFile represents an Azure File Service + mount on the host and bind mount to the pod. + properties: + readOnly: + description: Defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretName: + description: the name of secret that contains Azure + Storage Account Name and Key + type: string + shareName: + description: Share Name + type: string + required: + - secretName + - shareName + type: object + cephfs: + description: CephFS represents a Ceph FS mount on the host + that shares a pod's lifetime + properties: + monitors: + description: 'Required: Monitors is a collection of + Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' items: type: string type: array - templateType: + path: + description: 'Optional: Used as the mounted root, rather + than the full Ceph tree, default is /' type: string - timeChaos: - description: TimeChaosSpec defines the desired state - of TimeChaos + readOnly: + description: 'Optional: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts. + More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: boolean + secretFile: + description: 'Optional: SecretFile is the path to key + ring for User, default is /etc/ceph/user.secret More + info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + secretRef: + description: 'Optional: SecretRef is reference to the + authentication secret for User, default is empty. + More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' properties: - clockIds: - description: ClockIds defines all affected clock - id All available options are ["CLOCK_REALTIME","CLOCK_MONOTONIC","CLOCK_PROCESS_CPUTIME_ID","CLOCK_THREAD_CPUTIME_ID", - "CLOCK_MONOTONIC_RAW","CLOCK_REALTIME_COARSE","CLOCK_MONOTONIC_COARSE","CLOCK_BOOTTIME","CLOCK_REALTIME_ALARM", - "CLOCK_BOOTTIME_ALARM"] Default value is ["CLOCK_REALTIME"] - items: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + type: object + user: + description: 'Optional: User is the rados user name, + default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + required: + - monitors + type: object + cinder: + description: 'Cinder represents a cinder volume attached + and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + properties: + fsType: + description: 'Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Examples: + "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + readOnly: + description: 'Optional: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts. + More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: boolean + secretRef: + description: 'Optional: points to a secret object containing + parameters used to connect to OpenStack.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + type: object + volumeID: + description: 'volume id used to identify the volume + in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + required: + - volumeID + type: object + configMap: + description: ConfigMap represents a configMap that should + populate this volume + properties: + defaultMode: + description: 'Optional: mode bits to use on created + files by default. Must be a value between 0 and 0777. + Defaults to 0644. Directories within the path are + not affected by this setting. This might be in conflict + with other options that affect the file mode, like + fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + items: + description: If unspecified, each key-value pair in + the Data field of the referenced ConfigMap will be + projected into the volume as a file whose name is + the key and content is the value. If specified, the + listed keys will be projected into the specified paths, + and unlisted keys will not be present. If a key is + specified which is not present in the ConfigMap, the + volume setup will error unless it is marked optional. + Paths must be relative and may not contain the '..' + path or start with '..'. + items: + description: Maps a string key to a path within a + volume. + properties: + key: + description: The key to project. type: string - type: array - containerNames: - description: ContainerNames indicates list of the - name of affected container. If not set, all containers - will be injected - items: + mode: + description: 'Optional: mode bits to use on this + file, must be a value between 0 and 0777. If + not specified, the volume defaultMode will be + used. This might be in conflict with other options + that affect the file mode, like fsGroup, and + the result can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to + map the key to. May not be an absolute path. + May not contain the path element '..'. May not + start with the string '..'. type: string - type: array - duration: - description: Duration represents the duration of - the chaos action - type: string - mode: - description: 'Mode defines the mode to run chaos - action. Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its keys + must be defined + type: boolean + type: object + csi: + description: CSI (Container Storage Interface) represents + storage that is handled by an external CSI driver (Alpha + feature). + properties: + driver: + description: Driver is the name of the CSI driver that + handles this volume. Consult with your admin for the + correct name as registered in the cluster. + type: string + fsType: + description: Filesystem type to mount. Ex. "ext4", "xfs", + "ntfs". If not provided, the empty value is passed + to the associated CSI driver which will determine + the default filesystem to apply. + type: string + nodePublishSecretRef: + description: NodePublishSecretRef is a reference to + the secret object containing sensitive information + to pass to the CSI driver to complete the CSI NodePublishVolume + and NodeUnpublishVolume calls. This field is optional, + and may be empty if no secret is required. If the + secret object contains more than one secret, all secret + references are passed. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' type: string - selector: - description: Selector is used to select pods that - are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list - of selectors based on set-based label expressions. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. This - array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: + type: object + readOnly: + description: Specifies a read-only configuration for + the volume. Defaults to false (read/write). + type: boolean + volumeAttributes: + additionalProperties: + type: string + description: VolumeAttributes stores driver-specific + properties that are passed to the CSI driver. Consult + your driver's documentation for supported values. + type: object + required: + - driver + type: object + downwardAPI: + description: DownwardAPI represents downward API about the + pod that should populate this volume + properties: + defaultMode: + description: 'Optional: mode bits to use on created + files by default. Must be a value between 0 and 0777. + Defaults to 0644. Directories within the path are + not affected by this setting. This might be in conflict + with other options that affect the file mode, like + fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + items: + description: Items is a list of downward API volume + file + items: + description: DownwardAPIVolumeFile represents information + to create the file containing the pod field + properties: + fieldRef: + description: 'Required: Selects a field of the + pod: only annotations, labels, name and namespace + are supported.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". type: string - type: array - nodeSelectors: - additionalProperties: + fieldPath: + description: Path of the field to select in + the specified API version. type: string - description: Map of string keys and values that - can be used to select nodes. Selector which - must match a node's labels, and objects must - belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and - objects must belong to these nodes. - items: + required: + - fieldPath + type: object + mode: + description: 'Optional: mode bits to use on this + file, must be a value between 0 and 0777. If + not specified, the volume defaultMode will be + used. This might be in conflict with other options + that affect the file mode, like fsGroup, and + the result can be other mode bits set.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative + path name of the file to be created. Must not + be absolute or contain the ''..'' path. Must + be utf-8 encoded. The first item of the relative + path must not start with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, requests.cpu and requests.memory) + are currently supported.' + properties: + containerName: + description: 'Container name: required for + volumes, optional for env vars' type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of - condition of a pod at the current time. supported - value: Pending / Running / Succeeded / Failed - / Unknown' - items: + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of + the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and - a set values that used to select pods. The - key defines the namespace which pods belong, - and the each values is a set of pod names. - type: object - type: object - timeOffset: - description: TimeOffset defines the delta time of - injected program. It's a possibly signed sequence - of decimal numbers, such as "300ms", "-1.5h" or - "2h45m". Valid time units are "ns", "us" (or "µs"), - "ms", "s", "m", "h". + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + emptyDir: + description: 'EmptyDir represents a temporary directory + that shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + properties: + medium: + description: 'What type of storage medium should back + this directory. The default is "" which means to use + the node''s default medium. Must be an empty string + (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + description: 'Total amount of local storage required + for this EmptyDir volume. The size limit is also applicable + for memory medium. The maximum usage on memory medium + EmptyDir would be the minimum value between the SizeLimit + specified here and the sum of memory limits of all + containers in a pod. The default is nil which means + that the limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir' + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + fc: + description: FC represents a Fibre Channel resource that + is attached to a kubelet's host machine and then exposed + to the pod. + properties: + fsType: + description: 'Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". Implicitly inferred to be "ext4" if + unspecified. TODO: how do we prevent errors in the + filesystem from compromising the machine' + type: string + lun: + description: 'Optional: FC target lun number' + format: int32 + type: integer + readOnly: + description: 'Optional: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts.' + type: boolean + targetWWNs: + description: 'Optional: FC target worldwide names (WWNs)' + items: + type: string + type: array + wwids: + description: 'Optional: FC volume world wide identifiers + (wwids) Either wwids or combination of targetWWNs + and lun must be set, but not both simultaneously.' + items: + type: string + type: array + type: object + flexVolume: + description: FlexVolume represents a generic volume resource + that is provisioned/attached using an exec based plugin. + properties: + driver: + description: Driver is the name of the driver to use + for this volume. + type: string + fsType: + description: Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". The default filesystem depends on FlexVolume + script. + type: string + options: + additionalProperties: + type: string + description: 'Optional: Extra command options if any.' + type: object + readOnly: + description: 'Optional: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts.' + type: boolean + secretRef: + description: 'Optional: SecretRef is reference to the + secret object containing sensitive information to + pass to the plugin scripts. This may be empty if no + secret object is specified. If the secret object contains + more than one secret, all secrets are passed to the + plugin scripts.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' type: string - value: - description: Value is required when the mode is - set to `FixedPodMode` / `FixedPercentPodMod` / - `RandomMaxPercentPodMod`. If `FixedPodMode`, provide - an integer of pods to do chaos action. If `FixedPercentPodMod`, - provide a number from 0-100 to specify the percent - of pods the server can do chaos action. IF `RandomMaxPercentPodMod`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action + type: object + required: + - driver + type: object + flocker: + description: Flocker represents a Flocker volume attached + to a kubelet's host machine. This depends on the Flocker + control service being running + properties: + datasetName: + description: Name of the dataset stored as metadata + -> name on the dataset for Flocker should be considered + as deprecated + type: string + datasetUUID: + description: UUID of the dataset. This is unique identifier + of a Flocker dataset + type: string + type: object + gcePersistentDisk: + description: 'GCEPersistentDisk represents a GCE Disk resource + that is attached to a kubelet''s host machine and then + exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + properties: + fsType: + description: 'Filesystem type of the volume that you + want to mount. Tip: Ensure that the filesystem type + is supported by the host operating system. Examples: + "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + TODO: how do we prevent errors in the filesystem from + compromising the machine' + type: string + partition: + description: 'The partition in the volume that you want + to mount. If omitted, the default is to mount by volume + name. Examples: For volume /dev/sda1, you specify + the partition as "1". Similarly, the volume partition + for /dev/sda is "0" (or you can leave the property + empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + format: int32 + type: integer + pdName: + description: 'Unique name of the PD resource in GCE. + Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: string + readOnly: + description: 'ReadOnly here will force the ReadOnly + setting in VolumeMounts. Defaults to false. More info: + https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: boolean + required: + - pdName + type: object + gitRepo: + description: 'GitRepo represents a git repository at a particular + revision. DEPRECATED: GitRepo is deprecated. To provision + a container with a git repo, mount an EmptyDir into an + InitContainer that clones the repo using git, then mount + the EmptyDir into the Pod''s container.' + properties: + directory: + description: Target directory name. Must not contain + or start with '..'. If '.' is supplied, the volume + directory will be the git repository. Otherwise, + if specified, the volume will contain the git repository + in the subdirectory with the given name. + type: string + repository: + description: Repository URL + type: string + revision: + description: Commit hash for the specified revision. + type: string + required: + - repository + type: object + glusterfs: + description: 'Glusterfs represents a Glusterfs mount on + the host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md' + properties: + endpoints: + description: 'EndpointsName is the endpoint name that + details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + path: + description: 'Path is the Glusterfs volume path. More + info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + readOnly: + description: 'ReadOnly here will force the Glusterfs + volume to be mounted with read-only permissions. Defaults + to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: boolean + required: + - endpoints + - path + type: object + hostPath: + description: 'HostPath represents a pre-existing file or + directory on the host machine that is directly exposed + to the container. This is generally used for system agents + or other privileged things that are allowed to see the + host machine. Most containers will NOT need this. More + info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath + --- TODO(jonesdl) We need to restrict who can use host + directory mounts and who can/can not mount host directories + as read/write.' + properties: + path: + description: 'Path of the directory on the host. If + the path is a symlink, it will follow the link to + the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + type: + description: 'Type for HostPath Volume Defaults to "" + More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + required: + - path + type: object + iscsi: + description: 'ISCSI represents an ISCSI Disk resource that + is attached to a kubelet''s host machine and then exposed + to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' + properties: + chapAuthDiscovery: + description: whether support iSCSI Discovery CHAP authentication + type: boolean + chapAuthSession: + description: whether support iSCSI Session CHAP authentication + type: boolean + fsType: + description: 'Filesystem type of the volume that you + want to mount. Tip: Ensure that the filesystem type + is supported by the host operating system. Examples: + "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi + TODO: how do we prevent errors in the filesystem from + compromising the machine' + type: string + initiatorName: + description: Custom iSCSI Initiator Name. If initiatorName + is specified with iscsiInterface simultaneously, new + iSCSI interface : will + be created for the connection. + type: string + iqn: + description: Target iSCSI Qualified Name. + type: string + iscsiInterface: + description: iSCSI Interface Name that uses an iSCSI + transport. Defaults to 'default' (tcp). + type: string + lun: + description: iSCSI Target Lun number. + format: int32 + type: integer + portals: + description: iSCSI Target Portal List. The portal is + either an IP or ip_addr:port if the port is other + than default (typically TCP ports 860 and 3260). + items: + type: string + type: array + readOnly: + description: ReadOnly here will force the ReadOnly setting + in VolumeMounts. Defaults to false. + type: boolean + secretRef: + description: CHAP Secret for iSCSI target and initiator + authentication + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' type: string - required: - - mode - - selector - - timeOffset type: object + targetPortal: + description: iSCSI Target Portal. The Portal is either + an IP or ip_addr:port if the port is other than default + (typically TCP ports 860 and 3260). + type: string required: - - name - - templateType + - iqn + - lun + - targetPortal type: object - type: array - required: - - entry - - templates - type: object - required: - - schedule - - type - type: object - startTime: - format: date-time - type: string - stressChaos: - description: StressChaosSpec defines the desired state of StressChaos - properties: - containerNames: - description: ContainerNames indicates list of the name of affected - container. If not set, all containers will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of the chaos action - type: string - mode: - description: 'Mode defines the mode to run chaos action. Supported - mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - selector: - description: Selector is used to select pods that are used to - inject chaos action. - properties: - annotationSelectors: - additionalProperties: + name: + description: 'Volume''s name. Must be a DNS_LABEL and unique + within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' type: string - description: Map of string keys and values that can be used - to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that can - be used to select objects. A list of selectors based on - set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that relates - the key and values. + nfs: + description: 'NFS represents an NFS mount on the host that + shares a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' properties: - key: - description: key is the label key that the selector - applies to. + path: + description: 'Path that is exported by the NFS server. + More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. + readOnly: + description: 'ReadOnly here will force the NFS export + to be mounted with read-only permissions. Defaults + to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: boolean + server: + description: 'Server is the hostname or IP address of + the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' type: string - values: - description: values is an array of string values. If - the operator is In or NotIn, the values array must - be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced - during a strategic merge patch. + required: + - path + - server + type: object + persistentVolumeClaim: + description: 'PersistentVolumeClaimVolumeSource represents + a reference to a PersistentVolumeClaim in the same namespace. + More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + properties: + claimName: + description: 'ClaimName is the name of a PersistentVolumeClaim + in the same namespace as the pod using this volume. + More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + type: string + readOnly: + description: Will force the ReadOnly setting in VolumeMounts. + Default false. + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + description: PhotonPersistentDisk represents a PhotonController + persistent disk attached and mounted on kubelets host + machine + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". Implicitly inferred to be "ext4" if + unspecified. + type: string + pdID: + description: ID that identifies Photon Controller persistent + disk + type: string + required: + - pdID + type: object + portworxVolume: + description: PortworxVolume represents a portworx volume + attached and mounted on kubelets host machine + properties: + fsType: + description: FSType represents the filesystem type to + mount Must be a filesystem type supported by the host + operating system. Ex. "ext4", "xfs". Implicitly inferred + to be "ext4" if unspecified. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + volumeID: + description: VolumeID uniquely identifies a Portworx + volume + type: string + required: + - volumeID + type: object + projected: + description: Items for all in one resources secrets, configmaps, + and downward API + properties: + defaultMode: + description: Mode bits to use on created files by default. + Must be a value between 0 and 0777. Directories within + the path are not affected by this setting. This might + be in conflict with other options that affect the + file mode, like fsGroup, and the result can be other + mode bits set. + format: int32 + type: integer + sources: + description: list of volume projections items: - type: string + description: Projection that may be projected along + with other supported volume types + properties: + configMap: + description: information about the configMap data + to project + properties: + items: + description: If unspecified, each key-value + pair in the Data field of the referenced + ConfigMap will be projected into the volume + as a file whose name is the key and content + is the value. If specified, the listed keys + will be projected into the specified paths, + and unlisted keys will not be present. If + a key is specified which is not present + in the ConfigMap, the volume setup will + error unless it is marked optional. Paths + must be relative and may not contain the + '..' path or start with '..'. + items: + description: Maps a string key to a path + within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to + use on this file, must be a value + between 0 and 0777. If not specified, + the volume defaultMode will be used. + This might be in conflict with other + options that affect the file mode, + like fsGroup, and the result can be + other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the + file to map the key to. May not be + an absolute path. May not contain + the path element '..'. May not start + with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap + or its keys must be defined + type: boolean + type: object + downwardAPI: + description: information about the downwardAPI + data to project + properties: + items: + description: Items is a list of DownwardAPIVolume + file + items: + description: DownwardAPIVolumeFile represents + information to create the file containing + the pod field + properties: + fieldRef: + description: 'Required: Selects a field + of the pod: only annotations, labels, + name and namespace are supported.' + properties: + apiVersion: + description: Version of the schema + the FieldPath is written in terms + of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to + select in the specified API version. + type: string + required: + - fieldPath + type: object + mode: + description: 'Optional: mode bits to + use on this file, must be a value + between 0 and 0777. If not specified, + the volume defaultMode will be used. + This might be in conflict with other + options that affect the file mode, + like fsGroup, and the result can be + other mode bits set.' + format: int32 + type: integer + path: + description: 'Required: Path is the + relative path name of the file to + be created. Must not be absolute or + contain the ''..'' path. Must be utf-8 + encoded. The first item of the relative + path must not start with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of + the container: only resources limits + and requests (limits.cpu, limits.memory, + requests.cpu and requests.memory) + are currently supported.' + properties: + containerName: + description: 'Container name: required + for volumes, optional for env + vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output + format of the exposed resources, + defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource + to select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + secret: + description: information about the secret data + to project + properties: + items: + description: If unspecified, each key-value + pair in the Data field of the referenced + Secret will be projected into the volume + as a file whose name is the key and content + is the value. If specified, the listed keys + will be projected into the specified paths, + and unlisted keys will not be present. If + a key is specified which is not present + in the Secret, the volume setup will error + unless it is marked optional. Paths must + be relative and may not contain the '..' + path or start with '..'. + items: + description: Maps a string key to a path + within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to + use on this file, must be a value + between 0 and 0777. If not specified, + the volume defaultMode will be used. + This might be in conflict with other + options that affect the file mode, + like fsGroup, and the result can be + other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the + file to map the key to. May not be + an absolute path. May not contain + the path element '..'. May not start + with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret or + its key must be defined + type: boolean + type: object + serviceAccountToken: + description: information about the serviceAccountToken + data to project + properties: + audience: + description: Audience is the intended audience + of the token. A recipient of a token must + identify itself with an identifier specified + in the audience of the token, and otherwise + should reject the token. The audience defaults + to the identifier of the apiserver. + type: string + expirationSeconds: + description: ExpirationSeconds is the requested + duration of validity of the service account + token. As the token approaches expiration, + the kubelet volume plugin will proactively + rotate the service account token. The kubelet + will start trying to rotate the token if + the token is older than 80 percent of its + time to live or if the token is older than + 24 hours.Defaults to 1 hour and must be + at least 10 minutes. + format: int64 + type: integer + path: + description: Path is the path relative to + the mount point of the file to project the + token into. + type: string + required: + - path + type: object + type: object type: array required: - - key - - operator + - sources type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which objects - belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select nodes. Selector which must match a node's labels, - and objects must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects must - belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition of a - pod at the current time. supported value: Pending / Running - / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values - that used to select pods. The key defines the namespace - which pods belong, and the each values is a set of pod names. - type: object - type: object - stressngStressors: - description: StressngStressors defines plenty of stressors just - like `Stressors` except that it's an experimental feature and - more powerful. You can define stressors in `stress-ng` (see - also `man stress-ng`) dialect, however not all of the supported - stressors are well tested. It maybe retired in later releases. - You should always use `Stressors` to define the stressors and - use this only when you want more stressors unsupported by `Stressors`. - When both `StressngStressors` and `Stressors` are defined, `StressngStressors` - wins. - type: string - stressors: - description: Stressors defines plenty of stressors supported to - stress system components out. You can use one or more of them - to make up various kinds of stresses. At least one of the stressors - should be specified. - properties: - cpu: - description: CPUStressor stresses CPU out - properties: - load: - description: Load specifies P percent loading per CPU - worker. 0 is effectively a sleep (no load) and 100 is - full loading. - type: integer - options: - description: extend stress-ng options - items: + quobyte: + description: Quobyte represents a Quobyte mount on the host + that shares a pod's lifetime + properties: + group: + description: Group to map volume access to Default is + no group + type: string + readOnly: + description: ReadOnly here will force the Quobyte volume + to be mounted with read-only permissions. Defaults + to false. + type: boolean + registry: + description: Registry represents a single or multiple + Quobyte Registry services specified as a string as + host:port pair (multiple entries are separated with + commas) which acts as the central registry for volumes + type: string + tenant: + description: Tenant owning the given Quobyte volume + in the Backend Used with dynamically provisioned Quobyte + volumes, value is set by the plugin + type: string + user: + description: User to map volume access to Defaults to + serivceaccount user + type: string + volume: + description: Volume is a string that references an already + created Quobyte volume by name. type: string - type: array - workers: - description: Workers specifies N workers to apply the - stressor. - type: integer - required: - - workers - type: object - memory: - description: MemoryStressor stresses virtual memory out - properties: - options: - description: extend stress-ng options + required: + - registry + - volume + type: object + rbd: + description: 'RBD represents a Rados Block Device mount + on the host that shares a pod''s lifetime. More info: + https://examples.k8s.io/volumes/rbd/README.md' + properties: + fsType: + description: 'Filesystem type of the volume that you + want to mount. Tip: Ensure that the filesystem type + is supported by the host operating system. Examples: + "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd + TODO: how do we prevent errors in the filesystem from + compromising the machine' + type: string + image: + description: 'The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + keyring: + description: 'Keyring is the path to key ring for RBDUser. + Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + monitors: + description: 'A collection of Ceph monitors. More info: + https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + items: + type: string + type: array + pool: + description: 'The rados pool name. Default is rbd. More + info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + readOnly: + description: 'ReadOnly here will force the ReadOnly + setting in VolumeMounts. Defaults to false. More info: + https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: boolean + secretRef: + description: 'SecretRef is name of the authentication + secret for RBDUser. If provided overrides keyring. + Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + type: object + user: + description: 'The rados user name. Default is admin. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + required: + - image + - monitors + type: object + scaleIO: + description: ScaleIO represents a ScaleIO persistent volume + attached and mounted on Kubernetes nodes. + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". Default is "xfs". + type: string + gateway: + description: The host address of the ScaleIO API Gateway. + type: string + protectionDomain: + description: The name of the ScaleIO Protection Domain + for the configured storage. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: SecretRef references to the secret for + ScaleIO user and other sensitive information. If this + is not provided, Login operation will fail. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + type: object + sslEnabled: + description: Flag to enable/disable SSL communication + with Gateway, default false + type: boolean + storageMode: + description: Indicates whether the storage for a volume + should be ThickProvisioned or ThinProvisioned. Default + is ThinProvisioned. + type: string + storagePool: + description: The ScaleIO Storage Pool associated with + the protection domain. + type: string + system: + description: The name of the storage system as configured + in ScaleIO. + type: string + volumeName: + description: The name of a volume already created in + the ScaleIO system that is associated with this volume + source. + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + description: 'Secret represents a secret that should populate + this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + properties: + defaultMode: + description: 'Optional: mode bits to use on created + files by default. Must be a value between 0 and 0777. + Defaults to 0644. Directories within the path are + not affected by this setting. This might be in conflict + with other options that affect the file mode, like + fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer items: + description: If unspecified, each key-value pair in + the Data field of the referenced Secret will be projected + into the volume as a file whose name is the key and + content is the value. If specified, the listed keys + will be projected into the specified paths, and unlisted + keys will not be present. If a key is specified which + is not present in the Secret, the volume setup will + error unless it is marked optional. Paths must be + relative and may not contain the '..' path or start + with '..'. + items: + description: Maps a string key to a path within a + volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use on this + file, must be a value between 0 and 0777. If + not specified, the volume defaultMode will be + used. This might be in conflict with other options + that affect the file mode, like fsGroup, and + the result can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to + map the key to. May not be an absolute path. + May not contain the path element '..'. May not + start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + optional: + description: Specify whether the Secret or its keys + must be defined + type: boolean + secretName: + description: 'Name of the secret in the pod''s namespace + to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' type: string - type: array - size: - description: Size specifies N bytes consumed per vm worker, - default is the total available memory. One can specify - the size as % of total available memory or in units - of B, KB/KiB, MB/MiB, GB/GiB, TB/TiB. - type: string - workers: - description: Workers specifies N workers to apply the - stressor. - type: integer - required: - - workers - type: object - type: object - value: - description: Value is required when the mode is set to `FixedPodMode` - / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. If `FixedPodMode`, - provide an integer of pods to do chaos action. If `FixedPercentPodMod`, - provide a number from 0-100 to specify the percent of pods the - server can do chaos action. IF `RandomMaxPercentPodMod`, provide - a number from 0-100 to specify the max percent of pods to do - chaos action - type: string - required: - - mode - - selector + type: object + storageos: + description: StorageOS represents a StorageOS volume attached + and mounted on Kubernetes nodes. + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". Implicitly inferred to be "ext4" if + unspecified. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: SecretRef specifies the secret to use for + obtaining the StorageOS API credentials. If not specified, + default values will be attempted. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + type: object + volumeName: + description: VolumeName is the human-readable name of + the StorageOS volume. Volume names are only unique + within a namespace. + type: string + volumeNamespace: + description: VolumeNamespace specifies the scope of + the volume within StorageOS. If no namespace is specified + then the Pod's namespace will be used. This allows + the Kubernetes name scoping to be mirrored within + StorageOS for tighter integration. Set VolumeName + to any name to override the default behaviour. Set + to "default" if you are not using namespaces within + StorageOS. Namespaces that do not pre-exist within + StorageOS will be created. + type: string + type: object + vsphereVolume: + description: VsphereVolume represents a vSphere volume attached + and mounted on kubelets host machine + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". Implicitly inferred to be "ext4" if + unspecified. + type: string + storagePolicyID: + description: Storage Policy Based Management (SPBM) + profile ID associated with the StoragePolicyName. + type: string + storagePolicyName: + description: Storage Policy Based Management (SPBM) + profile name. + type: string + volumePath: + description: Path that identifies vSphere volume vmdk + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array type: object tasks: items: @@ -18276,8 +25944,29 @@ spec: - kind - name type: object + conditionalBranches: + description: ConditionalBranches records the evaluation result of + each ConditionalTask + properties: + branches: + items: + properties: + run: + type: string + task: + type: string + required: + - run + - task + type: object + type: array + context: + items: + type: string + type: array + type: object conditions: - description: Represents the latest available observations of a worklfow + description: Represents the latest available observations of a workflow node's current state. items: properties: @@ -18406,6 +26095,19 @@ spec: - awsRegion - ec2Instance type: object + conditionalTasks: + description: ConditionalTasks describes the conditional branches + of custom tasks. Only used when Type is TypeTask. + items: + properties: + expression: + type: string + task: + type: string + required: + - task + type: object + type: array dnsChaos: description: DNSChaosSpec defines the desired state of DNSChaos properties: @@ -20032,9 +27734,9 @@ spec: - selector type: object schedule: - description: ChaosOnlyScheduleSpec is very similar with ScheduleSpec, - but it could not schedule Workflow because we could not resolve - nested CRD now + description: Schedule describe the Schedule(describing scheduled + chaos) to be injected with chaos nodes. Only used when Type + is TypeSchedule. properties: awsChaos: description: AwsChaosSpec is the content of the specification @@ -20345,86 +28047,364 @@ spec: - type - value type: object - headers: - description: 'Headers is a rule to append http headers - of target. For example: `[["Set-Cookie", ""], ["Set-Cookie", ""]]`.' + headers: + description: 'Headers is a rule to append http headers + of target. For example: `[["Set-Cookie", ""], ["Set-Cookie", ""]]`.' + items: + items: + type: string + type: array + type: array + queries: + description: 'Queries is a rule to append uri queries + of target(Request only). For example: `[["foo", + "bar"], ["foo", "unknown"]]`.' + items: + items: + type: string + type: array + type: array + type: object + path: + description: Path is a rule to select target by uri + path in http request. + type: string + port: + description: Port represents the target port to be proxy + of. + format: int32 + type: integer + replace: + description: Replace is a rule to replace some contents + in target. + properties: + body: + description: Body is a rule to replace http message + body in target. + format: byte + type: string + code: + description: Code is a rule to replace http status + code in response. + format: int32 + type: integer + headers: + additionalProperties: + type: string + description: Headers is a rule to replace http headers + of target. The key-value pairs represent header + name and header value pairs. + type: object + method: + description: Method is a rule to replace http method + in request. + type: string + path: + description: Path is rule to to replace uri path + in http request. + type: string + queries: + additionalProperties: + type: string + description: 'Queries is a rule to replace uri queries + in http request. For example, with value `{ "foo": + "unknown" }`, the `/?foo=bar` will be altered + to `/?foo=unknown`,' + type: object + type: object + request_headers: + additionalProperties: + type: string + description: RequestHeaders is a rule to select target + by http headers in request. The key-value pairs represent + header name and header value pairs. + type: object + response_headers: + additionalProperties: + type: string + description: ResponseHeaders is a rule to select target + by http headers in response. The key-value pairs represent + header name and header value pairs. + type: object + selector: + description: Selector is used to select pods that are + used to inject chaos action. + properties: + annotationSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select objects. A selector based + on annotations. + type: object + expressionSelectors: + description: a slice of label selector expressions + that can be used to select objects. A list of + selectors based on set-based label expressions. + items: + description: A label selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If the + operator is Exists or DoesNotExist, the + values array must be empty. This array is + replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + fieldSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select objects. A selector based + on fields. + type: object + labelSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select objects. A selector based + on labels. + type: object + namespaces: + description: Namespaces is a set of namespace to + which objects belong. items: - items: - type: string - type: array + type: string type: array - queries: - description: 'Queries is a rule to append uri queries - of target(Request only). For example: `[["foo", - "bar"], ["foo", "unknown"]]`.' + nodeSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select nodes. Selector which must + match a node's labels, and objects must belong + to these selected nodes. + type: object + nodes: + description: Nodes is a set of node name and objects + must belong to these nodes. + items: + type: string + type: array + podPhaseSelectors: + description: 'PodPhaseSelectors is a set of condition + of a pod at the current time. supported value: + Pending / Running / Succeeded / Failed / Unknown' items: + type: string + type: array + pods: + additionalProperties: items: type: string type: array - type: array + description: Pods is a map of string keys and a + set values that used to select pods. The key defines + the namespace which pods belong, and the each + values is a set of pod names. + type: object type: object - path: - description: Path is a rule to select target by uri - path in http request. + target: + description: Target is the object to be selected and + injected. + enum: + - Request + - Response type: string - port: - description: Port represents the target port to be proxy - of. - format: int32 - type: integer - replace: - description: Replace is a rule to replace some contents - in target. + value: + description: Value is required when the mode is set + to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. + If `FixedPodMode`, provide an integer of pods to do + chaos action. If `FixedPercentPodMod`, provide a number + from 0-100 to specify the percent of pods the server + can do chaos action. IF `RandomMaxPercentPodMod`, provide + a number from 0-100 to specify the max percent of + pods to do chaos action + type: string + required: + - mode + - selector + - target + type: object + ioChaos: + description: IOChaosSpec defines the desired state of IOChaos + properties: + action: + description: 'Action defines the specific pod chaos + action. Supported action: latency / fault / attrOverride + / mistake' + enum: + - latency + - fault + - attrOverride + - mistake + type: string + attr: + description: Attr defines the overrided attribution properties: - body: - description: Body is a rule to replace http message - body in target. - format: byte - type: string - code: - description: Code is a rule to replace http status - code in response. - format: int32 + atime: + description: Timespec represents a time + properties: + nsec: + format: int64 + type: integer + sec: + format: int64 + type: integer + required: + - nsec + - sec + type: object + blocks: + format: int64 type: integer - headers: - additionalProperties: - type: string - description: Headers is a rule to replace http headers - of target. The key-value pairs represent header - name and header value pairs. + ctime: + description: Timespec represents a time + properties: + nsec: + format: int64 + type: integer + sec: + format: int64 + type: integer + required: + - nsec + - sec type: object - method: - description: Method is a rule to replace http method - in request. - type: string - path: - description: Path is rule to to replace uri path - in http request. + gid: + format: int32 + type: integer + ino: + format: int64 + type: integer + kind: + description: FileType represents type of a file type: string - queries: - additionalProperties: - type: string - description: 'Queries is a rule to replace uri queries - in http request. For example, with value `{ "foo": - "unknown" }`, the `/?foo=bar` will be altered - to `/?foo=unknown`,' + mtime: + description: Timespec represents a time + properties: + nsec: + format: int64 + type: integer + sec: + format: int64 + type: integer + required: + - nsec + - sec type: object + nlink: + format: int32 + type: integer + perm: + type: integer + rdev: + format: int32 + type: integer + size: + format: int64 + type: integer + uid: + format: int32 + type: integer type: object - request_headers: - additionalProperties: + containerNames: + description: ContainerNames indicates list of the name + of affected container. If not set, all containers + will be injected + items: type: string - description: RequestHeaders is a rule to select target - by http headers in request. The key-value pairs represent - header name and header value pairs. - type: object - response_headers: - additionalProperties: + type: array + delay: + description: Delay defines the value of I/O chaos action + delay. A delay string is a possibly signed sequence + of decimal numbers, each with optional fraction and + a unit suffix, such as "300ms". Valid time units are + "ns", "us" (or "µs"), "ms", "s", "m", "h". + type: string + duration: + description: Duration represents the duration of the + chaos action. It is required when the action is `PodFailureAction`. + A duration string is a possibly signed sequence of + decimal numbers, each with optional fraction and a + unit suffix, such as "300ms", "-1.5h" or "2h45m". + Valid time units are "ns", "us" (or "µs"), "ms", "s", + "m", "h". + type: string + errno: + description: 'Errno defines the error code that returned + by I/O action. refer to: https://www-numi.fnal.gov/offline_software/srt_public_context/WebDocs/Errors/unix_system_errors.html' + format: int32 + type: integer + methods: + description: 'Methods defines the I/O methods for injecting + I/O chaos action. default: all I/O methods.' + items: type: string - description: ResponseHeaders is a rule to select target - by http headers in response. The key-value pairs represent - header name and header value pairs. + type: array + mistake: + description: Mistake defines what types of incorrectness + are injected to IO operations + properties: + filling: + description: Filling determines what is filled in + the miskate data. + enum: + - zero + - random + type: string + maxLength: + description: Max length of each wrong data segment + in bytes + format: int64 + minimum: 1 + type: integer + maxOccurrences: + description: There will be [1, MaxOccurrences] segments + of wrong data. + format: int64 + minimum: 1 + type: integer type: object + mode: + description: 'Mode defines the mode to run chaos action. + Supported mode: one / all / fixed / fixed-percent + / random-max-percent' + enum: + - one + - all + - fixed + - fixed-percent + - random-max-percent + type: string + path: + description: Path defines the path of files for injecting + I/O chaos action. + type: string + percent: + description: 'Percent defines the percentage of injection + errors and provides a number from 0-100. default: + 100.' + type: integer selector: description: Selector is used to select pods that are used to inject chaos action. @@ -20521,13 +28501,6 @@ spec: values is a set of pod names. type: object type: object - target: - description: Target is the object to be selected and - injected. - enum: - - Request - - Response - type: string value: description: Value is required when the mode is set to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. @@ -20538,93 +28511,34 @@ spec: a number from 0-100 to specify the max percent of pods to do chaos action type: string + volumePath: + description: VolumePath represents the mount path of + injected volume + type: string required: + - action - mode - selector - - target + - volumePath type: object - ioChaos: - description: IOChaosSpec defines the desired state of IOChaos + jvmChaos: + description: JVMChaosSpec defines the desired state of JVMChaos properties: action: - description: 'Action defines the specific pod chaos - action. Supported action: latency / fault / attrOverride - / mistake' + description: 'Action defines the specific jvm chaos + action. Supported action: delay;return;script;cfl;oom;ccf;tce;cpf;tde;tpf' enum: - - latency - - fault - - attrOverride - - mistake + - delay + - return + - script + - cfl + - oom + - ccf + - tce + - cpf + - tde + - tpf type: string - attr: - description: Attr defines the overrided attribution - properties: - atime: - description: Timespec represents a time - properties: - nsec: - format: int64 - type: integer - sec: - format: int64 - type: integer - required: - - nsec - - sec - type: object - blocks: - format: int64 - type: integer - ctime: - description: Timespec represents a time - properties: - nsec: - format: int64 - type: integer - sec: - format: int64 - type: integer - required: - - nsec - - sec - type: object - gid: - format: int32 - type: integer - ino: - format: int64 - type: integer - kind: - description: FileType represents type of a file - type: string - mtime: - description: Timespec represents a time - properties: - nsec: - format: int64 - type: integer - sec: - format: int64 - type: integer - required: - - nsec - - sec - type: object - nlink: - format: int32 - type: integer - perm: - type: integer - rdev: - format: int32 - type: integer - size: - format: int64 - type: integer - uid: - format: int32 - type: integer - type: object containerNames: description: ContainerNames indicates list of the name of affected container. If not set, all containers @@ -20632,56 +28546,246 @@ spec: items: type: string type: array - delay: - description: Delay defines the value of I/O chaos action - delay. A delay string is a possibly signed sequence - of decimal numbers, each with optional fraction and - a unit suffix, such as "300ms". Valid time units are - "ns", "us" (or "µs"), "ms", "s", "m", "h". + duration: + description: Duration represents the duration of the + chaos action + type: string + flags: + additionalProperties: + type: string + description: Flags represents the flags of action + type: object + matchers: + additionalProperties: + type: string + description: Matchers represents the matching rules + for the target + type: object + mode: + description: 'Mode defines the mode to run chaos action. + Supported mode: one / all / fixed / fixed-percent + / random-max-percent' + enum: + - one + - all + - fixed + - fixed-percent + - random-max-percent + type: string + selector: + description: Selector is used to select pods that are + used to inject chaos action. + properties: + annotationSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select objects. A selector based + on annotations. + type: object + expressionSelectors: + description: a slice of label selector expressions + that can be used to select objects. A list of + selectors based on set-based label expressions. + items: + description: A label selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If the + operator is Exists or DoesNotExist, the + values array must be empty. This array is + replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + fieldSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select objects. A selector based + on fields. + type: object + labelSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select objects. A selector based + on labels. + type: object + namespaces: + description: Namespaces is a set of namespace to + which objects belong. + items: + type: string + type: array + nodeSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select nodes. Selector which must + match a node's labels, and objects must belong + to these selected nodes. + type: object + nodes: + description: Nodes is a set of node name and objects + must belong to these nodes. + items: + type: string + type: array + podPhaseSelectors: + description: 'PodPhaseSelectors is a set of condition + of a pod at the current time. supported value: + Pending / Running / Succeeded / Failed / Unknown' + items: + type: string + type: array + pods: + additionalProperties: + items: + type: string + type: array + description: Pods is a map of string keys and a + set values that used to select pods. The key defines + the namespace which pods belong, and the each + values is a set of pod names. + type: object + type: object + target: + description: 'Target defines the specific jvm chaos + target. Supported target: servlet;psql;jvm;jedis;http;dubbo;rocketmq;tars;mysql;druid;redisson;rabbitmq;mongodb' + enum: + - servlet + - psql + - jvm + - jedis + - http + - dubbo + - rocketmq + - tars + - mysql + - druid + - redisson + - rabbitmq + - mongodb + type: string + value: + description: Value is required when the mode is set + to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. + If `FixedPodMode`, provide an integer of pods to do + chaos action. If `FixedPercentPodMod`, provide a number + from 0-100 to specify the percent of pods the server + can do chaos action. IF `RandomMaxPercentPodMod`, provide + a number from 0-100 to specify the max percent of + pods to do chaos action type: string + required: + - action + - mode + - selector + - target + type: object + kernelChaos: + description: KernelChaosSpec defines the desired state of + KernelChaos + properties: duration: description: Duration represents the duration of the - chaos action. It is required when the action is `PodFailureAction`. - A duration string is a possibly signed sequence of - decimal numbers, each with optional fraction and a - unit suffix, such as "300ms", "-1.5h" or "2h45m". - Valid time units are "ns", "us" (or "µs"), "ms", "s", - "m", "h". + chaos action type: string - errno: - description: 'Errno defines the error code that returned - by I/O action. refer to: https://www-numi.fnal.gov/offline_software/srt_public_context/WebDocs/Errors/unix_system_errors.html' - format: int32 - type: integer - methods: - description: 'Methods defines the I/O methods for injecting - I/O chaos action. default: all I/O methods.' - items: - type: string - type: array - mistake: - description: Mistake defines what types of incorrectness - are injected to IO operations + failKernRequest: + description: FailKernRequest defines the request of + kernel injection properties: - filling: - description: Filling determines what is filled in - the miskate data. - enum: - - zero - - random - type: string - maxLength: - description: Max length of each wrong data segment - in bytes - format: int64 - minimum: 1 + callchain: + description: 'Callchain indicate a special call + chain, such as: ext4_mount -> mount_subtree -> + ... -> should_failslab With an optional + set of predicates and an optional set of parameters, + which used with predicates. You can read call + chan and predicate examples from https://github.com/chaos-mesh/bpfki/tree/develop/examples + to learn more. If no special call chain, just + keep Callchain empty, which means it will fail + at any call chain with slab alloc (eg: kmalloc).' + items: + description: Frame defines the function signature + and predicate in function's body + properties: + funcname: + description: Funcname can be find from kernel + source or `/proc/kallsyms`, such as `ext4_mount` + type: string + parameters: + description: Parameters is used with predicate, + for example, if you want to inject slab + error in `d_alloc_parallel(struct dentry + *parent, const struct qstr *name)` with + a special name `bananas`, you need to set + it to `struct dentry *parent, const struct + qstr *name` otherwise omit it. + type: string + predicate: + description: Predicate will access the arguments + of this Frame, example with Parameters's, + you can set it to `STRNCMP(name->name, "bananas", + 8)` to make inject only with it, or omit + it to inject for all d_alloc_parallel call + chain. + type: string + type: object + type: array + failtype: + description: 'FailType indicates what to fail, can + be set to ''0'' / ''1'' / ''2'' If `0`, indicates + slab to fail (should_failslab) If `1`, indicates + alloc_page to fail (should_fail_alloc_page) If + `2`, indicates bio to fail (should_fail_bio) You + can read: 1. https://www.kernel.org/doc/html/latest/fault-injection/fault-injection.html 2. + http://github.com/iovisor/bcc/blob/master/tools/inject_example.txt + to learn more' + format: int32 + maximum: 2 + minimum: 0 type: integer - maxOccurrences: - description: There will be [1, MaxOccurrences] segments - of wrong data. - format: int64 - minimum: 1 + headers: + description: 'Headers indicates the appropriate + kernel headers you need. Eg: "linux/mmzone.h", + "linux/blkdev.h" and so on' + items: + type: string + type: array + probability: + description: Probability indicates the fails with + probability. If you want 1%, please set this field + with 1. + format: int32 + maximum: 100 + minimum: 0 + type: integer + times: + description: Times indicates the max times of fails. + format: int32 + minimum: 0 type: integer + required: + - failtype type: object mode: description: 'Mode defines the mode to run chaos action. @@ -20694,15 +28798,6 @@ spec: - fixed-percent - random-max-percent type: string - path: - description: Path defines the path of files for injecting - I/O chaos action. - type: string - percent: - description: 'Percent defines the percentage of injection - errors and provides a number from 0-100. default: - 100.' - type: integer selector: description: Selector is used to select pods that are used to inject chaos action. @@ -20792,72 +28887,171 @@ spec: additionalProperties: items: type: string - type: array - description: Pods is a map of string keys and a - set values that used to select pods. The key defines - the namespace which pods belong, and the each - values is a set of pod names. + type: array + description: Pods is a map of string keys and a + set values that used to select pods. The key defines + the namespace which pods belong, and the each + values is a set of pod names. + type: object + type: object + value: + description: Value is required when the mode is set + to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. + If `FixedPodMode`, provide an integer of pods to do + chaos action. If `FixedPercentPodMod`, provide a number + from 0-100 to specify the percent of pods the server + can do chaos action. IF `RandomMaxPercentPodMod`, provide + a number from 0-100 to specify the max percent of + pods to do chaos action + type: string + required: + - failKernRequest + - mode + - selector + type: object + networkChaos: + description: NetworkChaosSpec defines the desired state + of NetworkChaos + properties: + action: + description: 'Action defines the specific network chaos + action. Supported action: partition, netem, delay, + loss, duplicate, corrupt Default action: delay' + enum: + - netem + - delay + - loss + - duplicate + - corrupt + - partition + - bandwidth + type: string + bandwidth: + description: Bandwidth represents the detail about bandwidth + control action + properties: + buffer: + description: Buffer is the maximum amount of bytes + that tokens can be available for instantaneously. + format: int32 + minimum: 1 + type: integer + limit: + description: Limit is the number of bytes that can + be queued waiting for tokens to become available. + format: int32 + minimum: 1 + type: integer + minburst: + description: Minburst specifies the size of the + peakrate bucket. For perfect accuracy, should + be set to the MTU of the interface. If a peakrate + is needed, but some burstiness is acceptable, + this size can be raised. A 3000 byte minburst + allows around 3mbit/s of peakrate, given 1000 + byte packets. + format: int32 + minimum: 0 + type: integer + peakrate: + description: Peakrate is the maximum depletion rate + of the bucket. The peakrate does not need to be + set, it is only necessary if perfect millisecond + timescale shaping is required. + format: int64 + minimum: 0 + type: integer + rate: + description: Rate is the speed knob. Allows bps, + kbps, mbps, gbps, tbps unit. bps means bytes per + second. + type: string + required: + - buffer + - limit + - rate + type: object + corrupt: + description: Corrupt represents the detail about corrupt + action + properties: + correlation: + type: string + corrupt: + type: string + required: + - correlation + - corrupt + type: object + delay: + description: Delay represents the detail about delay + action + properties: + correlation: + type: string + jitter: + type: string + latency: + type: string + reorder: + description: ReorderSpec defines details of packet + reorder. + properties: + correlation: + type: string + gap: + type: integer + reorder: + type: string + required: + - correlation + - gap + - reorder type: object + required: + - latency type: object - value: - description: Value is required when the mode is set - to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. - If `FixedPodMode`, provide an integer of pods to do - chaos action. If `FixedPercentPodMod`, provide a number - from 0-100 to specify the percent of pods the server - can do chaos action. IF `RandomMaxPercentPodMod`, provide - a number from 0-100 to specify the max percent of - pods to do chaos action - type: string - volumePath: - description: VolumePath represents the mount path of - injected volume - type: string - required: - - action - - mode - - selector - - volumePath - type: object - jvmChaos: - description: JVMChaosSpec defines the desired state of JVMChaos - properties: - action: - description: 'Action defines the specific jvm chaos - action. Supported action: delay;return;script;cfl;oom;ccf;tce;cpf;tde;tpf' + direction: + description: Direction represents the direction, this + applies on netem and network partition action enum: - - delay - - return - - script - - cfl - - oom - - ccf - - tce - - cpf - - tde - - tpf + - to + - from + - both + - "" type: string - containerNames: - description: ContainerNames indicates list of the name - of affected container. If not set, all containers - will be injected - items: - type: string - type: array + duplicate: + description: DuplicateSpec represents the detail about + loss action + properties: + correlation: + type: string + duplicate: + type: string + required: + - correlation + - duplicate + type: object duration: description: Duration represents the duration of the chaos action type: string - flags: - additionalProperties: - type: string - description: Flags represents the flags of action - type: object - matchers: - additionalProperties: + externalTargets: + description: ExternalTargets represents network targets + outside k8s + items: type: string - description: Matchers represents the matching rules - for the target + type: array + loss: + description: Loss represents the detail about loss action + properties: + correlation: + type: string + loss: + type: string + required: + - correlation + - loss type: object mode: description: 'Mode defines the mode to run chaos action. @@ -20967,23 +29161,134 @@ spec: type: object type: object target: - description: 'Target defines the specific jvm chaos - target. Supported target: servlet;psql;jvm;jedis;http;dubbo;rocketmq;tars;mysql;druid;redisson;rabbitmq;mongodb' - enum: - - servlet - - psql - - jvm - - jedis - - http - - dubbo - - rocketmq - - tars - - mysql - - druid - - redisson - - rabbitmq - - mongodb - type: string + description: Target represents network target, this + applies on netem and network partition action + properties: + mode: + description: 'Mode defines the mode to run chaos + action. Supported mode: one / all / fixed / fixed-percent + / random-max-percent' + enum: + - one + - all + - fixed + - fixed-percent + - random-max-percent + type: string + selector: + description: Selector is used to select pods that + are used to inject chaos action. + properties: + annotationSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select objects. A selector + based on annotations. + type: object + expressionSelectors: + description: a slice of label selector expressions + that can be used to select objects. A list + of selectors based on set-based label expressions. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + fieldSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select objects. A selector + based on fields. + type: object + labelSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select objects. A selector + based on labels. + type: object + namespaces: + description: Namespaces is a set of namespace + to which objects belong. + items: + type: string + type: array + nodeSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select nodes. Selector which + must match a node's labels, and objects must + belong to these selected nodes. + type: object + nodes: + description: Nodes is a set of node name and + objects must belong to these nodes. + items: + type: string + type: array + podPhaseSelectors: + description: 'PodPhaseSelectors is a set of + condition of a pod at the current time. supported + value: Pending / Running / Succeeded / Failed + / Unknown' + items: + type: string + type: array + pods: + additionalProperties: + items: + type: string + type: array + description: Pods is a map of string keys and + a set values that used to select pods. The + key defines the namespace which pods belong, + and the each values is a set of pod names. + type: object + type: object + value: + description: Value is required when the mode is + set to `FixedPodMode` / `FixedPercentPodMod` / + `RandomMaxPercentPodMod`. If `FixedPodMode`, provide + an integer of pods to do chaos action. If `FixedPercentPodMod`, + provide a number from 0-100 to specify the percent + of pods the server can do chaos action. IF `RandomMaxPercentPodMod`, provide + a number from 0-100 to specify the max percent + of pods to do chaos action + type: string + required: + - mode + - selector + type: object value: description: Value is required when the mode is set to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. @@ -20998,93 +29303,44 @@ spec: - action - mode - selector - - target type: object - kernelChaos: - description: KernelChaosSpec defines the desired state of - KernelChaos + podChaos: + description: PodChaosSpec defines the attributes that a + user creates on a chaos experiment about pods. properties: + action: + description: 'Action defines the specific pod chaos + action. Supported action: pod-kill / pod-failure / + container-kill Default action: pod-kill' + enum: + - pod-kill + - pod-failure + - container-kill + type: string + containerNames: + description: ContainerNames indicates list of the name + of affected container. If not set, all containers + will be injected + items: + type: string + type: array duration: description: Duration represents the duration of the - chaos action + chaos action. It is required when the action is `PodFailureAction`. + A duration string is a possibly signed sequence of + decimal numbers, each with optional fraction and a + unit suffix, such as "300ms", "-1.5h" or "2h45m". + Valid time units are "ns", "us" (or "µs"), "ms", "s", + "m", "h". type: string - failKernRequest: - description: FailKernRequest defines the request of - kernel injection - properties: - callchain: - description: 'Callchain indicate a special call - chain, such as: ext4_mount -> mount_subtree -> - ... -> should_failslab With an optional - set of predicates and an optional set of parameters, - which used with predicates. You can read call - chan and predicate examples from https://github.com/chaos-mesh/bpfki/tree/develop/examples - to learn more. If no special call chain, just - keep Callchain empty, which means it will fail - at any call chain with slab alloc (eg: kmalloc).' - items: - description: Frame defines the function signature - and predicate in function's body - properties: - funcname: - description: Funcname can be find from kernel - source or `/proc/kallsyms`, such as `ext4_mount` - type: string - parameters: - description: Parameters is used with predicate, - for example, if you want to inject slab - error in `d_alloc_parallel(struct dentry - *parent, const struct qstr *name)` with - a special name `bananas`, you need to set - it to `struct dentry *parent, const struct - qstr *name` otherwise omit it. - type: string - predicate: - description: Predicate will access the arguments - of this Frame, example with Parameters's, - you can set it to `STRNCMP(name->name, "bananas", - 8)` to make inject only with it, or omit - it to inject for all d_alloc_parallel call - chain. - type: string - type: object - type: array - failtype: - description: 'FailType indicates what to fail, can - be set to ''0'' / ''1'' / ''2'' If `0`, indicates - slab to fail (should_failslab) If `1`, indicates - alloc_page to fail (should_fail_alloc_page) If - `2`, indicates bio to fail (should_fail_bio) You - can read: 1. https://www.kernel.org/doc/html/latest/fault-injection/fault-injection.html 2. - http://github.com/iovisor/bcc/blob/master/tools/inject_example.txt - to learn more' - format: int32 - maximum: 2 - minimum: 0 - type: integer - headers: - description: 'Headers indicates the appropriate - kernel headers you need. Eg: "linux/mmzone.h", - "linux/blkdev.h" and so on' - items: - type: string - type: array - probability: - description: Probability indicates the fails with - probability. If you want 1%, please set this field - with 1. - format: int32 - maximum: 100 - minimum: 0 - type: integer - times: - description: Times indicates the max times of fails. - format: int32 - minimum: 0 - type: integer - required: - - failtype - type: object + gracePeriod: + description: GracePeriod is used in pod-kill action. + It represents the duration in seconds before the pod + should be deleted. Value must be non-negative integer. + The default value is zero that indicates delete immediately. + format: int64 + minimum: 0 + type: integer mode: description: 'Mode defines the mode to run chaos action. Supported mode: one / all / fixed / fixed-percent @@ -21154,203 +29410,81 @@ spec: can be used to select objects. A selector based on labels. type: object - namespaces: - description: Namespaces is a set of namespace to - which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which must - match a node's labels, and objects must belong - to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects - must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: - Pending / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a - set values that used to select pods. The key defines - the namespace which pods belong, and the each - values is a set of pod names. - type: object - type: object - value: - description: Value is required when the mode is set - to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. - If `FixedPodMode`, provide an integer of pods to do - chaos action. If `FixedPercentPodMod`, provide a number - from 0-100 to specify the percent of pods the server - can do chaos action. IF `RandomMaxPercentPodMod`, provide - a number from 0-100 to specify the max percent of - pods to do chaos action - type: string - required: - - failKernRequest - - mode - - selector - type: object - networkChaos: - description: NetworkChaosSpec defines the desired state - of NetworkChaos - properties: - action: - description: 'Action defines the specific network chaos - action. Supported action: partition, netem, delay, - loss, duplicate, corrupt Default action: delay' - enum: - - netem - - delay - - loss - - duplicate - - corrupt - - partition - - bandwidth - type: string - bandwidth: - description: Bandwidth represents the detail about bandwidth - control action - properties: - buffer: - description: Buffer is the maximum amount of bytes - that tokens can be available for instantaneously. - format: int32 - minimum: 1 - type: integer - limit: - description: Limit is the number of bytes that can - be queued waiting for tokens to become available. - format: int32 - minimum: 1 - type: integer - minburst: - description: Minburst specifies the size of the - peakrate bucket. For perfect accuracy, should - be set to the MTU of the interface. If a peakrate - is needed, but some burstiness is acceptable, - this size can be raised. A 3000 byte minburst - allows around 3mbit/s of peakrate, given 1000 - byte packets. - format: int32 - minimum: 0 - type: integer - peakrate: - description: Peakrate is the maximum depletion rate - of the bucket. The peakrate does not need to be - set, it is only necessary if perfect millisecond - timescale shaping is required. - format: int64 - minimum: 0 - type: integer - rate: - description: Rate is the speed knob. Allows bps, - kbps, mbps, gbps, tbps unit. bps means bytes per - second. - type: string - required: - - buffer - - limit - - rate - type: object - corrupt: - description: Corrupt represents the detail about corrupt - action - properties: - correlation: - type: string - corrupt: - type: string - required: - - correlation - - corrupt - type: object - delay: - description: Delay represents the detail about delay - action - properties: - correlation: - type: string - jitter: - type: string - latency: - type: string - reorder: - description: ReorderSpec defines details of packet - reorder. - properties: - correlation: - type: string - gap: - type: integer - reorder: + namespaces: + description: Namespaces is a set of namespace to + which objects belong. + items: + type: string + type: array + nodeSelectors: + additionalProperties: + type: string + description: Map of string keys and values that + can be used to select nodes. Selector which must + match a node's labels, and objects must belong + to these selected nodes. + type: object + nodes: + description: Nodes is a set of node name and objects + must belong to these nodes. + items: + type: string + type: array + podPhaseSelectors: + description: 'PodPhaseSelectors is a set of condition + of a pod at the current time. supported value: + Pending / Running / Succeeded / Failed / Unknown' + items: + type: string + type: array + pods: + additionalProperties: + items: type: string - required: - - correlation - - gap - - reorder + type: array + description: Pods is a map of string keys and a + set values that used to select pods. The key defines + the namespace which pods belong, and the each + values is a set of pod names. type: object - required: - - latency type: object - direction: - description: Direction represents the direction, this - applies on netem and network partition action - enum: - - to - - from - - both - - "" + value: + description: Value is required when the mode is set + to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. + If `FixedPodMode`, provide an integer of pods to do + chaos action. If `FixedPercentPodMod`, provide a number + from 0-100 to specify the percent of pods the server + can do chaos action. IF `RandomMaxPercentPodMod`, provide + a number from 0-100 to specify the max percent of + pods to do chaos action type: string - duplicate: - description: DuplicateSpec represents the detail about - loss action - properties: - correlation: - type: string - duplicate: - type: string - required: - - correlation - - duplicate - type: object + required: + - action + - mode + - selector + type: object + schedule: + type: string + startingDeadlineSeconds: + format: int64 + minimum: 0 + nullable: true + type: integer + stressChaos: + description: StressChaosSpec defines the desired state of + StressChaos + properties: + containerNames: + description: ContainerNames indicates list of the name + of affected container. If not set, all containers + will be injected + items: + type: string + type: array duration: description: Duration represents the duration of the chaos action type: string - externalTargets: - description: ExternalTargets represents network targets - outside k8s - items: - type: string - type: array - loss: - description: Loss represents the detail about loss action - properties: - correlation: - type: string - loss: - type: string - required: - - correlation - - loss - type: object mode: description: 'Mode defines the mode to run chaos action. Supported mode: one / all / fixed / fixed-percent @@ -21458,134 +29592,67 @@ spec: values is a set of pod names. type: object type: object - target: - description: Target represents network target, this - applies on netem and network partition action + stressngStressors: + description: StressngStressors defines plenty of stressors + just like `Stressors` except that it's an experimental + feature and more powerful. You can define stressors + in `stress-ng` (see also `man stress-ng`) dialect, + however not all of the supported stressors are well + tested. It maybe retired in later releases. You should + always use `Stressors` to define the stressors and + use this only when you want more stressors unsupported + by `Stressors`. When both `StressngStressors` and + `Stressors` are defined, `StressngStressors` wins. + type: string + stressors: + description: Stressors defines plenty of stressors supported + to stress system components out. You can use one or + more of them to make up various kinds of stresses. + At least one of the stressors should be specified. properties: - mode: - description: 'Mode defines the mode to run chaos - action. Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - selector: - description: Selector is used to select pods that - are used to inject chaos action. + cpu: + description: CPUStressor stresses CPU out properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list - of selectors based on set-based label expressions. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. This - array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which - must match a node's labels, and objects must - belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and - objects must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of - condition of a pod at the current time. supported - value: Pending / Running / Succeeded / Failed - / Unknown' + load: + description: Load specifies P percent loading + per CPU worker. 0 is effectively a sleep (no + load) and 100 is full loading. + type: integer + options: + description: extend stress-ng options items: type: string type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and - a set values that used to select pods. The - key defines the namespace which pods belong, - and the each values is a set of pod names. - type: object + workers: + description: Workers specifies N workers to + apply the stressor. + type: integer + required: + - workers + type: object + memory: + description: MemoryStressor stresses virtual memory + out + properties: + options: + description: extend stress-ng options + items: + type: string + type: array + size: + description: Size specifies N bytes consumed + per vm worker, default is the total available + memory. One can specify the size as % of total + available memory or in units of B, KB/KiB, + MB/MiB, GB/GiB, TB/TiB. + type: string + workers: + description: Workers specifies N workers to + apply the stressor. + type: integer + required: + - workers type: object - value: - description: Value is required when the mode is - set to `FixedPodMode` / `FixedPercentPodMod` / - `RandomMaxPercentPodMod`. If `FixedPodMode`, provide - an integer of pods to do chaos action. If `FixedPercentPodMod`, - provide a number from 0-100 to specify the percent - of pods the server can do chaos action. IF `RandomMaxPercentPodMod`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action - type: string - required: - - mode - - selector type: object value: description: Value is required when the mode is set @@ -21598,23 +29665,21 @@ spec: pods to do chaos action type: string required: - - action - mode - selector type: object - podChaos: - description: PodChaosSpec defines the attributes that a - user creates on a chaos experiment about pods. + timeChaos: + description: TimeChaosSpec defines the desired state of + TimeChaos properties: - action: - description: 'Action defines the specific pod chaos - action. Supported action: pod-kill / pod-failure / - container-kill Default action: pod-kill' - enum: - - pod-kill - - pod-failure - - container-kill - type: string + clockIds: + description: ClockIds defines all affected clock id + All available options are ["CLOCK_REALTIME","CLOCK_MONOTONIC","CLOCK_PROCESS_CPUTIME_ID","CLOCK_THREAD_CPUTIME_ID", + "CLOCK_MONOTONIC_RAW","CLOCK_REALTIME_COARSE","CLOCK_MONOTONIC_COARSE","CLOCK_BOOTTIME","CLOCK_REALTIME_ALARM", + "CLOCK_BOOTTIME_ALARM"] Default value is ["CLOCK_REALTIME"] + items: + type: string + type: array containerNames: description: ContainerNames indicates list of the name of affected container. If not set, all containers @@ -21624,21 +29689,8 @@ spec: type: array duration: description: Duration represents the duration of the - chaos action. It is required when the action is `PodFailureAction`. - A duration string is a possibly signed sequence of - decimal numbers, each with optional fraction and a - unit suffix, such as "300ms", "-1.5h" or "2h45m". - Valid time units are "ns", "us" (or "µs"), "ms", "s", - "m", "h". + chaos action type: string - gracePeriod: - description: GracePeriod is used in pod-kill action. - It represents the duration in seconds before the pod - should be deleted. Value must be non-negative integer. - The default value is zero that indicates delete immediately. - format: int64 - minimum: 0 - type: integer mode: description: 'Mode defines the mode to run chaos action. Supported mode: one / all / fixed / fixed-percent @@ -21746,6 +29798,13 @@ spec: values is a set of pod names. type: object type: object + timeOffset: + description: TimeOffset defines the delta time of injected + program. It's a possibly signed sequence of decimal + numbers, such as "300ms", "-1.5h" or "2h45m". Valid + time units are "ns", "us" (or "µs"), "ms", "s", "m", + "h". + type: string value: description: Value is required when the mode is set to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. @@ -21757,569 +29816,2682 @@ spec: pods to do chaos action type: string required: - - action - mode - selector + - timeOffset + type: object + type: + description: 'TODO: use a custom type, as `TemplateType` + contains other possible values' + type: string + required: + - schedule + - type + type: object + stressChaos: + description: StressChaosSpec defines the desired state of StressChaos + properties: + containerNames: + description: ContainerNames indicates list of the name of + affected container. If not set, all containers will be + injected + items: + type: string + type: array + duration: + description: Duration represents the duration of the chaos + action + type: string + mode: + description: 'Mode defines the mode to run chaos action. + Supported mode: one / all / fixed / fixed-percent / random-max-percent' + enum: + - one + - all + - fixed + - fixed-percent + - random-max-percent + type: string + selector: + description: Selector is used to select pods that are used + to inject chaos action. + properties: + annotationSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can + be used to select objects. A selector based on annotations. + type: object + expressionSelectors: + description: a slice of label selector expressions that + can be used to select objects. A list of selectors + based on set-based label expressions. + items: + description: A label selector requirement is a selector + that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label key that the selector + applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are In, + NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. + If the operator is In or NotIn, the values array + must be non-empty. If the operator is Exists + or DoesNotExist, the values array must be empty. + This array is replaced during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + fieldSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can + be used to select objects. A selector based on fields. + type: object + labelSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can + be used to select objects. A selector based on labels. + type: object + namespaces: + description: Namespaces is a set of namespace to which + objects belong. + items: + type: string + type: array + nodeSelectors: + additionalProperties: + type: string + description: Map of string keys and values that can + be used to select nodes. Selector which must match + a node's labels, and objects must belong to these + selected nodes. + type: object + nodes: + description: Nodes is a set of node name and objects + must belong to these nodes. + items: + type: string + type: array + podPhaseSelectors: + description: 'PodPhaseSelectors is a set of condition + of a pod at the current time. supported value: Pending + / Running / Succeeded / Failed / Unknown' + items: + type: string + type: array + pods: + additionalProperties: + items: + type: string + type: array + description: Pods is a map of string keys and a set + values that used to select pods. The key defines the + namespace which pods belong, and the each values is + a set of pod names. + type: object + type: object + stressngStressors: + description: StressngStressors defines plenty of stressors + just like `Stressors` except that it's an experimental + feature and more powerful. You can define stressors in + `stress-ng` (see also `man stress-ng`) dialect, however + not all of the supported stressors are well tested. It + maybe retired in later releases. You should always use + `Stressors` to define the stressors and use this only + when you want more stressors unsupported by `Stressors`. + When both `StressngStressors` and `Stressors` are defined, + `StressngStressors` wins. + type: string + stressors: + description: Stressors defines plenty of stressors supported + to stress system components out. You can use one or more + of them to make up various kinds of stresses. At least + one of the stressors should be specified. + properties: + cpu: + description: CPUStressor stresses CPU out + properties: + load: + description: Load specifies P percent loading per + CPU worker. 0 is effectively a sleep (no load) + and 100 is full loading. + type: integer + options: + description: extend stress-ng options + items: + type: string + type: array + workers: + description: Workers specifies N workers to apply + the stressor. + type: integer + required: + - workers + type: object + memory: + description: MemoryStressor stresses virtual memory + out + properties: + options: + description: extend stress-ng options + items: + type: string + type: array + size: + description: Size specifies N bytes consumed per + vm worker, default is the total available memory. + One can specify the size as % of total available + memory or in units of B, KB/KiB, MB/MiB, GB/GiB, + TB/TiB. + type: string + workers: + description: Workers specifies N workers to apply + the stressor. + type: integer + required: + - workers + type: object type: object - schedule: + value: + description: Value is required when the mode is set to `FixedPodMode` + / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. If + `FixedPodMode`, provide an integer of pods to do chaos + action. If `FixedPercentPodMod`, provide a number from + 0-100 to specify the percent of pods the server can do + chaos action. IF `RandomMaxPercentPodMod`, provide a + number from 0-100 to specify the max percent of pods to + do chaos action type: string - startingDeadlineSeconds: - format: int64 - minimum: 0 - nullable: true - type: integer - stressChaos: - description: StressChaosSpec defines the desired state of - StressChaos + required: + - mode + - selector + type: object + task: + description: Task describes the behavior of the custom task. + Only used when Type is TypeTask. + properties: + container: + description: Container is the main container image to run + in the pod properties: - containerNames: - description: ContainerNames indicates list of the name - of affected container. If not set, all containers - will be injected + args: + description: '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. 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. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' items: type: string type: array - duration: - description: Duration represents the duration of the - chaos action - type: string - mode: - description: 'Mode defines the mode to run chaos action. - Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - selector: - description: Selector is used to select pods that are - used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: + command: + description: '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. 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. Cannot be updated. + More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + env: + description: List of environment variables to set in + the container. Cannot be updated. + items: + description: EnvVar represents an environment variable + present in a Container. + properties: + name: + description: Name of the environment variable. + Must be a C_IDENTIFIER. type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list of - selectors based on set-based label expressions. - items: - description: A label selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. + value: + description: '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 "".' + type: string + valueFrom: + description: Source for the environment variable's + value. Cannot be used if value is not empty. properties: - key: - description: key is the label key that the - selector applies to. + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap + or its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: + supports metadata.name, metadata.namespace, + metadata.labels, metadata.annotations, spec.nodeName, + spec.serviceAccountName, status.hostIP, + status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema the + FieldPath is written in terms of, defaults + to "v1". + type: string + fieldPath: + description: Path of the field to select + in the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: '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.' + properties: + containerName: + description: 'Container name: required + for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format + of the exposed resources, defaults to + "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in + the pod's namespace + properties: + key: + description: The key of the secret to + select from. Must be a valid secret + key. + type: string + name: + description: 'Name of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret + or its key must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + description: 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. + items: + description: EnvFromSource represents the source of + a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists and DoesNotExist. + optional: + description: Specify whether the ConfigMap + must be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend + to each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If the - operator is Exists or DoesNotExist, the - values array must be empty. This array is - replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator + optional: + description: Specify whether the Secret must + be defined + type: boolean type: object - type: array - fieldSelectors: - additionalProperties: + type: object + type: array + image: + description: '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.' + type: string + imagePullPolicy: + description: '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' + type: string + lifecycle: + description: Actions that the management system should + take in response to container lifecycle events. Cannot + be updated. + properties: + postStart: + description: 'PostStart is called immediately after + a container is created. If the handler fails, + the container is terminated and restarted according + to its restart policy. Other management of the + container blocks until the hook completes. More + info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following + should be specified. Exec specifies the action + to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request + to perform. + properties: + host: + description: Host name to connect to, defaults + to the pod IP. You probably want to set + "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the + request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom + header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP + server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port + to access on the container. Number must + be in the range 1 to 65535. Name must + be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action + involving a TCP port. TCP hooks not yet supported + TODO: implement a realistic TCP lifecycle + hook' + properties: + host: + description: 'Optional: Host name to connect + to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port + to access on the container. Number must + be in the range 1 to 65535. Name must + be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + description: 'PreStop is called immediately before + a container is terminated due to an API request + or management event such as liveness/startup probe + failure, preemption, resource contention, etc. + The handler is not called if the container crashes + or exits. The reason for termination is passed + to the handler. The Pod''s termination grace period + countdown begins before the PreStop hooked is + executed. Regardless of the outcome of the handler, + the container will eventually terminate within + the Pod''s termination grace period. Other management + of the container blocks until the hook completes + or until the termination grace period is reached. + More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following + should be specified. Exec specifies the action + to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request + to perform. + properties: + host: + description: Host name to connect to, defaults + to the pod IP. You probably want to set + "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the + request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom + header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP + server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port + to access on the container. Number must + be in the range 1 to 65535. Name must + be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action + involving a TCP port. TCP hooks not yet supported + TODO: implement a realistic TCP lifecycle + hook' + properties: + host: + description: 'Optional: Host name to connect + to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port + to access on the container. Number must + be in the range 1 to 65535. Name must + be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + description: 'Periodic probe of container liveness. + Container will be restarted if the probe fails. Cannot + be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following should + be specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the + probe to be considered failed after having succeeded. + Defaults to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request + to perform. + properties: + host: + description: Host name to connect to, defaults + to the pod IP. You probably want to set "Host" + in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom + header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to + the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: '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' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the + probe. Default to 10 seconds. Minimum value is + 1. + format: int32 + type: integer + successThreshold: + description: 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. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving + a TCP port. TCP hooks not yet supported TODO: + implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect + to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: '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' + format: int32 + type: integer + type: object + name: + description: Name of the container specified as a DNS_LABEL. + Each container in a pod must have a unique name (DNS_LABEL). + Cannot be updated. + type: string + ports: + description: 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. + items: + description: ContainerPort represents a network port + in a single container. + properties: + containerPort: + description: Number of port to expose on the pod's + IP address. This must be a valid port number, + 0 < x < 65536. + format: int32 + type: integer + hostIP: + description: What host IP to bind the external + port to. type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on fields. + hostPort: + description: Number of port to expose on the host. + If specified, this must be a valid port number, + 0 < x < 65536. If HostNetwork is specified, + this must match ContainerPort. Most containers + do not need this. + format: int32 + type: integer + name: + description: If specified, this must be an IANA_SVC_NAME + and unique within the pod. Each named port in + a pod must have a unique name. Name for the + port that can be referred to by services. + type: string + protocol: + default: TCP + description: Protocol for port. Must be UDP, TCP, + or SCTP. Defaults to "TCP". + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + description: 'Periodic probe of container service readiness. + Container will be removed from service endpoints if + the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following should + be specified. Exec specifies the action to take. + properties: + command: + description: 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. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the + probe to be considered failed after having succeeded. + Defaults to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request + to perform. + properties: + host: + description: Host name to connect to, defaults + to the pod IP. You probably want to set "Host" + in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom + header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to + the host. Defaults to HTTP. + type: string + required: + - port type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on labels. + initialDelaySeconds: + description: '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' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the + probe. Default to 10 seconds. Minimum value is + 1. + format: int32 + type: integer + successThreshold: + description: 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. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving + a TCP port. TCP hooks not yet supported TODO: + implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect + to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port type: object - namespaces: - description: Namespaces is a set of namespace to - which objects belong. - items: - type: string - type: array - nodeSelectors: + timeoutSeconds: + description: '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' + format: int32 + type: integer + type: object + resources: + description: 'Compute Resources required by this container. + Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + properties: + limits: additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which must - match a node's labels, and objects must belong - to these selected nodes. + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount + of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' type: object - nodes: - description: Nodes is a set of node name and objects - must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: - Pending / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: + requests: additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a - set values that used to select pods. The key defines - the namespace which pods belong, and the each - values is a set of pod names. + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: '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-compute-resources-container/' type: object type: object - stressngStressors: - description: StressngStressors defines plenty of stressors - just like `Stressors` except that it's an experimental - feature and more powerful. You can define stressors - in `stress-ng` (see also `man stress-ng`) dialect, - however not all of the supported stressors are well - tested. It maybe retired in later releases. You should - always use `Stressors` to define the stressors and - use this only when you want more stressors unsupported - by `Stressors`. When both `StressngStressors` and - `Stressors` are defined, `StressngStressors` wins. - type: string - stressors: - description: Stressors defines plenty of stressors supported - to stress system components out. You can use one or - more of them to make up various kinds of stresses. - At least one of the stressors should be specified. + securityContext: + description: 'Security options the pod should run with. + More info: https://kubernetes.io/docs/concepts/policy/security-context/ + More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/' properties: - cpu: - description: CPUStressor stresses CPU out + allowPrivilegeEscalation: + description: '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' + type: boolean + capabilities: + description: The capabilities to add/drop when running + containers. Defaults to the default set of capabilities + granted by the container runtime. properties: - load: - description: Load specifies P percent loading - per CPU worker. 0 is effectively a sleep (no - load) and 100 is full loading. - type: integer - options: - description: extend stress-ng options + add: + description: Added capabilities items: + description: Capability represent POSIX capabilities + type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities + type type: string type: array - workers: - description: Workers specifies N workers to - apply the stressor. - type: integer - required: - - workers type: object - memory: - description: MemoryStressor stresses virtual memory - out + privileged: + description: Run container in privileged mode. Processes + in privileged containers are essentially equivalent + to root on the host. Defaults to false. + type: boolean + procMount: + description: 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. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only + root filesystem. Default is false. + type: boolean + runAsGroup: + description: 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. + format: int64 + type: integer + runAsNonRoot: + description: 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. + type: boolean + runAsUser: + description: 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. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to + the container. If unspecified, the container runtime + will allocate a random SELinux context for each + container. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. properties: - options: - description: extend stress-ng options + level: + description: Level is SELinux level label that + applies to the container. + type: string + role: + description: Role is a SELinux role label that + applies to the container. + type: string + type: + description: Type is a SELinux type label that + applies to the container. + type: string + user: + description: User is a SELinux user label that + applies to the container. + type: string + type: object + windowsOptions: + description: The Windows specific settings applied + to all containers. If unspecified, the options + from the PodSecurityContext will be used. If set + in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + properties: + gmsaCredentialSpec: + description: 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. + This field is alpha-level and is only honored + by servers that enable the WindowsGMSA feature + flag. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name + of the GMSA credential spec to use. This field + is alpha-level and is only honored by servers + that enable the WindowsGMSA feature flag. + type: string + runAsUserName: + description: 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. This field is beta-level and may + be disabled with the WindowsRunAsUserName + feature flag. + type: string + type: object + type: object + startupProbe: + description: 'StartupProbe indicates that the Pod has + successfully initialized. If specified, no other probes + are executed until this completes successfully. If + this probe fails, the Pod will be restarted, just + as if the livenessProbe failed. This can be used to + provide different probe parameters at the beginning + of a Pod''s lifecycle, when it might take a long time + to load data or warm a cache, than during steady-state + operation. This cannot be updated. This is an alpha + feature enabled by the StartupProbe feature flag. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following should + be specified. Exec specifies the action to take. + properties: + command: + description: 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. items: type: string type: array - size: - description: Size specifies N bytes consumed - per vm worker, default is the total available - memory. One can specify the size as % of total - available memory or in units of B, KB/KiB, - MB/MiB, GB/GiB, TB/TiB. + type: object + failureThreshold: + description: Minimum consecutive failures for the + probe to be considered failed after having succeeded. + Defaults to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request + to perform. + properties: + host: + description: Host name to connect to, defaults + to the pod IP. You probably want to set "Host" + in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom + header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to + the host. Defaults to HTTP. type: string - workers: - description: Workers specifies N workers to - apply the stressor. - type: integer required: - - workers + - port + type: object + initialDelaySeconds: + description: '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' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the + probe. Default to 10 seconds. Minimum value is + 1. + format: int32 + type: integer + successThreshold: + description: 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. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving + a TCP port. TCP hooks not yet supported TODO: + implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect + to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port type: object + timeoutSeconds: + description: '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' + format: int32 + type: integer type: object - value: - description: Value is required when the mode is set - to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. - If `FixedPodMode`, provide an integer of pods to do - chaos action. If `FixedPercentPodMod`, provide a number - from 0-100 to specify the percent of pods the server - can do chaos action. IF `RandomMaxPercentPodMod`, provide - a number from 0-100 to specify the max percent of - pods to do chaos action - type: string - required: - - mode - - selector - type: object - timeChaos: - description: TimeChaosSpec defines the desired state of - TimeChaos - properties: - clockIds: - description: ClockIds defines all affected clock id - All available options are ["CLOCK_REALTIME","CLOCK_MONOTONIC","CLOCK_PROCESS_CPUTIME_ID","CLOCK_THREAD_CPUTIME_ID", - "CLOCK_MONOTONIC_RAW","CLOCK_REALTIME_COARSE","CLOCK_MONOTONIC_COARSE","CLOCK_BOOTTIME","CLOCK_REALTIME_ALARM", - "CLOCK_BOOTTIME_ALARM"] Default value is ["CLOCK_REALTIME"] + stdin: + description: 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. + type: boolean + stdinOnce: + description: 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 + type: boolean + terminationMessagePath: + description: '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.' + type: string + terminationMessagePolicy: + description: 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. + type: string + tty: + description: Whether this container should allocate + a TTY for itself, also requires 'stdin' to be true. + Default is false. + type: boolean + volumeDevices: + description: volumeDevices is the list of block devices + to be used by the container. This is a beta feature. items: - type: string + description: volumeDevice describes a mapping of a + raw block device within a container. + properties: + devicePath: + description: devicePath is the path inside of + the container that the device will be mapped + to. + type: string + name: + description: name must match the name of a persistentVolumeClaim + in the pod + type: string + required: + - devicePath + - name + type: object type: array - containerNames: - description: ContainerNames indicates list of the name - of affected container. If not set, all containers - will be injected + volumeMounts: + description: Pod volumes to mount into the container's + filesystem. Cannot be updated. items: - type: string + description: VolumeMount describes a mounting of a + Volume within a container. + properties: + mountPath: + description: Path within the container at which + the volume should be mounted. Must not contain + ':'. + type: string + mountPropagation: + description: 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. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write + otherwise (false or unspecified). Defaults to + false. + type: boolean + subPath: + description: Path within the volume from which + the container's volume should be mounted. Defaults + to "" (volume's root). + type: string + subPathExpr: + description: 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. + type: string + required: + - mountPath + - name + type: object type: array - duration: - description: Duration represents the duration of the - chaos action - type: string - mode: - description: 'Mode defines the mode to run chaos action. - Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent + workingDir: + description: 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. type: string - selector: - description: Selector is used to select pods that are - used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: + required: + - name + type: object + volumes: + description: Volumes is a list of volumes that can be mounted + by containers in a template. + items: + description: Volume represents a named volume in a pod + that may be accessed by any container in the pod. + properties: + awsElasticBlockStore: + description: 'AWSElasticBlockStore represents an AWS + Disk resource that is attached to a kubelet''s host + machine and then exposed to the pod. More info: + https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + properties: + fsType: + description: 'Filesystem type of the volume that + you want to mount. Tip: Ensure that the filesystem + type is supported by the host operating system. + Examples: "ext4", "xfs", "ntfs". Implicitly + inferred to be "ext4" if unspecified. More info: + https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + TODO: how do we prevent errors in the filesystem + from compromising the machine' + type: string + partition: + description: 'The partition in the volume that + you want to mount. If omitted, the default is + to mount by volume name. Examples: For volume + /dev/sda1, you specify the partition as "1". + Similarly, the volume partition for /dev/sda + is "0" (or you can leave the property empty).' + format: int32 + type: integer + readOnly: + description: 'Specify "true" to force and set + the ReadOnly property in VolumeMounts to "true". + If omitted, the default is "false". More info: + https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: boolean + volumeID: + description: 'Unique ID of the persistent disk + resource in AWS (Amazon EBS volume). More info: + https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: string + required: + - volumeID + type: object + azureDisk: + description: AzureDisk represents an Azure Data Disk + mount on the host and bind mount to the pod. + properties: + cachingMode: + description: 'Host Caching mode: None, Read Only, + Read Write.' + type: string + diskName: + description: The Name of the data disk in the + blob storage + type: string + diskURI: + description: The URI the data disk in the blob + storage + type: string + fsType: + description: Filesystem type to mount. Must be + a filesystem type supported by the host operating + system. Ex. "ext4", "xfs", "ntfs". Implicitly + inferred to be "ext4" if unspecified. + type: string + kind: + description: 'Expected values Shared: multiple + blob disks per storage account Dedicated: single + blob disk per storage account Managed: azure + managed data disk (only in managed availability + set). defaults to shared' + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + description: AzureFile represents an Azure File Service + mount on the host and bind mount to the pod. + properties: + readOnly: + description: Defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretName: + description: the name of secret that contains + Azure Storage Account Name and Key + type: string + shareName: + description: Share Name + type: string + required: + - secretName + - shareName + type: object + cephfs: + description: CephFS represents a Ceph FS mount on + the host that shares a pod's lifetime + properties: + monitors: + description: 'Required: Monitors is a collection + of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + items: + type: string + type: array + path: + description: 'Optional: Used as the mounted root, + rather than the full Ceph tree, default is /' + type: string + readOnly: + description: 'Optional: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting + in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: boolean + secretFile: + description: 'Optional: SecretFile is the path + to key ring for User, default is /etc/ceph/user.secret + More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + secretRef: + description: 'Optional: SecretRef is reference + to the authentication secret for User, default + is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + user: + description: 'Optional: User is the rados user + name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + required: + - monitors + type: object + cinder: + description: 'Cinder represents a cinder volume attached + and mounted on kubelets host machine. More info: + https://examples.k8s.io/mysql-cinder-pd/README.md' + properties: + fsType: + description: 'Filesystem type to mount. Must be + a filesystem type supported by the host operating + system. Examples: "ext4", "xfs", "ntfs". Implicitly + inferred to be "ext4" if unspecified. More info: + https://examples.k8s.io/mysql-cinder-pd/README.md' type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list of - selectors based on set-based label expressions. - items: - description: A label selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. + readOnly: + description: 'Optional: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting + in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: boolean + secretRef: + description: 'Optional: points to a secret object + containing parameters used to connect to OpenStack.' properties: - key: - description: key is the label key that the - selector applies to. + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists and DoesNotExist. + type: object + volumeID: + description: 'volume id used to identify the volume + in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + required: + - volumeID + type: object + configMap: + description: ConfigMap represents a configMap that + should populate this volume + properties: + defaultMode: + description: 'Optional: mode bits to use on created + files by default. Must be a value between 0 + and 0777. Defaults to 0644. Directories within + the path are not affected by this setting. This + might be in conflict with other options that + affect the file mode, like fsGroup, and the + result can be other mode bits set.' + format: int32 + type: integer + items: + description: If unspecified, each key-value pair + in the Data field of the referenced ConfigMap + will be projected into the volume as a file + whose name is the key and content is the value. + If specified, the listed keys will be projected + into the specified paths, and unlisted keys + will not be present. If a key is specified which + is not present in the ConfigMap, the volume + setup will error unless it is marked optional. + Paths must be relative and may not contain the + '..' path or start with '..'. + items: + description: Maps a string key to a path within + a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use + on this file, must be a value between + 0 and 0777. If not specified, the volume + defaultMode will be used. This might be + in conflict with other options that affect + the file mode, like fsGroup, and the result + can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file + to map the key to. May not be an absolute + path. May not contain the path element + '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or + its keys must be defined + type: boolean + type: object + csi: + description: CSI (Container Storage Interface) represents + storage that is handled by an external CSI driver + (Alpha feature). + properties: + driver: + description: Driver is the name of the CSI driver + that handles this volume. Consult with your + admin for the correct name as registered in + the cluster. + type: string + fsType: + description: Filesystem type to mount. Ex. "ext4", + "xfs", "ntfs". If not provided, the empty value + is passed to the associated CSI driver which + will determine the default filesystem to apply. + type: string + nodePublishSecretRef: + description: NodePublishSecretRef is a reference + to the secret object containing sensitive information + to pass to the CSI driver to complete the CSI + NodePublishVolume and NodeUnpublishVolume calls. + This field is optional, and may be empty if + no secret is required. If the secret object + contains more than one secret, all secret references + are passed. + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If the - operator is Exists or DoesNotExist, the - values array must be empty. This array is - replaced during a strategic merge patch. - items: + type: object + readOnly: + description: Specifies a read-only configuration + for the volume. Defaults to false (read/write). + type: boolean + volumeAttributes: + additionalProperties: + type: string + description: VolumeAttributes stores driver-specific + properties that are passed to the CSI driver. + Consult your driver's documentation for supported + values. + type: object + required: + - driver + type: object + downwardAPI: + description: DownwardAPI represents downward API about + the pod that should populate this volume + properties: + defaultMode: + description: 'Optional: mode bits to use on created + files by default. Must be a value between 0 + and 0777. Defaults to 0644. Directories within + the path are not affected by this setting. This + might be in conflict with other options that + affect the file mode, like fsGroup, and the + result can be other mode bits set.' + format: int32 + type: integer + items: + description: Items is a list of downward API volume + file + items: + description: DownwardAPIVolumeFile represents + information to create the file containing + the pod field + properties: + fieldRef: + description: 'Required: Selects a field + of the pod: only annotations, labels, + name and namespace are supported.' + properties: + apiVersion: + description: Version of the schema the + FieldPath is written in terms of, + defaults to "v1". + type: string + fieldPath: + description: Path of the field to select + in the specified API version. + type: string + required: + - fieldPath + type: object + mode: + description: 'Optional: mode bits to use + on this file, must be a value between + 0 and 0777. If not specified, the volume + defaultMode will be used. This might be + in conflict with other options that affect + the file mode, like fsGroup, and the result + can be other mode bits set.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative + path name of the file to be created. Must + not be absolute or contain the ''..'' + path. Must be utf-8 encoded. The first + item of the relative path must not start + with ''..''' type: string - type: array - required: - - key - - operator + resourceFieldRef: + description: 'Selects a resource of the + container: only resources limits and requests + (limits.cpu, limits.memory, requests.cpu + and requests.memory) are currently supported.' + properties: + containerName: + description: 'Container name: required + for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format + of the exposed resources, defaults + to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to + select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + emptyDir: + description: 'EmptyDir represents a temporary directory + that shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + properties: + medium: + description: 'What type of storage medium should + back this directory. The default is "" which + means to use the node''s default medium. Must + be an empty string (default) or Memory. More + info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + description: 'Total amount of local storage required + for this EmptyDir volume. The size limit is + also applicable for memory medium. The maximum + usage on memory medium EmptyDir would be the + minimum value between the SizeLimit specified + here and the sum of memory limits of all containers + in a pod. The default is nil which means that + the limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir' + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + fc: + description: FC represents a Fibre Channel resource + that is attached to a kubelet's host machine and + then exposed to the pod. + properties: + fsType: + description: 'Filesystem type to mount. Must be + a filesystem type supported by the host operating + system. Ex. "ext4", "xfs", "ntfs". Implicitly + inferred to be "ext4" if unspecified. TODO: + how do we prevent errors in the filesystem from + compromising the machine' + type: string + lun: + description: 'Optional: FC target lun number' + format: int32 + type: integer + readOnly: + description: 'Optional: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting + in VolumeMounts.' + type: boolean + targetWWNs: + description: 'Optional: FC target worldwide names + (WWNs)' + items: + type: string + type: array + wwids: + description: 'Optional: FC volume world wide identifiers + (wwids) Either wwids or combination of targetWWNs + and lun must be set, but not both simultaneously.' + items: + type: string + type: array + type: object + flexVolume: + description: FlexVolume represents a generic volume + resource that is provisioned/attached using an exec + based plugin. + properties: + driver: + description: Driver is the name of the driver + to use for this volume. + type: string + fsType: + description: Filesystem type to mount. Must be + a filesystem type supported by the host operating + system. Ex. "ext4", "xfs", "ntfs". The default + filesystem depends on FlexVolume script. + type: string + options: + additionalProperties: + type: string + description: 'Optional: Extra command options + if any.' type: object - type: array - fieldSelectors: - additionalProperties: + readOnly: + description: 'Optional: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting + in VolumeMounts.' + type: boolean + secretRef: + description: 'Optional: SecretRef is reference + to the secret object containing sensitive information + to pass to the plugin scripts. This may be empty + if no secret object is specified. If the secret + object contains more than one secret, all secrets + are passed to the plugin scripts.' + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + required: + - driver + type: object + flocker: + description: Flocker represents a Flocker volume attached + to a kubelet's host machine. This depends on the + Flocker control service being running + properties: + datasetName: + description: Name of the dataset stored as metadata + -> name on the dataset for Flocker should be + considered as deprecated type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on fields. - type: object - labelSelectors: - additionalProperties: + datasetUUID: + description: UUID of the dataset. This is unique + identifier of a Flocker dataset type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to - which objects belong. - items: + type: object + gcePersistentDisk: + description: 'GCEPersistentDisk represents a GCE Disk + resource that is attached to a kubelet''s host machine + and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + properties: + fsType: + description: 'Filesystem type of the volume that + you want to mount. Tip: Ensure that the filesystem + type is supported by the host operating system. + Examples: "ext4", "xfs", "ntfs". Implicitly + inferred to be "ext4" if unspecified. More info: + https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + TODO: how do we prevent errors in the filesystem + from compromising the machine' type: string - type: array - nodeSelectors: - additionalProperties: + partition: + description: 'The partition in the volume that + you want to mount. If omitted, the default is + to mount by volume name. Examples: For volume + /dev/sda1, you specify the partition as "1". + Similarly, the volume partition for /dev/sda + is "0" (or you can leave the property empty). + More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + format: int32 + type: integer + pdName: + description: 'Unique name of the PD resource in + GCE. Used to identify the disk in GCE. More + info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' type: string - description: Map of string keys and values that - can be used to select nodes. Selector which must - match a node's labels, and objects must belong - to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects - must belong to these nodes. - items: + readOnly: + description: 'ReadOnly here will force the ReadOnly + setting in VolumeMounts. Defaults to false. + More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: boolean + required: + - pdName + type: object + gitRepo: + description: 'GitRepo represents a git repository + at a particular revision. DEPRECATED: GitRepo is + deprecated. To provision a container with a git + repo, mount an EmptyDir into an InitContainer that + clones the repo using git, then mount the EmptyDir + into the Pod''s container.' + properties: + directory: + description: Target directory name. Must not contain + or start with '..'. If '.' is supplied, the + volume directory will be the git repository. Otherwise, + if specified, the volume will contain the git + repository in the subdirectory with the given + name. type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: - Pending / Running / Succeeded / Failed / Unknown' - items: + repository: + description: Repository URL type: string - type: array - pods: - additionalProperties: + revision: + description: Commit hash for the specified revision. + type: string + required: + - repository + type: object + glusterfs: + description: 'Glusterfs represents a Glusterfs mount + on the host that shares a pod''s lifetime. More + info: https://examples.k8s.io/volumes/glusterfs/README.md' + properties: + endpoints: + description: 'EndpointsName is the endpoint name + that details Glusterfs topology. More info: + https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + path: + description: 'Path is the Glusterfs volume path. + More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + readOnly: + description: 'ReadOnly here will force the Glusterfs + volume to be mounted with read-only permissions. + Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: boolean + required: + - endpoints + - path + type: object + hostPath: + description: 'HostPath represents a pre-existing file + or directory on the host machine that is directly + exposed to the container. This is generally used + for system agents or other privileged things that + are allowed to see the host machine. Most containers + will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath + --- TODO(jonesdl) We need to restrict who can use + host directory mounts and who can/can not mount + host directories as read/write.' + properties: + path: + description: 'Path of the directory on the host. + If the path is a symlink, it will follow the + link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + type: + description: 'Type for HostPath Volume Defaults + to "" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + required: + - path + type: object + iscsi: + description: 'ISCSI represents an ISCSI Disk resource + that is attached to a kubelet''s host machine and + then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' + properties: + chapAuthDiscovery: + description: whether support iSCSI Discovery CHAP + authentication + type: boolean + chapAuthSession: + description: whether support iSCSI Session CHAP + authentication + type: boolean + fsType: + description: 'Filesystem type of the volume that + you want to mount. Tip: Ensure that the filesystem + type is supported by the host operating system. + Examples: "ext4", "xfs", "ntfs". Implicitly + inferred to be "ext4" if unspecified. More info: + https://kubernetes.io/docs/concepts/storage/volumes#iscsi + TODO: how do we prevent errors in the filesystem + from compromising the machine' + type: string + initiatorName: + description: Custom iSCSI Initiator Name. If initiatorName + is specified with iscsiInterface simultaneously, + new iSCSI interface : will be created for the connection. + type: string + iqn: + description: Target iSCSI Qualified Name. + type: string + iscsiInterface: + description: iSCSI Interface Name that uses an + iSCSI transport. Defaults to 'default' (tcp). + type: string + lun: + description: iSCSI Target Lun number. + format: int32 + type: integer + portals: + description: iSCSI Target Portal List. The portal + is either an IP or ip_addr:port if the port + is other than default (typically TCP ports 860 + and 3260). items: type: string type: array - description: Pods is a map of string keys and a - set values that used to select pods. The key defines - the namespace which pods belong, and the each - values is a set of pod names. - type: object - type: object - timeOffset: - description: TimeOffset defines the delta time of injected - program. It's a possibly signed sequence of decimal - numbers, such as "300ms", "-1.5h" or "2h45m". Valid - time units are "ns", "us" (or "µs"), "ms", "s", "m", - "h". - type: string - value: - description: Value is required when the mode is set - to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. - If `FixedPodMode`, provide an integer of pods to do - chaos action. If `FixedPercentPodMod`, provide a number - from 0-100 to specify the percent of pods the server - can do chaos action. IF `RandomMaxPercentPodMod`, provide - a number from 0-100 to specify the max percent of - pods to do chaos action - type: string - required: - - mode - - selector - - timeOffset - type: object - type: - description: 'TODO: use a custom type, as `TemplateType` - contains other possible values' - type: string - required: - - schedule - - type - type: object - stressChaos: - description: StressChaosSpec defines the desired state of StressChaos - properties: - containerNames: - description: ContainerNames indicates list of the name of - affected container. If not set, all containers will be - injected - items: - type: string - type: array - duration: - description: Duration represents the duration of the chaos - action - type: string - mode: - description: 'Mode defines the mode to run chaos action. - Supported mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - selector: - description: Selector is used to select pods that are used - to inject chaos action. - properties: - annotationSelectors: - additionalProperties: + readOnly: + description: ReadOnly here will force the ReadOnly + setting in VolumeMounts. Defaults to false. + type: boolean + secretRef: + description: CHAP Secret for iSCSI target and + initiator authentication + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + targetPortal: + description: iSCSI Target Portal. The Portal is + either an IP or ip_addr:port if the port is + other than default (typically TCP ports 860 + and 3260). + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + description: 'Volume''s name. Must be a DNS_LABEL + and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' type: string - description: Map of string keys and values that can - be used to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that - can be used to select objects. A list of selectors - based on set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. + nfs: + description: 'NFS represents an NFS mount on the host + that shares a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + properties: + path: + description: 'Path that is exported by the NFS + server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + readOnly: + description: 'ReadOnly here will force the NFS + export to be mounted with read-only permissions. + Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: boolean + server: + description: 'Server is the hostname or IP address + of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + description: 'PersistentVolumeClaimVolumeSource represents + a reference to a PersistentVolumeClaim in the same + namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + properties: + claimName: + description: 'ClaimName is the name of a PersistentVolumeClaim + in the same namespace as the pod using this + volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + type: string + readOnly: + description: Will force the ReadOnly setting in + VolumeMounts. Default false. + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + description: PhotonPersistentDisk represents a PhotonController + persistent disk attached and mounted on kubelets + host machine properties: - key: - description: key is the label key that the selector - applies to. + fsType: + description: Filesystem type to mount. Must be + a filesystem type supported by the host operating + system. Ex. "ext4", "xfs", "ntfs". Implicitly + inferred to be "ext4" if unspecified. type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, - NotIn, Exists and DoesNotExist. + pdID: + description: ID that identifies Photon Controller + persistent disk type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists - or DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. + required: + - pdID + type: object + portworxVolume: + description: PortworxVolume represents a portworx + volume attached and mounted on kubelets host machine + properties: + fsType: + description: FSType represents the filesystem + type to mount Must be a filesystem type supported + by the host operating system. Ex. "ext4", "xfs". + Implicitly inferred to be "ext4" if unspecified. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + volumeID: + description: VolumeID uniquely identifies a Portworx + volume + type: string + required: + - volumeID + type: object + projected: + description: Items for all in one resources secrets, + configmaps, and downward API + properties: + defaultMode: + description: Mode bits to use on created files + by default. Must be a value between 0 and 0777. + Directories within the path are not affected + by this setting. This might be in conflict with + other options that affect the file mode, like + fsGroup, and the result can be other mode bits + set. + format: int32 + type: integer + sources: + description: list of volume projections + items: + description: Projection that may be projected + along with other supported volume types + properties: + configMap: + description: information about the configMap + data to project + properties: + items: + description: If unspecified, each key-value + pair in the Data field of the referenced + ConfigMap will be projected into the + volume as a file whose name is the + key and content is the value. If specified, + the listed keys will be projected + into the specified paths, and unlisted + keys will not be present. If a key + is specified which is not present + in the ConfigMap, the volume setup + will error unless it is marked optional. + Paths must be relative and may not + contain the '..' path or start with + '..'. + items: + description: Maps a string key to + a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits + to use on this file, must be + a value between 0 and 0777. + If not specified, the volume + defaultMode will be used. This + might be in conflict with other + options that affect the file + mode, like fsGroup, and the + result can be other mode bits + set.' + format: int32 + type: integer + path: + description: The relative path + of the file to map the key to. + May not be an absolute path. + May not contain the path element + '..'. May not start with the + string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap + or its keys must be defined + type: boolean + type: object + downwardAPI: + description: information about the downwardAPI + data to project + properties: + items: + description: Items is a list of DownwardAPIVolume + file + items: + description: DownwardAPIVolumeFile + represents information to create + the file containing the pod field + properties: + fieldRef: + description: 'Required: Selects + a field of the pod: only annotations, + labels, name and namespace are + supported.' + properties: + apiVersion: + description: Version of the + schema the FieldPath is + written in terms of, defaults + to "v1". + type: string + fieldPath: + description: Path of the field + to select in the specified + API version. + type: string + required: + - fieldPath + type: object + mode: + description: 'Optional: mode bits + to use on this file, must be + a value between 0 and 0777. + If not specified, the volume + defaultMode will be used. This + might be in conflict with other + options that affect the file + mode, like fsGroup, and the + result can be other mode bits + set.' + format: int32 + type: integer + path: + description: 'Required: Path is the + relative path name of the file + to be created. Must not be absolute + or contain the ''..'' path. + Must be utf-8 encoded. The first + item of the relative path must + not start with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource + of the container: only resources + limits and requests (limits.cpu, + limits.memory, requests.cpu + and requests.memory) are currently + supported.' + properties: + containerName: + description: 'Container name: + required for volumes, optional + for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the + output format of the exposed + resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource + to select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + secret: + description: information about the secret + data to project + properties: + items: + description: If unspecified, each key-value + pair in the Data field of the referenced + Secret will be projected into the + volume as a file whose name is the + key and content is the value. If specified, + the listed keys will be projected + into the specified paths, and unlisted + keys will not be present. If a key + is specified which is not present + in the Secret, the volume setup will + error unless it is marked optional. + Paths must be relative and may not + contain the '..' path or start with + '..'. + items: + description: Maps a string key to + a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits + to use on this file, must be + a value between 0 and 0777. + If not specified, the volume + defaultMode will be used. This + might be in conflict with other + options that affect the file + mode, like fsGroup, and the + result can be other mode bits + set.' + format: int32 + type: integer + path: + description: The relative path + of the file to map the key to. + May not be an absolute path. + May not contain the path element + '..'. May not start with the + string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret + or its key must be defined + type: boolean + type: object + serviceAccountToken: + description: information about the serviceAccountToken + data to project + properties: + audience: + description: Audience is the intended + audience of the token. A recipient + of a token must identify itself with + an identifier specified in the audience + of the token, and otherwise should + reject the token. The audience defaults + to the identifier of the apiserver. + type: string + expirationSeconds: + description: ExpirationSeconds is the + requested duration of validity of + the service account token. As the + token approaches expiration, the kubelet + volume plugin will proactively rotate + the service account token. The kubelet + will start trying to rotate the token + if the token is older than 80 percent + of its time to live or if the token + is older than 24 hours.Defaults to + 1 hour and must be at least 10 minutes. + format: int64 + type: integer + path: + description: Path is the path relative + to the mount point of the file to + project the token into. + type: string + required: + - path + type: object + type: object + type: array + required: + - sources + type: object + quobyte: + description: Quobyte represents a Quobyte mount on + the host that shares a pod's lifetime + properties: + group: + description: Group to map volume access to Default + is no group + type: string + readOnly: + description: ReadOnly here will force the Quobyte + volume to be mounted with read-only permissions. + Defaults to false. + type: boolean + registry: + description: Registry represents a single or multiple + Quobyte Registry services specified as a string + as host:port pair (multiple entries are separated + with commas) which acts as the central registry + for volumes + type: string + tenant: + description: Tenant owning the given Quobyte volume + in the Backend Used with dynamically provisioned + Quobyte volumes, value is set by the plugin + type: string + user: + description: User to map volume access to Defaults + to serivceaccount user + type: string + volume: + description: Volume is a string that references + an already created Quobyte volume by name. + type: string + required: + - registry + - volume + type: object + rbd: + description: 'RBD represents a Rados Block Device + mount on the host that shares a pod''s lifetime. + More info: https://examples.k8s.io/volumes/rbd/README.md' + properties: + fsType: + description: 'Filesystem type of the volume that + you want to mount. Tip: Ensure that the filesystem + type is supported by the host operating system. + Examples: "ext4", "xfs", "ntfs". Implicitly + inferred to be "ext4" if unspecified. More info: + https://kubernetes.io/docs/concepts/storage/volumes#rbd + TODO: how do we prevent errors in the filesystem + from compromising the machine' + type: string + image: + description: 'The rados image name. More info: + https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + keyring: + description: 'Keyring is the path to key ring + for RBDUser. Default is /etc/ceph/keyring. More + info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + monitors: + description: 'A collection of Ceph monitors. More + info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' items: type: string type: array + pool: + description: 'The rados pool name. Default is + rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + readOnly: + description: 'ReadOnly here will force the ReadOnly + setting in VolumeMounts. Defaults to false. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: boolean + secretRef: + description: 'SecretRef is name of the authentication + secret for RBDUser. If provided overrides keyring. + Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + user: + description: 'The rados user name. Default is + admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string required: - - key - - operator + - image + - monitors type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which - objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select nodes. Selector which must match - a node's labels, and objects must belong to these - selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects - must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: Pending - / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set - values that used to select pods. The key defines the - namespace which pods belong, and the each values is - a set of pod names. - type: object - type: object - stressngStressors: - description: StressngStressors defines plenty of stressors - just like `Stressors` except that it's an experimental - feature and more powerful. You can define stressors in - `stress-ng` (see also `man stress-ng`) dialect, however - not all of the supported stressors are well tested. It - maybe retired in later releases. You should always use - `Stressors` to define the stressors and use this only - when you want more stressors unsupported by `Stressors`. - When both `StressngStressors` and `Stressors` are defined, - `StressngStressors` wins. - type: string - stressors: - description: Stressors defines plenty of stressors supported - to stress system components out. You can use one or more - of them to make up various kinds of stresses. At least - one of the stressors should be specified. - properties: - cpu: - description: CPUStressor stresses CPU out - properties: - load: - description: Load specifies P percent loading per - CPU worker. 0 is effectively a sleep (no load) - and 100 is full loading. - type: integer - options: - description: extend stress-ng options - items: + scaleIO: + description: ScaleIO represents a ScaleIO persistent + volume attached and mounted on Kubernetes nodes. + properties: + fsType: + description: Filesystem type to mount. Must be + a filesystem type supported by the host operating + system. Ex. "ext4", "xfs", "ntfs". Default is + "xfs". type: string - type: array - workers: - description: Workers specifies N workers to apply - the stressor. - type: integer - required: - - workers - type: object - memory: - description: MemoryStressor stresses virtual memory - out - properties: - options: - description: extend stress-ng options + gateway: + description: The host address of the ScaleIO API + Gateway. + type: string + protectionDomain: + description: The name of the ScaleIO Protection + Domain for the configured storage. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: SecretRef references to the secret + for ScaleIO user and other sensitive information. + If this is not provided, Login operation will + fail. + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + sslEnabled: + description: Flag to enable/disable SSL communication + with Gateway, default false + type: boolean + storageMode: + description: Indicates whether the storage for + a volume should be ThickProvisioned or ThinProvisioned. + Default is ThinProvisioned. + type: string + storagePool: + description: The ScaleIO Storage Pool associated + with the protection domain. + type: string + system: + description: The name of the storage system as + configured in ScaleIO. + type: string + volumeName: + description: The name of a volume already created + in the ScaleIO system that is associated with + this volume source. + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + description: 'Secret represents a secret that should + populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + properties: + defaultMode: + description: 'Optional: mode bits to use on created + files by default. Must be a value between 0 + and 0777. Defaults to 0644. Directories within + the path are not affected by this setting. This + might be in conflict with other options that + affect the file mode, like fsGroup, and the + result can be other mode bits set.' + format: int32 + type: integer items: + description: If unspecified, each key-value pair + in the Data field of the referenced Secret will + be projected into the volume as a file whose + name is the key and content is the value. If + specified, the listed keys will be projected + into the specified paths, and unlisted keys + will not be present. If a key is specified which + is not present in the Secret, the volume setup + will error unless it is marked optional. Paths + must be relative and may not contain the '..' + path or start with '..'. + items: + description: Maps a string key to a path within + a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use + on this file, must be a value between + 0 and 0777. If not specified, the volume + defaultMode will be used. This might be + in conflict with other options that affect + the file mode, like fsGroup, and the result + can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file + to map the key to. May not be an absolute + path. May not contain the path element + '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + optional: + description: Specify whether the Secret or its + keys must be defined + type: boolean + secretName: + description: 'Name of the secret in the pod''s + namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' type: string - type: array - size: - description: Size specifies N bytes consumed per - vm worker, default is the total available memory. - One can specify the size as % of total available - memory or in units of B, KB/KiB, MB/MiB, GB/GiB, - TB/TiB. - type: string - workers: - description: Workers specifies N workers to apply - the stressor. - type: integer - required: - - workers - type: object - type: object - value: - description: Value is required when the mode is set to `FixedPodMode` - / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. If - `FixedPodMode`, provide an integer of pods to do chaos - action. If `FixedPercentPodMod`, provide a number from - 0-100 to specify the percent of pods the server can do - chaos action. IF `RandomMaxPercentPodMod`, provide a - number from 0-100 to specify the max percent of pods to - do chaos action - type: string - required: - - mode - - selector + type: object + storageos: + description: StorageOS represents a StorageOS volume + attached and mounted on Kubernetes nodes. + properties: + fsType: + description: Filesystem type to mount. Must be + a filesystem type supported by the host operating + system. Ex. "ext4", "xfs", "ntfs". Implicitly + inferred to be "ext4" if unspecified. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: SecretRef specifies the secret to + use for obtaining the StorageOS API credentials. If + not specified, default values will be attempted. + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + volumeName: + description: VolumeName is the human-readable + name of the StorageOS volume. Volume names + are only unique within a namespace. + type: string + volumeNamespace: + description: VolumeNamespace specifies the scope + of the volume within StorageOS. If no namespace + is specified then the Pod's namespace will be + used. This allows the Kubernetes name scoping + to be mirrored within StorageOS for tighter + integration. Set VolumeName to any name to override + the default behaviour. Set to "default" if you + are not using namespaces within StorageOS. Namespaces + that do not pre-exist within StorageOS will + be created. + type: string + type: object + vsphereVolume: + description: VsphereVolume represents a vSphere volume + attached and mounted on kubelets host machine + properties: + fsType: + description: Filesystem type to mount. Must be + a filesystem type supported by the host operating + system. Ex. "ext4", "xfs", "ntfs". Implicitly + inferred to be "ext4" if unspecified. + type: string + storagePolicyID: + description: Storage Policy Based Management (SPBM) + profile ID associated with the StoragePolicyName. + type: string + storagePolicyName: + description: Storage Policy Based Management (SPBM) + profile name. + type: string + volumePath: + description: Path that identifies vSphere volume + vmdk + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array type: object tasks: + description: Tasks describes the children steps of serial or + parallel node. Only used when Type is TypeSerial or TypeParallel. items: type: string type: array diff --git a/pkg/expr/expr.go b/pkg/expr/expr.go new file mode 100644 index 0000000000..e6c12fd06f --- /dev/null +++ b/pkg/expr/expr.go @@ -0,0 +1,31 @@ +// Copyright 2021 Chaos Mesh Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package expr + +import ( + "github.com/antonmedv/expr" + "github.com/pkg/errors" +) + +func EvalBool(expression string, env map[string]interface{}) (bool, error) { + eval, err := expr.Eval(expression, env) + if err != nil { + return false, err + } + result, ok := eval.(bool) + if !ok { + return false, errors.Errorf("expression result is not boolean") + } + return result, nil +} diff --git a/pkg/expr/expr_test.go b/pkg/expr/expr_test.go new file mode 100644 index 0000000000..34b08d320a --- /dev/null +++ b/pkg/expr/expr_test.go @@ -0,0 +1,99 @@ +// Copyright 2021 Chaos Mesh Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package expr + +import "testing" + +func TestEvalBool(t *testing.T) { + type args struct { + expression string + env map[string]interface{} + } + tests := []struct { + name string + args args + want bool + wantErr bool + }{ + { + name: "expect true", + args: args{ + expression: "0 == 0", + env: nil, + }, + want: true, + wantErr: false, + }, { + name: "expect false", + args: args{ + expression: "0 != 0", + env: nil, + }, + want: false, + wantErr: false, + }, { + name: "exitCode is 0", + args: args{ + expression: "exitCode == 0", + env: map[string]interface{}{ + "exitCode": 0, + }, + }, + want: true, + wantErr: false, + }, { + name: "stdout is empty", + args: args{ + expression: "len(stdout) == 0 && stdout == \"\"", + env: map[string]interface{}{ + "stdout": "", + }, + }, + want: true, + wantErr: false, + }, { + name: "embedded value assertion", + args: args{ + expression: "obj.name == \"foo\"", + env: map[string]interface{}{ + "obj": map[string]interface{}{ + "name": "foo", + }, + }, + }, + want: true, + wantErr: false, + }, { + name: "not a bool expression", + args: args{ + expression: "0", + env: nil, + }, + want: false, + wantErr: true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got, err := EvalBool(tt.args.expression, tt.args.env) + if (err != nil) != tt.wantErr { + t.Errorf("EvalBool() error = %v, wantErr %v", err, tt.wantErr) + return + } + if got != tt.want { + t.Errorf("EvalBool() got = %v, want %v", got, tt.want) + } + }) + } +} diff --git a/pkg/workflow/controllers/bootstrap.go b/pkg/workflow/controllers/bootstrap.go index 448e89d64b..4846be79e2 100644 --- a/pkg/workflow/controllers/bootstrap.go +++ b/pkg/workflow/controllers/bootstrap.go @@ -15,6 +15,7 @@ package controllers import ( "github.com/go-logr/logr" + corev1 "k8s.io/api/core/v1" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/manager" @@ -102,5 +103,18 @@ func BootstrapWorkflowControllers(mgr manager.Manager, logger logr.Logger) error logger.WithName("workflow-chaos-node-reconciler"), ), ) + if err != nil { + return err + } + err = ctrl.NewControllerManagedBy(mgr). + For(&v1alpha1.WorkflowNode{}). + Owns(&corev1.Pod{}). + Named("workflow-task-reconciler"). + Complete(NewTaskReconciler( + noCacheClient, + mgr.GetConfig(), + mgr.GetEventRecorderFor("workflow-task-reconciler"), + logger.WithName("workflow-task-reconciler"), + )) return err } diff --git a/pkg/workflow/controllers/new_node.go b/pkg/workflow/controllers/new_node.go index 65ed5b855d..dac4142c3c 100644 --- a/pkg/workflow/controllers/new_node.go +++ b/pkg/workflow/controllers/new_node.go @@ -59,14 +59,16 @@ func renderNodesByTemplates(workflow *v1alpha1.Workflow, parent *v1alpha1.Workfl GenerateName: fmt.Sprintf("%s-", template.Name), }, Spec: v1alpha1.WorkflowNodeSpec{ - TemplateName: template.Name, - WorkflowName: workflow.Name, - Type: template.Type, - StartTime: &now, - Deadline: deadline, - Tasks: template.Tasks, - EmbedChaos: template.EmbedChaos, - Schedule: conversionSchedule(template.Schedule), + TemplateName: template.Name, + WorkflowName: workflow.Name, + Type: template.Type, + StartTime: &now, + Deadline: deadline, + Tasks: template.Tasks, + Task: template.Task, + ConditionalTasks: template.ConditionalTasks, + EmbedChaos: template.EmbedChaos, + Schedule: conversionSchedule(template.Schedule), }, } diff --git a/pkg/workflow/controllers/parallel_node_reconciler.go b/pkg/workflow/controllers/parallel_node_reconciler.go index 0465a83033..331d46d9d8 100644 --- a/pkg/workflow/controllers/parallel_node_reconciler.go +++ b/pkg/workflow/controllers/parallel_node_reconciler.go @@ -16,7 +16,6 @@ package controllers import ( "context" "fmt" - "strings" "time" "github.com/go-logr/logr" @@ -215,31 +214,3 @@ func (it *ParallelNodeReconciler) syncChildNodes(ctx context.Context, node v1alp return nil } - -func getTaskNameFromGeneratedName(generatedNodeName string) string { - index := strings.LastIndex(generatedNodeName, "-") - if index < 0 { - return generatedNodeName - } - return generatedNodeName[:index] -} - -// setDifference return the set of elements which contained in former but not in latter -func setDifference(former []string, latter []string) []string { - var result []string - formerSet := make(map[string]struct{}) - latterSet := make(map[string]struct{}) - - for _, item := range former { - formerSet[item] = struct{}{} - } - for _, item := range latter { - latterSet[item] = struct{}{} - } - for k := range formerSet { - if _, ok := latterSet[k]; !ok { - result = append(result, k) - } - } - return result -} diff --git a/pkg/workflow/controllers/task_reconciler.go b/pkg/workflow/controllers/task_reconciler.go new file mode 100644 index 0000000000..df99f74682 --- /dev/null +++ b/pkg/workflow/controllers/task_reconciler.go @@ -0,0 +1,438 @@ +// Copyright 2021 Chaos Mesh Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package controllers + +import ( + "context" + "encoding/json" + "fmt" + "time" + + "k8s.io/client-go/rest" + + "github.com/go-logr/logr" + "github.com/pkg/errors" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + "k8s.io/client-go/tools/record" + "k8s.io/client-go/util/retry" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/reconcile" + + "github.com/chaos-mesh/chaos-mesh/api/v1alpha1" + "github.com/chaos-mesh/chaos-mesh/pkg/workflow/task" + "github.com/chaos-mesh/chaos-mesh/pkg/workflow/task/collector" +) + +type TaskReconciler struct { + *ChildNodesFetcher + kubeClient client.Client + restConfig *rest.Config + eventRecorder record.EventRecorder + logger logr.Logger +} + +func NewTaskReconciler(kubeClient client.Client, restConfig *rest.Config, eventRecorder record.EventRecorder, logger logr.Logger) *TaskReconciler { + return &TaskReconciler{ + ChildNodesFetcher: NewChildNodesFetcher(kubeClient, logger), + kubeClient: kubeClient, + restConfig: restConfig, + eventRecorder: eventRecorder, + logger: logger, + } +} + +func (it *TaskReconciler) Reconcile(request reconcile.Request) (reconcile.Result, error) { + + startTime := time.Now() + defer func() { + it.logger.V(4).Info("Finished syncing for task node", + "node", request.NamespacedName, + "duration", time.Since(startTime), + ) + }() + + ctx := context.TODO() + + node := v1alpha1.WorkflowNode{} + err := it.kubeClient.Get(ctx, request.NamespacedName, &node) + if err != nil { + return reconcile.Result{}, client.IgnoreNotFound(err) + } + + // only resolve task nodes + if node.Spec.Type != v1alpha1.TypeTask { + return reconcile.Result{}, nil + } + + it.logger.V(4).Info("resolve task node", "node", request) + + pods, err := it.FetchPodControlledByThisWorkflowNode(ctx, node) + if err != nil { + return reconcile.Result{}, err + } + + if len(pods) == 0 { + if workflowName, ok := node.Labels[v1alpha1.LabelWorkflow]; ok { + parentWorkflow := v1alpha1.Workflow{} + err := it.kubeClient.Get(ctx, types.NamespacedName{ + Namespace: node.Namespace, + Name: workflowName, + }, &parentWorkflow) + if err != nil { + return reconcile.Result{}, err + } + err = it.SpawnTaskPod(ctx, &node, &parentWorkflow) + if err != nil { + return reconcile.Result{}, err + } + } else { + return reconcile.Result{}, errors.Errorf("node %s/%s does not contains label %s", node.Namespace, node.Name, v1alpha1.LabelWorkflow) + } + + } + + if len(pods) > 1 { + var podNames []string + for _, pod := range pods { + podNames = append(podNames, fmt.Sprintf("%s/%s", pod.Namespace, pod.Name)) + } + it.logger.Info("unexpected more than 1 pod created by task node, it will pick random one", + "node", request, + "pods", podNames, + "picked", fmt.Sprintf("%s/%s", pods[0].Namespace, pods[0].Name), + ) + } + + // update the status about conditional tasks + if len(pods) > 0 && (pods[0].Status.Phase == corev1.PodFailed || pods[0].Status.Phase == corev1.PodSucceeded) { + if !conditionalBranchesEvaluated(node) { + // task pod is terminated + updateError := retry.RetryOnConflict(retry.DefaultRetry, func() error { + nodeNeedUpdate := v1alpha1.WorkflowNode{} + err := it.kubeClient.Get(ctx, request.NamespacedName, &nodeNeedUpdate) + if err != nil { + return err + } + + if nodeNeedUpdate.Status.ConditionalBranches == nil { + nodeNeedUpdate.Status.ConditionalBranches = &v1alpha1.ConditionalBranchesStatus{} + } + + // TODO: update related condition + defaultCollector := collector.DefaultCollector(it.kubeClient, it.restConfig, pods[0].Namespace, pods[0].Name, nodeNeedUpdate.Spec.Task.Container.Name) + env, err := defaultCollector.CollectContext(ctx) + if err != nil { + it.logger.Error(err, "failed to fetch env from task", + "task", fmt.Sprintf("%s/%s", nodeNeedUpdate.Namespace, nodeNeedUpdate.Name), + ) + return err + } + if env != nil { + jsonString, err := json.Marshal(env) + if err != nil { + it.logger.Error(err, "failed to convert env to json", + "task", fmt.Sprintf("%s/%s", nodeNeedUpdate.Namespace, nodeNeedUpdate.Name), + "env", env) + } else { + nodeNeedUpdate.Status.ConditionalBranches.Context = []string{string(jsonString)} + } + } + + evaluator := task.NewEvaluator(it.logger, it.kubeClient) + evaluateConditionBranches, err := evaluator.EvaluateConditionBranches(nodeNeedUpdate.Spec.ConditionalTasks, env) + if err != nil { + it.logger.Error(err, "failed to evaluate expression", + "task", fmt.Sprintf("%s/%s", nodeNeedUpdate.Namespace, nodeNeedUpdate.Name), + ) + return err + } + + nodeNeedUpdate.Status.ConditionalBranches.Branches = evaluateConditionBranches + + err = it.kubeClient.Status().Update(ctx, &nodeNeedUpdate) + return err + }) + if client.IgnoreNotFound(updateError) != nil { + it.logger.Error(updateError, "failed to update the condition status of task", + "task", request) + } + } + } else { + // task pod is still running or not exists + updateError := retry.RetryOnConflict(retry.DefaultRetry, func() error { + nodeNeedUpdate := v1alpha1.WorkflowNode{} + err := it.kubeClient.Get(ctx, request.NamespacedName, &nodeNeedUpdate) + if err != nil { + return err + } + // TODO: update related condition + var branches []v1alpha1.ConditionalBranch + + if nodeNeedUpdate.Status.ConditionalBranches == nil { + nodeNeedUpdate.Status.ConditionalBranches = &v1alpha1.ConditionalBranchesStatus{} + } + + for _, conditionalTask := range nodeNeedUpdate.Spec.ConditionalTasks { + branch := v1alpha1.ConditionalBranch{ + Task: conditionalTask.Task, + EvaluationResult: corev1.ConditionUnknown, + } + branches = append(branches, branch) + } + + nodeNeedUpdate.Status.ConditionalBranches.Branches = branches + + err = it.kubeClient.Status().Update(ctx, &nodeNeedUpdate) + return err + }) + + if client.IgnoreNotFound(updateError) != nil { + it.logger.Error(updateError, "k failed to update the condition status of task", + "task", request) + } + + } + + // update the status about children nodes + var evaluatedNode v1alpha1.WorkflowNode + + err = it.kubeClient.Get(ctx, request.NamespacedName, &evaluatedNode) + if err != nil { + return reconcile.Result{}, err + } + if conditionalBranchesEvaluated(evaluatedNode) { + err = it.syncChildNodes(ctx, evaluatedNode) + if err != nil { + return reconcile.Result{}, err + } + + // update the status of children workflow nodes + updateError := retry.RetryOnConflict(retry.DefaultRetry, func() error { + nodeNeedUpdate := v1alpha1.WorkflowNode{} + err := it.kubeClient.Get(ctx, request.NamespacedName, &nodeNeedUpdate) + if err != nil { + return err + } + var tasks []string + for _, branch := range evaluatedNode.Status.ConditionalBranches.Branches { + if branch.EvaluationResult == corev1.ConditionTrue { + tasks = append(tasks, branch.Task) + } + } + + activeChildren, finishedChildren, err := it.fetchChildNodes(ctx, nodeNeedUpdate) + if err != nil { + return err + } + + nodeNeedUpdate.Status.FinishedChildren = nil + for _, finishedChild := range finishedChildren { + nodeNeedUpdate.Status.FinishedChildren = append(nodeNeedUpdate.Status.FinishedChildren, + corev1.LocalObjectReference{ + Name: finishedChild.Name, + }) + } + + nodeNeedUpdate.Status.ActiveChildren = nil + for _, activeChild := range activeChildren { + nodeNeedUpdate.Status.ActiveChildren = append(nodeNeedUpdate.Status.ActiveChildren, + corev1.LocalObjectReference{ + Name: activeChild.Name, + }) + } + + // TODO: also check the consistent between spec in task and the spec in child node + + if conditionalBranchesEvaluated(nodeNeedUpdate) && len(finishedChildren) == len(tasks) { + SetCondition(&nodeNeedUpdate.Status, v1alpha1.WorkflowNodeCondition{ + Type: v1alpha1.ConditionAccomplished, + Status: corev1.ConditionTrue, + Reason: "", + }) + } else { + SetCondition(&nodeNeedUpdate.Status, v1alpha1.WorkflowNodeCondition{ + Type: v1alpha1.ConditionAccomplished, + Status: corev1.ConditionFalse, + Reason: "", + }) + } + + return it.kubeClient.Status().Update(ctx, &nodeNeedUpdate) + }) + + return reconcile.Result{}, client.IgnoreNotFound(updateError) + } + + return reconcile.Result{}, nil + +} + +func (it *TaskReconciler) syncChildNodes(ctx context.Context, evaluatedNode v1alpha1.WorkflowNode) error { + + var tasks []string + for _, branch := range evaluatedNode.Status.ConditionalBranches.Branches { + if branch.EvaluationResult == corev1.ConditionTrue { + tasks = append(tasks, branch.Task) + } + } + + if len(tasks) == 0 { + it.logger.V(4).Info("0 condition of branch in task node is True, Noop", + "node", fmt.Sprintf("%s/%s", evaluatedNode.Namespace, evaluatedNode.Name), + ) + return nil + } + + activeChildNodes, finishedChildNodes, err := it.fetchChildNodes(ctx, evaluatedNode) + if err != nil { + return err + } + existsChildNodes := append(activeChildNodes, finishedChildNodes...) + + var taskNamesOfNodes []string + for _, childNode := range existsChildNodes { + taskNamesOfNodes = append(taskNamesOfNodes, getTaskNameFromGeneratedName(childNode.GetName())) + } + + // TODO: check the specific of task and workflow nodes + // the definition of tasks changed, remove all the existed nodes + if len(setDifference(taskNamesOfNodes, tasks)) > 0 || + len(setDifference(tasks, taskNamesOfNodes)) > 0 { + for _, childNode := range existsChildNodes { + // best effort deletion + err := it.kubeClient.Delete(ctx, &childNode) + if err != nil { + it.logger.Error(err, "failed to delete outdated child node", + "node", fmt.Sprintf("%s/%s", evaluatedNode.Namespace, evaluatedNode.Name), + "child node", fmt.Sprintf("%s/%s", childNode.Namespace, childNode.Name), + ) + } + } + } else { + // exactly same, NOOP + return nil + } + + parentWorkflow := v1alpha1.Workflow{} + err = it.kubeClient.Get(ctx, types.NamespacedName{ + Namespace: evaluatedNode.Namespace, + Name: evaluatedNode.Spec.WorkflowName, + }, &parentWorkflow) + if err != nil { + it.logger.Error(err, "failed to fetch parent workflow", + "node", fmt.Sprintf("%s/%s", evaluatedNode.Namespace, evaluatedNode.Name), + "workflow name", evaluatedNode.Spec.WorkflowName) + return err + } + + childNodes, err := renderNodesByTemplates(&parentWorkflow, &evaluatedNode, tasks...) + if err != nil { + it.logger.Error(err, "failed to render children childNodes", + "node", fmt.Sprintf("%s/%s", evaluatedNode.Namespace, evaluatedNode.Name)) + return err + } + + // TODO: emit event + var childrenNames []string + for _, childNode := range childNodes { + err := it.kubeClient.Create(ctx, childNode) + if err != nil { + it.logger.Error(err, "failed to create child node", + "node", fmt.Sprintf("%s/%s", evaluatedNode.Namespace, evaluatedNode.Name), + "child node", childNode) + return err + } + childrenNames = append(childrenNames, childNode.Name) + } + it.logger.Info("task node spawn new child node", + "node", fmt.Sprintf("%s/%s", evaluatedNode.Namespace, evaluatedNode.Name), + "child node", childrenNames) + + return nil +} + +func (it *TaskReconciler) FetchPodControlledByThisWorkflowNode(ctx context.Context, node v1alpha1.WorkflowNode) ([]corev1.Pod, error) { + controlledByThisNode, err := metav1.LabelSelectorAsSelector(&metav1.LabelSelector{ + MatchLabels: map[string]string{ + v1alpha1.LabelControlledBy: node.Name, + }, + }) + + if err != nil { + it.logger.Error(err, "failed to build label selector with filtering children workflow node controlled by current node", + "current node", fmt.Sprintf("%s/%s", node.Namespace, node.Name)) + return nil, err + } + + var childPods corev1.PodList + + err = it.kubeClient.List(ctx, &childPods, &client.ListOptions{ + LabelSelector: controlledByThisNode, + }) + if err != nil { + return nil, err + } + return childPods.Items, nil +} + +func (it *TaskReconciler) SpawnTaskPod(ctx context.Context, node *v1alpha1.WorkflowNode, workflow *v1alpha1.Workflow) error { + if node.Spec.Task == nil { + return errors.Errorf("node %s/%s does not contains spec of Task", node.Namespace, node.Name) + } + podSpec, err := task.SpawnPodForTask(*node.Spec.Task) + if err != nil { + return err + } + taskPod := corev1.Pod{ + TypeMeta: metav1.TypeMeta{}, + ObjectMeta: metav1.ObjectMeta{ + GenerateName: fmt.Sprintf("%s-", node.Name), + Namespace: node.Namespace, + Labels: map[string]string{ + v1alpha1.LabelControlledBy: node.Name, + v1alpha1.LabelWorkflow: workflow.Name, + }, + OwnerReferences: []metav1.OwnerReference{ + { + APIVersion: ApiVersion, + Kind: KindWorkflowNode, + Name: node.Name, + UID: node.UID, + Controller: &isController, + BlockOwnerDeletion: &blockOwnerDeletion, + }, + }, + Finalizers: []string{metav1.FinalizerDeleteDependents}, + }, + Spec: podSpec, + } + return it.kubeClient.Create(ctx, &taskPod) +} + +func conditionalBranchesEvaluated(node v1alpha1.WorkflowNode) bool { + if node.Status.ConditionalBranches == nil { + return false + } + if len(node.Spec.ConditionalTasks) != len(node.Status.ConditionalBranches.Branches) { + return false + } + for _, branch := range node.Status.ConditionalBranches.Branches { + if branch.EvaluationResult == corev1.ConditionUnknown { + return false + } + } + return true +} diff --git a/pkg/workflow/controllers/utils.go b/pkg/workflow/controllers/utils.go index c8740d124c..37e4072956 100644 --- a/pkg/workflow/controllers/utils.go +++ b/pkg/workflow/controllers/utils.go @@ -17,6 +17,7 @@ import ( "context" "fmt" "sort" + "strings" "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" @@ -174,3 +175,31 @@ func (it *ChildNodesFetcher) fetchChildNodes(ctx context.Context, node v1alpha1. } return activeChildren, finishedChildren, nil } + +func getTaskNameFromGeneratedName(generatedNodeName string) string { + index := strings.LastIndex(generatedNodeName, "-") + if index < 0 { + return generatedNodeName + } + return generatedNodeName[:index] +} + +// setDifference return the set of elements which contained in former but not in latter +func setDifference(former []string, latter []string) []string { + var result []string + formerSet := make(map[string]struct{}) + latterSet := make(map[string]struct{}) + + for _, item := range former { + formerSet[item] = struct{}{} + } + for _, item := range latter { + latterSet[item] = struct{}{} + } + for k := range formerSet { + if _, ok := latterSet[k]; !ok { + result = append(result, k) + } + } + return result +} diff --git a/pkg/workflow/task/collector/collector.go b/pkg/workflow/task/collector/collector.go new file mode 100644 index 0000000000..44aac30b5f --- /dev/null +++ b/pkg/workflow/task/collector/collector.go @@ -0,0 +1,67 @@ +// Copyright 2021 Chaos Mesh Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package collector + +import ( + "context" + + "k8s.io/client-go/rest" + "sigs.k8s.io/controller-runtime/pkg/client" +) + +// Collector is a set of tools for collecting parameters/context from user defined task +type Collector interface { + CollectContext(ctx context.Context) (env map[string]interface{}, err error) +} + +type ComposeCollector struct { + collectors []Collector +} + +func (it *ComposeCollector) CollectContext(ctx context.Context) (env map[string]interface{}, err error) { + if len(it.collectors) == 0 { + return nil, nil + } + if len(it.collectors) == 1 { + return it.collectors[0].CollectContext(ctx) + } + + result := make(map[string]interface{}) + for _, collector := range it.collectors { + temp, err := collector.CollectContext(ctx) + if err != nil { + return nil, err + } + mapExtend(result, temp) + } + return result, nil +} + +// mapExtend will merge another map into the origin map, value with duplicated key will be replaced. +// origin map should not be nil +func mapExtend(origin map[string]interface{}, another map[string]interface{}) { + if origin == nil || another == nil { + return + } + for k, v := range another { + origin[k] = v + } +} + +func DefaultCollector(kubeClient client.Client, restConfig *rest.Config, namespace, podName, containerName string) Collector { + return &ComposeCollector{collectors: []Collector{ + NewExitCodeCollector(kubeClient, namespace, podName, containerName), + NewStdoutCollector(restConfig, namespace, podName, containerName), + }} +} diff --git a/pkg/workflow/task/collector/exit_code.go b/pkg/workflow/task/collector/exit_code.go new file mode 100644 index 0000000000..af3f3a4b22 --- /dev/null +++ b/pkg/workflow/task/collector/exit_code.go @@ -0,0 +1,75 @@ +// Copyright 2021 Chaos Mesh Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package collector + +import ( + "context" + + "github.com/pkg/errors" + corev1 "k8s.io/api/core/v1" + apierrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/controller-runtime/pkg/client" +) + +const ExitCode string = "exitCode" + +type ExitCodeCollector struct { + kubeClient client.Client + namespace string + podName string + containerName string +} + +func NewExitCodeCollector(kubeClient client.Client, namespace string, podName string, containerName string) *ExitCodeCollector { + return &ExitCodeCollector{kubeClient: kubeClient, namespace: namespace, podName: podName, containerName: containerName} +} + +func (it *ExitCodeCollector) CollectContext(ctx context.Context) (env map[string]interface{}, err error) { + var pod corev1.Pod + err = it.kubeClient.Get(ctx, types.NamespacedName{ + Namespace: it.namespace, + Name: it.podName, + }, &pod) + + if apierrors.IsNotFound(err) { + return nil, nil + } + + if err != nil { + return nil, err + } + + var targetContainerStatus corev1.ContainerStatus + found := false + for _, containerStatus := range pod.Status.ContainerStatuses { + if containerStatus.Name == it.containerName { + targetContainerStatus = containerStatus + found = true + break + } + } + + if !found { + return nil, errors.Errorf("no such contaienr called %s in pod %s/%s", it.containerName, pod.Namespace, pod.Name) + } + + if targetContainerStatus.State.Terminated == nil { + return nil, errors.Errorf("container %s in pod %s/%s is waiting or running, not in ternimated", it.containerName, pod.Namespace, pod.Name) + } + + return map[string]interface{}{ + ExitCode: targetContainerStatus.State.Terminated.ExitCode, + }, nil +} diff --git a/pkg/workflow/task/collector/stdout.go b/pkg/workflow/task/collector/stdout.go new file mode 100644 index 0000000000..618d179116 --- /dev/null +++ b/pkg/workflow/task/collector/stdout.go @@ -0,0 +1,57 @@ +// Copyright 2021 Chaos Mesh Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package collector + +import ( + "context" + "strings" + + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/rest" +) + +const Stdout string = "stdout" + +type StdoutCollector struct { + restConfig *rest.Config + namespace string + podName string + containerName string +} + +func NewStdoutCollector(restConfig *rest.Config, namespace string, podName string, containerName string) *StdoutCollector { + return &StdoutCollector{restConfig: restConfig, namespace: namespace, podName: podName, containerName: containerName} +} + +func (it *StdoutCollector) CollectContext(ctx context.Context) (env map[string]interface{}, err error) { + client, err := kubernetes.NewForConfig(it.restConfig) + if err != nil { + return nil, err + } + + request := client.CoreV1().Pods(it.namespace).GetLogs(it.podName, &v1.PodLogOptions{ + TypeMeta: metav1.TypeMeta{}, + Container: it.containerName, + }).Context(ctx) + + var bytes []byte + if bytes, err = request.Do().Raw(); err != nil { + return nil, err + } + stdout := strings.TrimSpace(string(bytes)) + + return map[string]interface{}{Stdout: stdout}, nil +} diff --git a/pkg/workflow/task/collector/valued_collector.go b/pkg/workflow/task/collector/valued_collector.go new file mode 100644 index 0000000000..966f737a1e --- /dev/null +++ b/pkg/workflow/task/collector/valued_collector.go @@ -0,0 +1,44 @@ +// Copyright 2021 Chaos Mesh Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package collector + +import ( + "encoding/json" + + "github.com/chaos-mesh/chaos-mesh/api/v1alpha1" +) + +type ValuedCollector struct { + status v1alpha1.ConditionalBranchesStatus +} + +func NewValuedCollector(status v1alpha1.ConditionalBranchesStatus) *ValuedCollector { + return &ValuedCollector{status: status} +} + +func (it *ValuedCollector) CollectContext() (env map[string]interface{}, err error) { + if len(it.status.Context) == 0 { + return nil, nil + } + result := make(map[string]interface{}) + for _, jsonString := range it.status.Context { + var tmp map[string]interface{} + err := json.Unmarshal([]byte(jsonString), &tmp) + if err != nil { + return nil, err + } + mapExtend(result, tmp) + } + return result, err +} diff --git a/pkg/workflow/task/doc.go b/pkg/workflow/task/doc.go new file mode 100644 index 0000000000..1ece586b6a --- /dev/null +++ b/pkg/workflow/task/doc.go @@ -0,0 +1,15 @@ +// Copyright 2021 Chaos Mesh Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package task contains the tools for build an customized job and assert the condition branches +package task diff --git a/pkg/workflow/task/evaluator.go b/pkg/workflow/task/evaluator.go new file mode 100644 index 0000000000..184ada6279 --- /dev/null +++ b/pkg/workflow/task/evaluator.go @@ -0,0 +1,59 @@ +// Copyright 2021 Chaos Mesh Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package task + +import ( + "github.com/go-logr/logr" + corev1 "k8s.io/api/core/v1" + "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/chaos-mesh/chaos-mesh/api/v1alpha1" + "github.com/chaos-mesh/chaos-mesh/pkg/expr" +) + +type Evaluator struct { + logger logr.Logger + kubeclient client.Client +} + +func NewEvaluator(logger logr.Logger, kubeclient client.Client) *Evaluator { + return &Evaluator{logger: logger, kubeclient: kubeclient} +} + +func (it *Evaluator) EvaluateConditionBranches(tasks []v1alpha1.ConditionalTask, resultEnv map[string]interface{}) (branches []v1alpha1.ConditionalBranch, err error) { + + var result []v1alpha1.ConditionalBranch + for _, task := range tasks { + it.logger.V(4).Info("evaluate for expression", "expression", task.Expression, "env", resultEnv) + var evalResult corev1.ConditionStatus + eval, err := expr.EvalBool(task.Expression, resultEnv) + + if err != nil { + it.logger.Error(err, "failed to evaluate expression", "expression", task.Expression, "env", resultEnv) + evalResult = corev1.ConditionUnknown + } else { + if eval { + evalResult = corev1.ConditionTrue + } else { + evalResult = corev1.ConditionFalse + } + } + + result = append(result, v1alpha1.ConditionalBranch{ + Task: task.Task, + EvaluationResult: evalResult, + }) + } + return result, nil +} diff --git a/pkg/workflow/task/pod.go b/pkg/workflow/task/pod.go new file mode 100644 index 0000000000..57c426f63f --- /dev/null +++ b/pkg/workflow/task/pod.go @@ -0,0 +1,51 @@ +// Copyright 2021 Chaos Mesh Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package task + +import ( + corev1 "k8s.io/api/core/v1" + + "github.com/chaos-mesh/chaos-mesh/api/v1alpha1" +) + +const ( + PodMetadataVolumeName = "podmetadata" + PodMetadataAnnotationsVolumePath = "" + PodMetadataMountPath = "/var/run/chaos-mesh/" +) + +func SpawnPodForTask(task v1alpha1.Task) (corev1.PodSpec, error) { + deepCopiedContainer := task.Container.DeepCopy() + if len(deepCopiedContainer.Resources.Limits) == 0 { + deepCopiedContainer.Resources.Limits.Cpu().SetMilli(1000) + deepCopiedContainer.Resources.Limits.Memory().Set(1000) + } + result := corev1.PodSpec{ + RestartPolicy: corev1.RestartPolicyNever, + Volumes: attachVolumes(task), + Containers: []corev1.Container{ + *deepCopiedContainer, + }, + } + return result, nil +} + +func attachVolumes(task v1alpha1.Task) []corev1.Volume { + var result []corev1.Volume + + // TODO: downwards API and configmaps + + result = append(result, task.Volumes...) + return result +}