From 4edad638d477f58ae6f249d8780254f68fcc6afd Mon Sep 17 00:00:00 2001 From: raunaks13 Date: Sun, 17 Mar 2024 19:03:02 -0400 Subject: [PATCH] added porting config for operator --- .../alarms-report.md | 134 + .../apps.kubeblocks.io_clusters.yaml | 2520 + .../context.json | 1627 + .../kubeblocks-postgresql-config.json | 26 + .../kubeblocks-postgresql-cr.yaml | 44 + .../kubeblocks.yaml | 4400 ++ .../kubeblocks_crds.yaml | 56690 ++++++++++++++++ .../kubeblocks_helm_template.yaml | 6217 ++ .../kubeblocks_manifest.yaml | 6141 ++ .../postgresql_manifest.yaml | 0 10 files changed, 77799 insertions(+) create mode 100644 data/kubeblocks-postgresql-operator/alarms-report.md create mode 100644 data/kubeblocks-postgresql-operator/apps.kubeblocks.io_clusters.yaml create mode 100644 data/kubeblocks-postgresql-operator/context.json create mode 100644 data/kubeblocks-postgresql-operator/kubeblocks-postgresql-config.json create mode 100644 data/kubeblocks-postgresql-operator/kubeblocks-postgresql-cr.yaml create mode 100644 data/kubeblocks-postgresql-operator/kubeblocks.yaml create mode 100644 data/kubeblocks-postgresql-operator/kubeblocks_crds.yaml create mode 100644 data/kubeblocks-postgresql-operator/kubeblocks_helm_template.yaml create mode 100644 data/kubeblocks-postgresql-operator/kubeblocks_manifest.yaml create mode 100644 data/kubeblocks-postgresql-operator/postgresql_manifest.yaml diff --git a/data/kubeblocks-postgresql-operator/alarms-report.md b/data/kubeblocks-postgresql-operator/alarms-report.md new file mode 100644 index 0000000000..d173f26cb0 --- /dev/null +++ b/data/kubeblocks-postgresql-operator/alarms-report.md @@ -0,0 +1,134 @@ +### Alarms analysis + + +1, 2, 3. `testrun-2024-02-23-20-31/trial-02-0007/0001`, `testrun-2024-02-23-20-31/trial-02-0006/0004`, `testrun-2024-02-23-20-31/trial-02-0008/0001` + +Testcase: `{"field": "[\"spec\", \"affinity\", \"nodeLabels\", \"ACTOKEY\"]", "testcase": "string-change"}` + +Acto changes the nodeLabels field from "NotPresent" to "ACTOKEY". + +`message='statefulset: test-cluster-postgresql replicas [1] ready_replicas [None]\npod: test-cluster-postgresql-0'` + +The health oracle expects that there should be 1 ready replica in the system, but there are none, so it raises an alarm. + +The following event occurs: `0/4 nodes are available: 1 node(s) didn't match Pod's node affinity/selector. preemption: 0/4 nodes are available: 1 Preemption is not helpful for scheduling, 3 No preemption victims found for incoming pod.` + +Basically "ACTOKEY" is not a valid node label. However, the operator shuts down the running replica itself instead of rejecting the invalid state (which results in updating the affinity rule with an incorrect value). Thus the alarm is a **misoperation**. + + +4, 5. `testrun-2024-02-23-20-31/trial-02-0013/0005`, `testrun-2024-02-23-20-31/trial-03-0007/0003` + +Testcase: `{"field": "[\"spec\", \"componentSpecs\", 0, \"services\", 0, \"annotations\", \"ACTOKEY\"]", "testcase": "string-deletion"}` + +Acto removes spec.componentSpecs[0].services[0].annotations. Previously it was "ACTOKEY". +The consistency oracle raises an alarm that there is no such matching system change. + +message='Found no matching fields for input' input_diff=Diff(prev='ACTOKEY', curr='', path=["spec", "componentSpecs", 0, "services", 0, "annotations", "ACTOKEY"]) system_state_diff=None + +This occurs because the Reconcile() function of the operator calls ApplyParameters(), which calls DoMerge() in reconfigure_pipeline.go that merges operator configurations. +After several steps this calls MergeMap() on the annotations, that merges the backup annotation with the new one. So the old annotation value is not deleted. So this is a **true** alarm. + +6-10. `testrun-2024-02-23-20-31/trial-00-0019/0001, testrun-2024-02-23-20-31/trial-00-0021/0001, testrun-2024-02-23-20-31/trial-03-0014/0001, +testrun-2024-02-23-20-31/trial-04-0019/0001` + +In these alarms acto adds some variation of: +``` + userResourceRefs: + configMapRefs: + - asVolumeFrom: + - ACTOKEY + configMap: {} + mountPoint: /jiyyay4e9mdlz06j2mn3n22xn2zcuuqautlbyltm6cyh67ynqwi03nwqmgi-18wpxd-cq7ixsypzbe3b-0blkusvc-dflm59kq0n50awotvkpxkddcs2f5bwjyskqqrm13taiestlhg4rkg1kh2pihr8a1f7yys3fauo4-m4ftdy6bmy6gg3ybr7us448uco7l50z-1m1q54wy2c9avdd-unnfqx12zrge + name: e +``` + +Normal kubeblocks deployment runs fine. +However in each of these cases, configMap.name is not present so an error like +`spec.volumes[3].configMap.name: Required value` is generated in the postgresql pod. + +This is a **misconfiguration** since the generated yaml is incorrect. + +11. `testrun-2024-02-23-20-31/trial-03-0015/0001` + +Similar to above, but here the spec.volumes[3].name field contains dots, which is not allowed. + +**Misconfiguration** + +12. `testrun-2024-02-23-20-31/trial-07-0007/0001`, `testrun-2024-02-23-20-31/trial-01-0017/0001`, `testrun-2024-02-23-20-31/trial-01-0016/0001`, `testrun-2024-02-23-20-31/trial-01-0018/0001`, + +Same as 6-10 + +13. `testrun-2024-02-23-20-31/trial-07-0009/0003` + +Similar to above. `configMapsRef.name` yaml should not contain dots. **Misconfiguration** + +14 - 22. `testrun-2024-02-23-20-31/trial-02-0021/0001`, `testrun-2024-02-23-20-31/trial-02-0020/0009`, `testrun-2024-02-23-20-31/trial-03-0017/0001`, `testrun-2024-02-23-20-31/trial-05-0002/0001`, `testrun-2024-02-23-20-31/trial-05-0001/0001`, `testrun-2024-02-23-20-31/trial-05-0000/0001`, `testrun-2024-02-23-20-31/trial-05-0000/0001`, `testrun-2024-02-23-20-31/trial-05-0000/0001`, `testrun-2024-02-23-20-31/trial-08-0000/0003` + +Similar to 6-10, secret.secretName not specified in generated yaml, making it invalid +`error: Pod "pg-cluster-postgresql-0" is invalid: spec.volumes[3].secret.secretName: Required value` + +**Misconfiguration** + +23 - 26. `testrun-2024-02-23-20-31/trial-00-0006/0006`, `testrun-2024-02-23-20-31/trial-05-0014/0001`, `testrun-2024-02-23-20-31/trial-05-0013/0002`, `testrun-2024-02-23-20-31/trial-05-0015/0001` + +```0/4 nodes are available: 1 node(s) didn't match Pod's node affinity/selector. preemption: 0/4 nodes are available: 1 Preemption is not helpful for scheduling, 3 No preemption victims found for incoming pod.. +``` + +Acto adds a single node label to the yaml in the affinity rules, that does not match the correct label for the node. +All the cases follow similar pattern. +**Misoperation** + +27 - 30. `testrun-2024-02-23-20-31/trial-06-0004/0001`, `testrun-2024-02-23-20-31/trial-07-0004/0002`, `testrun-2024-02-23-20-31/trial-04-0015/0002`, `testrun-2024-02-23-20-31/trial-04-0016/0003` + +```...Invalid value: "": name part must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]'), spec.topologySpreadConstraints[0].topologyKey: Required value: can not be empty +``` +Invalid yaml generated. Acto sets topologyKeys to ''. + +**Misoperation** + + +31 - 38. `testrun-2024-02-23-20-31/trial-04-0014/0005`, `testrun-2024-02-23-20-31/trial-08-0006/0002`, `testrun-2024-02-23-20-31/trial-00-0009/0001`, `testrun-2024-02-23-20-31/trial-08-0007/0002`, `testrun-2024-02-23-20-31/trial-03-0013/0001`, `testrun-2024-02-23-20-31/trial-05-0021/0002`, `testrun-2024-02-23-20-31/trial-06-0011/0001`, `testrun-2024-02-23-20-31/trial-05-0022/0002` + +```Pod "pg-cluster-postgresql-0" is invalid: [spec.tolerations[0].effect: Invalid value: "INVALID_EFFECT": effect must be 'NoExecute' when `tolerationSeconds` is set, spec.tolerations[0].effect: Unsupported value: "INVALID_EFFECT": supported values: "NoSchedule", "PreferNoSchedule", "NoExecute"``` + +Acto incorrectly sets the yaml for tolerations. Similar errors for each case. +**Misoperation** + +39 - 40. `testrun-2024-02-23-20-31/trial-04-0005/0001`, `testrun-2024-02-23-20-31/trial-05-0020/0006` + +Same as 23-26 **Misoperation** + +41 - 44. `testrun-2024-02-23-20-31/trial-07-0001/0001`, `testrun-2024-02-23-20-31/trial-07-0000/0004`, `testrun-2024-02-23-20-31/trial-07-0014/0001`, `testrun-2024-02-23-20-31/trial-02-0009/0001` + +```create Pod pg-cluster-postgresql-0 in StatefulSet pg-cluster-postgresql failed error: Pod "pg-cluster-postgresql-0" is invalid: [spec.containers[0].resources.requests[ACTOKEY]: Invalid value: "ACTOKEY": must be a standard resource type or fully qualified, spec.containers[0].resources.requests[ACTOKEY]: Invalid value: "ACTOKEY": must be a standard resource for containers]``` + +Acto specifies an invalid value in the resources yaml. All cases have similar errors. + +**Misoperation** + +45 - 47. `testrun-2024-02-23-20-31/trial-06-0006/0004`, `testrun-2024-02-23-20-31/trial-00-0000/0008`, `testrun-2024-02-23-20-31/trial-07-0010/0009` + +Invalid yaml configuration, similar to previous cases + +**Misoperation** + +48 - 60. `testrun-2024-02-23-20-31/trial-00-0005/0002`, `testrun-2024-02-23-20-31/trial-00-0004/0002`, `testrun-2024-02-23-20-31/trial-06-0012/0006`, `testrun-2024-02-23-20-31/trial-06-0013/0003`, `testrun-2024-02-23-20-31/trial-05-0006/0006`, `testrun-2024-02-23-20-31/trial-05-0007/0003`, `testrun-2024-02-23-20-31/trial-00-0002/0002`, `testrun-2024-02-23-20-31/trial-00-0001/0002`, `testrun-2024-02-23-20-31/trial-02-0004/0007`, `testrun-2024-02-23-20-31/trial-04-0008/0002`, `testrun-2024-02-23-20-31/trial-04-0007/0002`, `testrun-2024-02-23-20-31/trial-03-0009/0002`, `testrun-2024-02-23-20-31/trial-03-0010/0003` + +`No matching fields found for input` + +Any modifications to the status field is ignored by kubernetes. This will result in no change to the system state. So it is a **false** alarm. + +61 - 73. `testrun-2024-02-23-20-31/trial-00-0007/0003`, `testrun-2024-02-23-20-31/trial-01-0003/0003`, `testrun-2024-02-23-20-31/trial-08-0001/0007`, `testrun-2024-02-23-20-31/trial-08-0002/0002`, `testrun-2024-02-23-20-31/trial-02-0003/0002`, `testrun-2024-02-23-20-31/trial-02-0002/0004`, `testrun-2024-02-23-20-31/trial-04-0010/0004`, `testrun-2024-02-23-20-31/trial-08-0004/0008`, `testrun-2024-02-23-20-31/trial-08-0005/0002`, `testrun-2024-02-23-20-31/trial-04-0024/0002`, `testrun-2024-02-23-20-31/trial-04-0025/0003` + +Same as 48-60. **False** alarm. + +74 - 95. `testrun-2024-02-23-20-31/trial-08-0016/0001`, `testrun-2024-02-23-20-31/trial-07-0018/0001`, `testrun-2024-02-23-20-31/trial-01-0000/0002`, `testrun-2024-02-23-20-31/trial-03-0022/0002`, `testrun-2024-02-23-20-31/trial-03-0021/0002`, `testrun-2024-02-23-20-31/trial-03-0019/0002`, `testrun-2024-02-23-20-31/trial-03-0020/0002`, `testrun-2024-02-23-20-31/trial-03-0018/0002`, `testrun-2024-02-23-20-31/trial-08-0019/0002`, `testrun-2024-02-23-20-31/trial-08-0020/0002`, `testrun-2024-02-23-20-31/trial-08-0009/0005`, `testrun-2024-02-23-20-31/trial-08-0010/0003`, `testrun-2024-02-23-20-31/trial-02-0017/0002`, `testrun-2024-02-23-20-31/trial-02-0018/0003`, `testrun-2024-02-23-20-31/trial-01-0014/0003`, `testrun-2024-02-23-20-31/trial-01-0015/0003`, `testrun-2024-02-23-20-31/trial-05-0011/0003`, `testrun-2024-02-23-20-31/trial-05-0012/0003`, `testrun-2024-02-23-20-31/trial-00-0015/0005`, `testrun-2024-02-23-20-31/trial-00-0016/0001`, `testrun-2024-02-23-20-31/trial-01-0013/0003` + +Same as 48-60. **False** alarm. + +96. `testrun-2024-02-23-20-31/trial-00-0000/0008` + +Number of replicas are set to 1000, which is not allowed. This leads to an error since the operator does not check for it. + +**Misoperation** + diff --git a/data/kubeblocks-postgresql-operator/apps.kubeblocks.io_clusters.yaml b/data/kubeblocks-postgresql-operator/apps.kubeblocks.io_clusters.yaml new file mode 100644 index 0000000000..6ee0db5796 --- /dev/null +++ b/data/kubeblocks-postgresql-operator/apps.kubeblocks.io_clusters.yaml @@ -0,0 +1,2520 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.12.1 + labels: + app.kubernetes.io/name: kubeblocks + name: clusters.apps.kubeblocks.io +spec: + group: apps.kubeblocks.io + names: + categories: + - kubeblocks + - all + kind: Cluster + listKind: ClusterList + plural: clusters + singular: cluster + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: ClusterDefinition referenced by cluster. + jsonPath: .spec.clusterDefinitionRef + name: CLUSTER-DEFINITION + type: string + - description: Cluster Application Version. + jsonPath: .spec.clusterVersionRef + name: VERSION + type: string + - description: Cluster termination policy. + jsonPath: .spec.terminationPolicy + name: TERMINATION-POLICY + type: string + - description: Cluster Status. + jsonPath: .status.phase + name: STATUS + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: Cluster is the Schema for the clusters 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: + type: object + spec: + description: ClusterSpec defines the desired state of Cluster. + properties: + affinity: + description: affinity is a group of affinity scheduling rules. + properties: + nodeLabels: + additionalProperties: + type: string + description: nodeLabels describes that pods must be scheduled + to the nodes with the specified node labels. + type: object + podAntiAffinity: + default: Preferred + description: podAntiAffinity describes the anti-affinity level + of pods within a component. Preferred means try spread pods + by `TopologyKeys`. Required means must spread pods by `TopologyKeys`. + enum: + - Preferred + - Required + type: string + tenancy: + default: SharedNode + description: tenancy describes how pods are distributed across + node. SharedNode means multiple pods may share the same node. + DedicatedNode means each pod runs on their own dedicated node. + enum: + - SharedNode + - DedicatedNode + type: string + topologyKeys: + description: topologyKey is the key of node labels. Nodes that + have a label with this key and identical values are considered + to be in the same topology. It's used as the topology domain + for pod anti-affinity and pod spread constraint. Some well-known + label keys, such as "kubernetes.io/hostname" and "topology.kubernetes.io/zone" + are often used as TopologyKey, as well as any other custom label + key. + items: + type: string + type: array + x-kubernetes-list-type: set + type: object + availabilityPolicy: + description: availabilityPolicy describes the availability policy, + including zone, node, and none. + enum: + - zone + - node + - none + type: string + backup: + description: cluster backup configuration. + properties: + cronExpression: + description: the cron expression for schedule, the timezone is + in UTC. see https://en.wikipedia.org/wiki/Cron. + type: string + enabled: + default: false + description: enabled defines whether to enable automated backup. + type: boolean + method: + description: backup method name to use, that is defined in backupPolicy. + type: string + pitrEnabled: + default: false + description: pitrEnabled defines whether to enable point-in-time + recovery. + type: boolean + repoName: + description: repoName is the name of the backupRepo, if not set, + will use the default backupRepo. + type: string + retentionPeriod: + default: 7d + description: "retentionPeriod determines a duration up to which + the backup should be kept. controller will remove all backups + that are older than the RetentionPeriod. For example, RetentionPeriod + of `30d` will keep only the backups of last 30 days. Sample + duration format: - years: \t2y - months: \t6mo - days: \t\t30d + - hours: \t12h - minutes: \t30m You can also combine the above + durations. For example: 30d12h30m" + type: string + startingDeadlineMinutes: + description: startingDeadlineMinutes defines the deadline in minutes + for starting the backup job if it misses scheduled time for + any reason. + format: int64 + maximum: 1440 + minimum: 0 + type: integer + type: object + clusterDefinitionRef: + description: Cluster referencing ClusterDefinition name. This is an + immutable attribute. If ClusterDefRef is not specified, ComponentDef + must be specified for each Component in ComponentSpecs. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + x-kubernetes-validations: + - message: clusterDefinitionRef is immutable + rule: self == oldSelf + clusterVersionRef: + description: Cluster referencing ClusterVersion name. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + componentSpecs: + description: List of componentSpec which is used to define the components + that make up a cluster. ComponentSpecs and ShardingSpecs cannot + both be empty at the same time. + items: + description: ClusterComponentSpec defines the cluster component + spec. //(TODO) +kubebuilder:validation:XValidation:rule="!has(oldSelf.componentDefRef) + || has(self.componentDefRef)", message="componentDefRef is required + once set" //(TODO) +kubebuilder:validation:XValidation:rule="!has(oldSelf.componentDef) + || has(self.componentDef)", message="componentDef is required + once set" + properties: + affinity: + description: affinity describes affinities specified by users. + properties: + nodeLabels: + additionalProperties: + type: string + description: nodeLabels describes that pods must be scheduled + to the nodes with the specified node labels. + type: object + podAntiAffinity: + default: Preferred + description: podAntiAffinity describes the anti-affinity + level of pods within a component. Preferred means try + spread pods by `TopologyKeys`. Required means must spread + pods by `TopologyKeys`. + enum: + - Preferred + - Required + type: string + tenancy: + default: SharedNode + description: tenancy describes how pods are distributed + across node. SharedNode means multiple pods may share + the same node. DedicatedNode means each pod runs on their + own dedicated node. + enum: + - SharedNode + - DedicatedNode + type: string + topologyKeys: + description: topologyKey is the key of node labels. Nodes + that have a label with this key and identical values are + considered to be in the same topology. It's used as the + topology domain for pod anti-affinity and pod spread constraint. + Some well-known label keys, such as "kubernetes.io/hostname" + and "topology.kubernetes.io/zone" are often used as TopologyKey, + as well as any other custom label key. + items: + type: string + type: array + x-kubernetes-list-type: set + type: object + classDefRef: + description: classDefRef references the class defined in ComponentClassDefinition. + properties: + class: + description: Class refers to the name of the class that + is defined in the ComponentClassDefinition. + type: string + name: + description: Name refers to the name of the ComponentClassDefinition. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + required: + - class + type: object + componentDef: + description: componentDef references the name of the ComponentDefinition. + If both componentDefRef and componentDef are provided, the + componentDef will take precedence over componentDefRef. //(TODO) + +kubebuilder:validation:XValidation:rule="self == oldSelf",message="componentDef + is immutable" + maxLength: 22 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + componentDefRef: + description: componentDefRef references componentDef defined + in ClusterDefinition spec. Need to comply with IANA Service + Naming rule. //(TODO) +kubebuilder:validation:XValidation:rule="self + == oldSelf",message="componentDefRef is immutable" + maxLength: 22 + pattern: ^[a-z]([a-z0-9\-]*[a-z0-9])?$ + type: string + enabledLogs: + description: enabledLogs indicates which log file takes effect + in the database cluster. element is the log type which is + defined in cluster definition logConfig.name, and will set + relative variables about this log type in database kernel. + items: + type: string + type: array + x-kubernetes-list-type: set + instances: + description: Instances defines the list of instance to be deleted + priorly If the RsmTransformPolicy is specified as ToPod,the + list of instances will be used. + items: + type: string + type: array + issuer: + description: issuer defines provider context for TLS certs. + required when TLS enabled + properties: + name: + default: KubeBlocks + description: 'Name of issuer. Options supported: - KubeBlocks + - Certificates signed by KubeBlocks Operator. - UserProvided + - User provided own CA-signed certificates.' + enum: + - KubeBlocks + - UserProvided + type: string + secretRef: + description: secretRef. TLS certs Secret reference required + when from is UserProvided + properties: + ca: + description: CA cert key in Secret + type: string + cert: + description: Cert key in Secret + type: string + key: + description: Key of TLS private key in Secret + type: string + name: + description: Name of the Secret + type: string + required: + - ca + - cert + - key + - name + type: object + required: + - name + type: object + monitor: + default: false + description: monitor is a switch to enable monitoring and is + set as false by default. KubeBlocks provides an extension + mechanism to support component level monitoring, which will + scrape metrics auto or manually from servers in component + and export metrics to Time Series Database. + type: boolean + name: + description: name defines cluster's component name, this name + is also part of Service DNS name, so this name will comply + with IANA Service Naming rule. When ClusterComponentSpec is + referenced as a template, name is optional. Otherwise, it + is required. //(TODO) +kubebuilder:validation:XValidation:rule="self + == oldSelf",message="name is immutable" + maxLength: 22 + pattern: ^[a-z]([a-z0-9\-]*[a-z0-9])?$ + type: string + nodes: + description: Nodes defines the list of nodes that pods can schedule + If the RsmTransformPolicy is specified as ToPod,the list of + nodes will be used. If the list of nodes is empty, no specific + node will be assigned. However, if the list of node is filled, + all pods will be evenly scheduled across the nodes in the + list. + items: + description: "NodeName is a type that holds a api.Node's Name + identifier. Being a type captures intent and helps make + sure that the node name is not confused with similar concepts + (the hostname, the cloud provider id, the cloud provider + name etc) \n To clarify the various types: \n - Node.Name + is the Name field of the Node in the API. This should be + stored in a NodeName. Unfortunately, because Name is part + of ObjectMeta, we can't store it as a NodeName at the API + level. \n - Hostname is the hostname of the local machine + (from uname -n). However, some components allow the user + to pass in a --hostname-override flag, which will override + this in most places. In the absence of anything more meaningful, + kubelet will use Hostname as the Node.Name when it creates + the Node. \n * The cloudproviders have the own names: GCE + has InstanceName, AWS has InstanceId. \n For GCE, InstanceName + is the Name of an Instance object in the GCE API. On GCE, + Instance.Name becomes the Hostname, and thus it makes sense + also to use it as the Node.Name. But that is GCE specific, + and it is up to the cloudprovider how to do this mapping. + \n For AWS, the InstanceID is not yet suitable for use as + a Node.Name, so we actually use the PrivateDnsName for the + Node.Name. And this is _not_ always the same as the hostname: + if we are using a custom DHCP domain it won't be." + type: string + type: array + replicas: + default: 1 + description: Component replicas. + format: int32 + minimum: 0 + type: integer + resources: + description: Resources requests and limits of workload. + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It can only + be set for containers." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry + in pod.spec.resourceClaims of the Pod where this + field is used. It makes that resource available + inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + 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-resources-containers/' + 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. Requests + cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + x-kubernetes-preserve-unknown-fields: true + rsmTransformPolicy: + default: ToSts + description: 'RsmTransformPolicy defines the policy generate + sts using rsm. ToSts: rsm transforms to statefulSet ToPod: + rsm transforms to pods' + enum: + - ToPod + - ToSts + type: string + serviceAccountName: + description: serviceAccountName is the name of the ServiceAccount + that running component depends on. + type: string + serviceRefs: + description: 'serviceRefs define service references for the + current component. Based on the referenced services, they + can be categorized into two types: Service provided by external + sources: These services are provided by external sources and + are not managed by KubeBlocks. They can be Kubernetes-based + or non-Kubernetes services. For external services, you need + to provide an additional ServiceDescriptor object to establish + the service binding. Service provided by other KubeBlocks + clusters: These services are provided by other KubeBlocks + clusters. You can bind to these services by specifying the + name of the hosting cluster. Each type of service reference + requires specific configurations and bindings to establish + the connection and interaction with the respective services. + It should be noted that the ServiceRef has cluster-level semantic + consistency, meaning that within the same Cluster, service + references with the same ServiceRef.Name are considered to + be the same service. It is only allowed to bind to the same + Cluster or ServiceDescriptor.' + items: + properties: + cluster: + description: 'When referencing a service provided by other + KubeBlocks cluster, you need to provide the name of + the Cluster being referenced. By default, when other + KubeBlocks Cluster are referenced, the ClusterDefinition.spec.connectionCredential + secret corresponding to the referenced Cluster will + be used to bind to the current component. Currently, + if a KubeBlocks cluster is to be referenced, the connection + credential secret should include and correspond to the + following fields: endpoint, port, username, and password. + Under this referencing approach, the ServiceKind and + ServiceVersion of service reference declaration defined + in the ClusterDefinition will not be validated. If both + Cluster and ServiceDescriptor are specified, the Cluster + takes precedence.' + type: string + name: + description: name of the service reference declaration. + references the serviceRefDeclaration name defined in + clusterDefinition.componentDefs[*].serviceRefDeclarations[*].name + type: string + namespace: + description: namespace defines the namespace of the referenced + Cluster or the namespace of the referenced ServiceDescriptor + object. If not set, the referenced Cluster and ServiceDescriptor + will be searched in the namespace of the current cluster + by default. + type: string + serviceDescriptor: + description: serviceDescriptor defines the service descriptor + of the service provided by external sources. When referencing + a service provided by external sources, you need to + provide the ServiceDescriptor object name to establish + the service binding. And serviceDescriptor is the name + of the ServiceDescriptor object, furthermore, the ServiceDescriptor.spec.serviceKind + and ServiceDescriptor.spec.serviceVersion should match + clusterDefinition.componentDefs[*].serviceRefDeclarations[*].serviceRefDeclarationSpecs[*].serviceKind + and the regular expression defines in clusterDefinition.componentDefs[*].serviceRefDeclarations[*].serviceRefDeclarationSpecs[*].serviceVersion. + If both Cluster and ServiceDescriptor are specified, + the Cluster takes precedence. + type: string + required: + - name + type: object + type: array + services: + description: Services expose endpoints that can be accessed + by clients. + items: + properties: + annotations: + additionalProperties: + type: string + description: 'If ServiceType is LoadBalancer, cloud provider + related parameters can be put here More info: https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer.' + type: object + name: + description: Service name + maxLength: 15 + type: string + serviceType: + default: ClusterIP + description: 'serviceType determines how the Service is + exposed. Valid options are ClusterIP, NodePort, and + LoadBalancer. "ClusterIP" allocates a cluster-internal + IP address for load-balancing to endpoints. Endpoints + are determined by the selector or if that is not specified, + they are determined by manual construction of an Endpoints + object or EndpointSlice objects. If clusterIP is "None", + no virtual IP is allocated and the endpoints are published + as a set of endpoints rather than a virtual IP. "NodePort" + builds on ClusterIP and allocates a port on every node + which routes to the same endpoints as the clusterIP. + "LoadBalancer" builds on NodePort and creates an external + load-balancer (if supported in the current cloud) which + routes to the same endpoints as the clusterIP. More + info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types.' + enum: + - ClusterIP + - NodePort + - LoadBalancer + type: string + x-kubernetes-preserve-unknown-fields: true + required: + - name + type: object + type: array + switchPolicy: + description: switchPolicy defines the strategy for switchover + and failover when workloadType is Replication. + properties: + type: + default: Noop + description: 'clusterSwitchPolicy defines type of the switchPolicy + when workloadType is Replication. MaximumAvailability: + [WIP] when the primary is active, do switch if the synchronization + delay = 0 in the user-defined lagProbe data delay detection + logic, otherwise do not switch. The primary is down, switch + immediately. It will be available in future versions. + MaximumDataProtection: [WIP] when the primary is active, + do switch if synchronization delay = 0 in the user-defined + lagProbe data lag detection logic, otherwise do not switch. + If the primary is down, if it can be judged that the primary + and secondary data are consistent, then do the switch, + otherwise do not switch. It will be available in future + versions. Noop: KubeBlocks will not perform high-availability + switching on components. Users need to implement HA by + themselves or integrate open source HA solution.' + enum: + - Noop + type: string + type: object + tls: + description: Enables or disables TLS certs. + type: boolean + tolerations: + description: Component tolerations will override ClusterSpec.Tolerations + if specified. + items: + description: The pod this Toleration is attached to tolerates + any taint that matches the triple using + the matching operator . + properties: + effect: + description: Effect indicates the taint effect to match. + Empty means match all taint effects. When specified, + allowed values are NoSchedule, PreferNoSchedule and + NoExecute. + type: string + key: + description: Key is the taint key that the toleration + applies to. Empty means match all taint keys. If the + key is empty, operator must be Exists; this combination + means to match all values and all keys. + type: string + operator: + description: Operator represents a key's relationship + to the value. Valid operators are Exists and Equal. + Defaults to Equal. Exists is equivalent to wildcard + for value, so that a pod can tolerate all taints of + a particular category. + type: string + tolerationSeconds: + description: TolerationSeconds represents the period of + time the toleration (which must be of effect NoExecute, + otherwise this field is ignored) tolerates the taint. + By default, it is not set, which means tolerate the + taint forever (do not evict). Zero and negative values + will be treated as 0 (evict immediately) by the system. + format: int64 + type: integer + value: + description: Value is the taint value the toleration matches + to. If the operator is Exists, the value should be empty, + otherwise just a regular string. + type: string + type: object + type: array + x-kubernetes-preserve-unknown-fields: true + updateStrategy: + description: updateStrategy defines the update strategy for + the component. Not supported. + enum: + - Serial + - BestEffortParallel + - Parallel + type: string + userResourceRefs: + description: userResourceRefs defines the user-defined volumes. + properties: + configMapRefs: + description: configMapRefs defines the user-defined configmaps. + items: + properties: + asVolumeFrom: + description: asVolumeFrom defines the list of containers + where volumeMounts will be injected into. + items: + type: string + type: array + x-kubernetes-list-type: set + configMap: + description: configMap defines the configmap volume + source. + properties: + defaultMode: + description: 'defaultMode is optional: mode bits + used to set permissions on created files by + default. Must be an octal value between 0000 + and 0777 or a decimal value between 0 and 511. + YAML accepts both octal and decimal values, + JSON requires decimal values for mode bits. + 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 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: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode bits + used to set permissions on this file. + Must be an octal value between 0000 and + 0777 or a decimal value between 0 and + 511. YAML accepts both octal and decimal + values, JSON requires decimal values for + mode bits. 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: path is 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: optional specify whether the ConfigMap + or its keys must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + mountPoint: + description: mountPath is the path at which to mount + the volume. + maxLength: 256 + pattern: ^/[a-z]([a-z0-9\-]*[a-z0-9])?$ + type: string + name: + description: name is the name of the referenced the + Configmap/Secret object. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + subPath: + description: subPath is a relative file path within + the volume to mount. + type: string + required: + - configMap + - mountPoint + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + secretRefs: + description: secretRefs defines the user-defined secrets. + items: + properties: + asVolumeFrom: + description: asVolumeFrom defines the list of containers + where volumeMounts will be injected into. + items: + type: string + type: array + x-kubernetes-list-type: set + mountPoint: + description: mountPath is the path at which to mount + the volume. + maxLength: 256 + pattern: ^/[a-z]([a-z0-9\-]*[a-z0-9])?$ + type: string + name: + description: name is the name of the referenced the + Configmap/Secret object. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + secret: + description: secret defines the secret volume source. + properties: + defaultMode: + description: 'defaultMode is Optional: mode bits + used to set permissions on created files by + default. Must be an octal value between 0000 + and 0777 or a decimal value between 0 and 511. + YAML accepts both octal and decimal values, + JSON requires decimal values for mode bits. + 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 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: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode bits + used to set permissions on this file. + Must be an octal value between 0000 and + 0777 or a decimal value between 0 and + 511. YAML accepts both octal and decimal + values, JSON requires decimal values for + mode bits. 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: path is 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: optional field specify whether the + Secret or its keys must be defined + type: boolean + secretName: + description: 'secretName is the 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 + subPath: + description: subPath is a relative file path within + the volume to mount. + type: string + required: + - mountPoint + - name + - secret + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + type: object + volumeClaimTemplates: + description: volumeClaimTemplates information for statefulset.spec.volumeClaimTemplates. + items: + properties: + name: + description: Reference `ClusterDefinition.spec.componentDefs.containers.volumeMounts.name`. + type: string + spec: + description: spec defines the desired characteristics + of a volume requested by a pod author. + properties: + accessModes: + description: 'accessModes contains the desired access + modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1.' + items: + type: string + type: array + x-kubernetes-preserve-unknown-fields: true + resources: + description: 'resources represents the minimum resources + the volume should have. If RecoverVolumeExpansionFailure + feature is enabled users are allowed to specify + resource requirements that are lower than previous + value but must still be higher than capacity recorded + in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources.' + properties: + claims: + description: "Claims lists the names of resources, + defined in spec.resourceClaims, that are used + by this container. \n This is an alpha field + and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It + can only be set for containers." + items: + description: ResourceClaim references one entry + in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of + one entry in pod.spec.resourceClaims of + the Pod where this field is used. It makes + that resource available inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + 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-resources-containers/' + 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. Requests cannot + exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + x-kubernetes-preserve-unknown-fields: true + storageClassName: + description: 'storageClassName is the name of the + StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1.' + type: string + volumeMode: + description: volumeMode defines what type of volume + is required by the claim. + type: string + type: object + required: + - name + type: object + type: array + required: + - replicas + type: object + x-kubernetes-validations: + - message: either componentDefRef or componentDef should be provided + rule: has(self.componentDefRef) || has(self.componentDef) + maxItems: 128 + minItems: 1 + type: array + x-kubernetes-validations: + - message: duplicated component + rule: self.all(x, size(self.filter(c, c.name == x.name)) == 1) + - message: two kinds of definition API can not be used simultaneously + rule: self.all(x, size(self.filter(c, has(c.componentDef))) == 0) + || self.all(x, size(self.filter(c, has(c.componentDef))) == size(self)) + monitor: + description: monitor specifies the configuration of monitor + properties: + monitoringInterval: + anyOf: + - type: integer + - type: string + description: monitoringInterval specifies interval of monitoring, + no monitor if set to 0 + x-kubernetes-int-or-string: true + type: object + network: + description: network specifies the configuration of network + properties: + hostNetworkAccessible: + default: false + description: hostNetworkAccessible specifies whether host network + is accessible. It defaults to false + type: boolean + publiclyAccessible: + default: false + description: publiclyAccessible specifies whether it is publicly + accessible. It defaults to false + type: boolean + type: object + replicas: + description: replicas specifies the replicas of the first componentSpec, + if the replicas of the first componentSpec is specified, this value + will be ignored. + format: int32 + type: integer + resources: + description: resources specifies the resources of the first componentSpec, + if the resources of the first componentSpec is specified, this value + will be ignored. + properties: + cpu: + anyOf: + - type: integer + - type: string + description: 'cpu resource needed, more info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + memory: + anyOf: + - type: integer + - type: string + description: 'memory resource needed, more info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + 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 + services: + description: services defines the services to access a cluster. + items: + description: ClusterService defines the service of a cluster. + properties: + annotations: + additionalProperties: + type: string + description: 'If ServiceType is LoadBalancer, cloud provider + related parameters can be put here More info: https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer.' + type: object + componentSelector: + description: ComponentSelector extends the ServiceSpec.Selector + by allowing you to specify a component as selectors for the + service. ComponentSelector and ShardingSelector cannot be + set at the same time. + type: string + name: + description: Name defines the name of the service. otherwise, + it indicates the name of the service. Others can refer to + this service by its name. (e.g., connection credential) Cannot + be updated. + type: string + roleSelector: + description: RoleSelector extends the ServiceSpec.Selector by + allowing you to specify defined role as selector for the service. + if GeneratePodOrdinalService sets to true, RoleSelector will + be ignored. + type: string + serviceName: + description: 'ServiceName defines the name of the underlying + service object. If not specified, the default service name + with different patterns will be used: - : for + cluster-level services - -: + for component-level services Only one default service name + is allowed. Cannot be updated.' + type: string + shardingSelector: + description: ShardingSelector extends the ServiceSpec.Selector + by allowing you to specify a sharding name defined in Cluster.Spec.ShardingSpecs[x].Name + as selectors for the service. ShardingSelector and ComponentSelector + cannot be set at the same time. + type: string + spec: + description: Spec defines the behavior of a service. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + properties: + allocateLoadBalancerNodePorts: + description: allocateLoadBalancerNodePorts defines if NodePorts + will be automatically allocated for services with type + LoadBalancer. Default is "true". It may be set to "false" + if the cluster load-balancer does not rely on NodePorts. If + the caller requests specific NodePorts (by specifying + a value), those requests will be respected, regardless + of this field. This field may only be set for services + with type LoadBalancer and will be cleared if the type + is changed to any other type. + type: boolean + clusterIP: + description: 'clusterIP is the IP address of the service + and is usually assigned randomly. If an address is specified + manually, is in-range (as per system configuration), and + is not in use, it will be allocated to the service; otherwise + creation of the service will fail. This field may not + be changed through updates unless the type field is also + being changed to ExternalName (which requires this field + to be blank) or the type field is being changed from ExternalName + (in which case this field may optionally be specified, + as describe above). Valid values are "None", empty string + (""), or a valid IP address. Setting this to "None" makes + a "headless service" (no virtual IP), which is useful + when direct endpoint connections are preferred and proxying + is not required. Only applies to types ClusterIP, NodePort, + and LoadBalancer. If this field is specified when creating + a Service of type ExternalName, creation will fail. This + field will be wiped when updating a Service to type ExternalName. + More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies' + type: string + clusterIPs: + description: "ClusterIPs is a list of IP addresses assigned + to this service, and are usually assigned randomly. If + an address is specified manually, is in-range (as per + system configuration), and is not in use, it will be allocated + to the service; otherwise creation of the service will + fail. This field may not be changed through updates unless + the type field is also being changed to ExternalName (which + requires this field to be empty) or the type field is + being changed from ExternalName (in which case this field + may optionally be specified, as describe above). Valid + values are \"None\", empty string (\"\"), or a valid IP + address. Setting this to \"None\" makes a \"headless + service\" (no virtual IP), which is useful when direct + endpoint connections are preferred and proxying is not + required. Only applies to types ClusterIP, NodePort, + and LoadBalancer. If this field is specified when creating + a Service of type ExternalName, creation will fail. This + field will be wiped when updating a Service to type ExternalName. + \ If this field is not specified, it will be initialized + from the clusterIP field. If this field is specified, + clients must ensure that clusterIPs[0] and clusterIP have + the same value. \n This field may hold a maximum of two + entries (dual-stack IPs, in either order). These IPs must + correspond to the values of the ipFamilies field. Both + clusterIPs and ipFamilies are governed by the ipFamilyPolicy + field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies" + items: + type: string + type: array + x-kubernetes-list-type: atomic + externalIPs: + description: externalIPs is a list of IP addresses for which + nodes in the cluster will also accept traffic for this + service. These IPs are not managed by Kubernetes. The + user is responsible for ensuring that traffic arrives + at a node with this IP. A common example is external + load-balancers that are not part of the Kubernetes system. + items: + type: string + type: array + externalName: + description: externalName is the external reference that + discovery mechanisms will return as an alias for this + service (e.g. a DNS CNAME record). No proxying will be + involved. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) + and requires `type` to be "ExternalName". + type: string + externalTrafficPolicy: + description: externalTrafficPolicy describes how nodes distribute + service traffic they receive on one of the Service's "externally-facing" + addresses (NodePorts, ExternalIPs, and LoadBalancer IPs). + If set to "Local", the proxy will configure the service + in a way that assumes that external load balancers will + take care of balancing the service traffic between nodes, + and so each node will deliver traffic only to the node-local + endpoints of the service, without masquerading the client + source IP. (Traffic mistakenly sent to a node with no + endpoints will be dropped.) The default value, "Cluster", + uses the standard behavior of routing to all endpoints + evenly (possibly modified by topology and other features). + Note that traffic sent to an External IP or LoadBalancer + IP from within the cluster will always get "Cluster" semantics, + but clients sending to a NodePort from within the cluster + may need to take traffic policy into account when picking + a node. + type: string + healthCheckNodePort: + description: healthCheckNodePort specifies the healthcheck + nodePort for the service. This only applies when type + is set to LoadBalancer and externalTrafficPolicy is set + to Local. If a value is specified, is in-range, and is + not in use, it will be used. If not specified, a value + will be automatically allocated. External systems (e.g. + load-balancers) can use this port to determine if a given + node holds endpoints for this service or not. If this + field is specified when creating a Service which does + not need it, creation will fail. This field will be wiped + when updating a Service to no longer need it (e.g. changing + type). This field cannot be updated once set. + format: int32 + type: integer + internalTrafficPolicy: + description: InternalTrafficPolicy describes how nodes distribute + service traffic they receive on the ClusterIP. If set + to "Local", the proxy will assume that pods only want + to talk to endpoints of the service on the same node as + the pod, dropping the traffic if there are no local endpoints. + The default value, "Cluster", uses the standard behavior + of routing to all endpoints evenly (possibly modified + by topology and other features). + type: string + ipFamilies: + description: "IPFamilies is a list of IP families (e.g. + IPv4, IPv6) assigned to this service. This field is usually + assigned automatically based on cluster configuration + and the ipFamilyPolicy field. If this field is specified + manually, the requested family is available in the cluster, + and ipFamilyPolicy allows it, it will be used; otherwise + creation of the service will fail. This field is conditionally + mutable: it allows for adding or removing a secondary + IP family, but it does not allow changing the primary + IP family of the Service. Valid values are \"IPv4\" and + \"IPv6\". This field only applies to Services of types + ClusterIP, NodePort, and LoadBalancer, and does apply + to \"headless\" services. This field will be wiped when + updating a Service to type ExternalName. \n This field + may hold a maximum of two entries (dual-stack families, + in either order). These families must correspond to the + values of the clusterIPs field, if specified. Both clusterIPs + and ipFamilies are governed by the ipFamilyPolicy field." + items: + description: IPFamily represents the IP Family (IPv4 or + IPv6). This type is used to express the family of an + IP expressed by a type (e.g. service.spec.ipFamilies). + type: string + type: array + x-kubernetes-list-type: atomic + ipFamilyPolicy: + description: IPFamilyPolicy represents the dual-stack-ness + requested or required by this Service. If there is no + value provided, then this field will be set to SingleStack. + Services can be "SingleStack" (a single IP family), "PreferDualStack" + (two IP families on dual-stack configured clusters or + a single IP family on single-stack clusters), or "RequireDualStack" + (two IP families on dual-stack configured clusters, otherwise + fail). The ipFamilies and clusterIPs fields depend on + the value of this field. This field will be wiped when + updating a service to type ExternalName. + type: string + loadBalancerClass: + description: loadBalancerClass is the class of the load + balancer implementation this Service belongs to. If specified, + the value of this field must be a label-style identifier, + with an optional prefix, e.g. "internal-vip" or "example.com/internal-vip". + Unprefixed names are reserved for end-users. This field + can only be set when the Service type is 'LoadBalancer'. + If not set, the default load balancer implementation is + used, today this is typically done through the cloud provider + integration, but should apply for any default implementation. + If set, it is assumed that a load balancer implementation + is watching for Services with a matching class. Any default + load balancer implementation (e.g. cloud providers) should + ignore Services that set this field. This field can only + be set when creating or updating a Service to type 'LoadBalancer'. + Once set, it can not be changed. This field will be wiped + when a service is updated to a non 'LoadBalancer' type. + type: string + loadBalancerIP: + description: 'Only applies to Service Type: LoadBalancer. + This feature depends on whether the underlying cloud-provider + supports specifying the loadBalancerIP when a load balancer + is created. This field will be ignored if the cloud-provider + does not support the feature. Deprecated: This field was + under-specified and its meaning varies across implementations. + Using it is non-portable and it may not support dual-stack. + Users are encouraged to use implementation-specific annotations + when available.' + type: string + loadBalancerSourceRanges: + description: 'If specified and supported by the platform, + this will restrict traffic through the cloud-provider + load-balancer will be restricted to the specified client + IPs. This field will be ignored if the cloud-provider + does not support the feature." More info: https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/' + items: + type: string + type: array + ports: + description: 'The list of ports that are exposed by this + service. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies' + items: + description: ServicePort contains information on service's + port. + properties: + appProtocol: + description: "The application protocol for this port. + This is used as a hint for implementations to offer + richer behavior for protocols that they understand. + This field follows standard Kubernetes label syntax. + Valid values are either: \n * Un-prefixed protocol + names - reserved for IANA standard service names + (as per RFC-6335 and https://www.iana.org/assignments/service-names). + \n * Kubernetes-defined prefixed names: * 'kubernetes.io/h2c' + - HTTP/2 over cleartext as described in https://www.rfc-editor.org/rfc/rfc7540 + * 'kubernetes.io/ws' - WebSocket over cleartext + as described in https://www.rfc-editor.org/rfc/rfc6455 + * 'kubernetes.io/wss' - WebSocket over TLS as described + in https://www.rfc-editor.org/rfc/rfc6455 \n * Other + protocols should use implementation-defined prefixed + names such as mycompany.com/my-custom-protocol." + type: string + name: + description: The name of this port within the service. + This must be a DNS_LABEL. All ports within a ServiceSpec + must have unique names. When considering the endpoints + for a Service, this must match the 'name' field + in the EndpointPort. Optional if only one ServicePort + is defined on this service. + type: string + nodePort: + description: 'The port on each node on which this + service is exposed when type is NodePort or LoadBalancer. Usually + assigned by the system. If a value is specified, + in-range, and not in use it will be used, otherwise + the operation will fail. If not specified, a port + will be allocated if this Service requires one. If + this field is specified when creating a Service + which does not need it, creation will fail. This + field will be wiped when updating a Service to no + longer need it (e.g. changing type from NodePort + to ClusterIP). More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport' + format: int32 + type: integer + port: + description: The port that will be exposed by this + service. + format: int32 + type: integer + protocol: + default: TCP + description: The IP protocol for this port. Supports + "TCP", "UDP", and "SCTP". Default is TCP. + type: string + targetPort: + anyOf: + - type: integer + - type: string + description: 'Number or name of the port to access + on the pods targeted by the service. Number must + be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + If this is a string, it will be looked up as a named + port in the target Pod''s container ports. If this + is not specified, the value of the ''port'' field + is used (an identity map). This field is ignored + for services with clusterIP=None, and should be + omitted or set equal to the ''port'' field. More + info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service' + x-kubernetes-int-or-string: true + required: + - port + type: object + type: array + x-kubernetes-list-map-keys: + - port + - protocol + x-kubernetes-list-type: map + publishNotReadyAddresses: + description: publishNotReadyAddresses indicates that any + agent which deals with endpoints for this Service should + disregard any indications of ready/not-ready. The primary + use case for setting this field is for a StatefulSet's + Headless Service to propagate SRV DNS records for its + Pods for the purpose of peer discovery. The Kubernetes + controllers that generate Endpoints and EndpointSlice + resources for Services interpret this to mean that all + endpoints are considered "ready" even if the Pods themselves + are not. Agents which consume only Kubernetes generated + endpoints through the Endpoints or EndpointSlice resources + can safely assume this behavior. + type: boolean + selector: + additionalProperties: + type: string + description: 'Route service traffic to pods with label keys + and values matching this selector. If empty or not present, + the service is assumed to have an external process managing + its endpoints, which Kubernetes will not modify. Only + applies to types ClusterIP, NodePort, and LoadBalancer. + Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/' + type: object + x-kubernetes-map-type: atomic + sessionAffinity: + description: 'Supports "ClientIP" and "None". Used to maintain + session affinity. Enable client IP based session affinity. + Must be ClientIP or None. Defaults to None. More info: + https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies' + type: string + sessionAffinityConfig: + description: sessionAffinityConfig contains the configurations + of session affinity. + properties: + clientIP: + description: clientIP contains the configurations of + Client IP based session affinity. + properties: + timeoutSeconds: + description: timeoutSeconds specifies the seconds + of ClientIP type session sticky time. The value + must be >0 && <=86400(for 1 day) if ServiceAffinity + == "ClientIP". Default value is 10800(for 3 hours). + format: int32 + type: integer + type: object + type: object + type: + description: 'type determines how the Service is exposed. + Defaults to ClusterIP. Valid options are ExternalName, + ClusterIP, NodePort, and LoadBalancer. "ClusterIP" allocates + a cluster-internal IP address for load-balancing to endpoints. + Endpoints are determined by the selector or if that is + not specified, by manual construction of an Endpoints + object or EndpointSlice objects. If clusterIP is "None", + no virtual IP is allocated and the endpoints are published + as a set of endpoints rather than a virtual IP. "NodePort" + builds on ClusterIP and allocates a port on every node + which routes to the same endpoints as the clusterIP. "LoadBalancer" + builds on NodePort and creates an external load-balancer + (if supported in the current cloud) which routes to the + same endpoints as the clusterIP. "ExternalName" aliases + this service to the specified externalName. Several other + fields do not apply to ExternalName services. More info: + https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types' + type: string + type: object + required: + - name + type: object + type: array + x-kubernetes-preserve-unknown-fields: true + shardingSpecs: + description: List of ShardingSpec which is used to define components + with a sharding topology structure that make up a cluster. ShardingSpecs + and ComponentSpecs cannot both be empty at the same time. + items: + description: ShardingSpec defines the sharding spec. + properties: + name: + description: name defines sharding name, this name is also part + of Service DNS name, so this name will comply with IANA Service + Naming rule. The name is also used to generate the name of + the underlying components with the naming pattern -. + At the same time, the name of component template defined in + ShardingSpec.Template.Name will be ignored. + maxLength: 15 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + x-kubernetes-validations: + - message: name is immutable + rule: self == oldSelf + shards: + description: 'shards indicates the number of component, and + these components have the same specifications and definitions. + It should be noted that the number of replicas for each component + should be defined by template.replicas. Moreover, the logical + relationship between these components should be maintained + by the components themselves, KubeBlocks only provides the + following capabilities for managing the lifecycle of sharding: + 1. When the number of shards increases, the postProvision + Action defined in the ComponentDefinition will be executed + if the conditions are met. 2. When the number of shards decreases, + the preTerminate Action defined in the ComponentDefinition + will be executed if the conditions are met. Additionally, + the resources and data associated with the corresponding Component + will be deleted as well.' + format: int32 + maximum: 2048 + minimum: 0 + type: integer + template: + description: template defines the component template. A ShardingSpec + generates a set of components (also called shards) based on + the component template, and this group of components or shards + have the same specifications and definitions. + properties: + affinity: + description: affinity describes affinities specified by + users. + properties: + nodeLabels: + additionalProperties: + type: string + description: nodeLabels describes that pods must be + scheduled to the nodes with the specified node labels. + type: object + podAntiAffinity: + default: Preferred + description: podAntiAffinity describes the anti-affinity + level of pods within a component. Preferred means + try spread pods by `TopologyKeys`. Required means + must spread pods by `TopologyKeys`. + enum: + - Preferred + - Required + type: string + tenancy: + default: SharedNode + description: tenancy describes how pods are distributed + across node. SharedNode means multiple pods may share + the same node. DedicatedNode means each pod runs on + their own dedicated node. + enum: + - SharedNode + - DedicatedNode + type: string + topologyKeys: + description: topologyKey is the key of node labels. + Nodes that have a label with this key and identical + values are considered to be in the same topology. + It's used as the topology domain for pod anti-affinity + and pod spread constraint. Some well-known label keys, + such as "kubernetes.io/hostname" and "topology.kubernetes.io/zone" + are often used as TopologyKey, as well as any other + custom label key. + items: + type: string + type: array + x-kubernetes-list-type: set + type: object + classDefRef: + description: classDefRef references the class defined in + ComponentClassDefinition. + properties: + class: + description: Class refers to the name of the class that + is defined in the ComponentClassDefinition. + type: string + name: + description: Name refers to the name of the ComponentClassDefinition. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + required: + - class + type: object + componentDef: + description: componentDef references the name of the ComponentDefinition. + If both componentDefRef and componentDef are provided, + the componentDef will take precedence over componentDefRef. + //(TODO) +kubebuilder:validation:XValidation:rule="self + == oldSelf",message="componentDef is immutable" + maxLength: 22 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + componentDefRef: + description: componentDefRef references componentDef defined + in ClusterDefinition spec. Need to comply with IANA Service + Naming rule. //(TODO) +kubebuilder:validation:XValidation:rule="self + == oldSelf",message="componentDefRef is immutable" + maxLength: 22 + pattern: ^[a-z]([a-z0-9\-]*[a-z0-9])?$ + type: string + enabledLogs: + description: enabledLogs indicates which log file takes + effect in the database cluster. element is the log type + which is defined in cluster definition logConfig.name, + and will set relative variables about this log type in + database kernel. + items: + type: string + type: array + x-kubernetes-list-type: set + instances: + description: Instances defines the list of instance to be + deleted priorly If the RsmTransformPolicy is specified + as ToPod,the list of instances will be used. + items: + type: string + type: array + issuer: + description: issuer defines provider context for TLS certs. + required when TLS enabled + properties: + name: + default: KubeBlocks + description: 'Name of issuer. Options supported: - KubeBlocks + - Certificates signed by KubeBlocks Operator. - UserProvided + - User provided own CA-signed certificates.' + enum: + - KubeBlocks + - UserProvided + type: string + secretRef: + description: secretRef. TLS certs Secret reference required + when from is UserProvided + properties: + ca: + description: CA cert key in Secret + type: string + cert: + description: Cert key in Secret + type: string + key: + description: Key of TLS private key in Secret + type: string + name: + description: Name of the Secret + type: string + required: + - ca + - cert + - key + - name + type: object + required: + - name + type: object + monitor: + default: false + description: monitor is a switch to enable monitoring and + is set as false by default. KubeBlocks provides an extension + mechanism to support component level monitoring, which + will scrape metrics auto or manually from servers in component + and export metrics to Time Series Database. + type: boolean + name: + description: name defines cluster's component name, this + name is also part of Service DNS name, so this name will + comply with IANA Service Naming rule. When ClusterComponentSpec + is referenced as a template, name is optional. Otherwise, + it is required. //(TODO) +kubebuilder:validation:XValidation:rule="self + == oldSelf",message="name is immutable" + maxLength: 22 + pattern: ^[a-z]([a-z0-9\-]*[a-z0-9])?$ + type: string + nodes: + description: Nodes defines the list of nodes that pods can + schedule If the RsmTransformPolicy is specified as ToPod,the + list of nodes will be used. If the list of nodes is empty, + no specific node will be assigned. However, if the list + of node is filled, all pods will be evenly scheduled across + the nodes in the list. + items: + description: "NodeName is a type that holds a api.Node's + Name identifier. Being a type captures intent and helps + make sure that the node name is not confused with similar + concepts (the hostname, the cloud provider id, the cloud + provider name etc) \n To clarify the various types: + \n - Node.Name is the Name field of the Node in the + API. This should be stored in a NodeName. Unfortunately, + because Name is part of ObjectMeta, we can't store it + as a NodeName at the API level. \n - Hostname is the + hostname of the local machine (from uname -n). However, + some components allow the user to pass in a --hostname-override + flag, which will override this in most places. In the + absence of anything more meaningful, kubelet will use + Hostname as the Node.Name when it creates the Node. + \n * The cloudproviders have the own names: GCE has + InstanceName, AWS has InstanceId. \n For GCE, InstanceName + is the Name of an Instance object in the GCE API. On + GCE, Instance.Name becomes the Hostname, and thus it + makes sense also to use it as the Node.Name. But that + is GCE specific, and it is up to the cloudprovider how + to do this mapping. \n For AWS, the InstanceID is not + yet suitable for use as a Node.Name, so we actually + use the PrivateDnsName for the Node.Name. And this + is _not_ always the same as the hostname: if we are + using a custom DHCP domain it won't be." + type: string + type: array + replicas: + default: 1 + description: Component replicas. + format: int32 + minimum: 0 + type: integer + resources: + description: Resources requests and limits of workload. + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the + DynamicResourceAllocation feature gate. \n This field + is immutable. It can only be set for containers." + items: + description: ResourceClaim references one entry in + PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry + in pod.spec.resourceClaims of the Pod where + this field is used. It makes that resource available + inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + 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-resources-containers/' + 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. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + x-kubernetes-preserve-unknown-fields: true + rsmTransformPolicy: + default: ToSts + description: 'RsmTransformPolicy defines the policy generate + sts using rsm. ToSts: rsm transforms to statefulSet ToPod: + rsm transforms to pods' + enum: + - ToPod + - ToSts + type: string + serviceAccountName: + description: serviceAccountName is the name of the ServiceAccount + that running component depends on. + type: string + serviceRefs: + description: 'serviceRefs define service references for + the current component. Based on the referenced services, + they can be categorized into two types: Service provided + by external sources: These services are provided by external + sources and are not managed by KubeBlocks. They can be + Kubernetes-based or non-Kubernetes services. For external + services, you need to provide an additional ServiceDescriptor + object to establish the service binding. Service provided + by other KubeBlocks clusters: These services are provided + by other KubeBlocks clusters. You can bind to these services + by specifying the name of the hosting cluster. Each type + of service reference requires specific configurations + and bindings to establish the connection and interaction + with the respective services. It should be noted that + the ServiceRef has cluster-level semantic consistency, + meaning that within the same Cluster, service references + with the same ServiceRef.Name are considered to be the + same service. It is only allowed to bind to the same Cluster + or ServiceDescriptor.' + items: + properties: + cluster: + description: 'When referencing a service provided + by other KubeBlocks cluster, you need to provide + the name of the Cluster being referenced. By default, + when other KubeBlocks Cluster are referenced, the + ClusterDefinition.spec.connectionCredential secret + corresponding to the referenced Cluster will be + used to bind to the current component. Currently, + if a KubeBlocks cluster is to be referenced, the + connection credential secret should include and + correspond to the following fields: endpoint, port, + username, and password. Under this referencing approach, + the ServiceKind and ServiceVersion of service reference + declaration defined in the ClusterDefinition will + not be validated. If both Cluster and ServiceDescriptor + are specified, the Cluster takes precedence.' + type: string + name: + description: name of the service reference declaration. + references the serviceRefDeclaration name defined + in clusterDefinition.componentDefs[*].serviceRefDeclarations[*].name + type: string + namespace: + description: namespace defines the namespace of the + referenced Cluster or the namespace of the referenced + ServiceDescriptor object. If not set, the referenced + Cluster and ServiceDescriptor will be searched in + the namespace of the current cluster by default. + type: string + serviceDescriptor: + description: serviceDescriptor defines the service + descriptor of the service provided by external sources. + When referencing a service provided by external + sources, you need to provide the ServiceDescriptor + object name to establish the service binding. And + serviceDescriptor is the name of the ServiceDescriptor + object, furthermore, the ServiceDescriptor.spec.serviceKind + and ServiceDescriptor.spec.serviceVersion should + match clusterDefinition.componentDefs[*].serviceRefDeclarations[*].serviceRefDeclarationSpecs[*].serviceKind + and the regular expression defines in clusterDefinition.componentDefs[*].serviceRefDeclarations[*].serviceRefDeclarationSpecs[*].serviceVersion. + If both Cluster and ServiceDescriptor are specified, + the Cluster takes precedence. + type: string + required: + - name + type: object + type: array + services: + description: Services expose endpoints that can be accessed + by clients. + items: + properties: + annotations: + additionalProperties: + type: string + description: 'If ServiceType is LoadBalancer, cloud + provider related parameters can be put here More + info: https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer.' + type: object + name: + description: Service name + maxLength: 15 + type: string + serviceType: + default: ClusterIP + description: 'serviceType determines how the Service + is exposed. Valid options are ClusterIP, NodePort, + and LoadBalancer. "ClusterIP" allocates a cluster-internal + IP address for load-balancing to endpoints. Endpoints + are determined by the selector or if that is not + specified, they are determined by manual construction + of an Endpoints object or EndpointSlice objects. + If clusterIP is "None", no virtual IP is allocated + and the endpoints are published as a set of endpoints + rather than a virtual IP. "NodePort" builds on ClusterIP + and allocates a port on every node which routes + to the same endpoints as the clusterIP. "LoadBalancer" + builds on NodePort and creates an external load-balancer + (if supported in the current cloud) which routes + to the same endpoints as the clusterIP. More info: + https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types.' + enum: + - ClusterIP + - NodePort + - LoadBalancer + type: string + x-kubernetes-preserve-unknown-fields: true + required: + - name + type: object + type: array + switchPolicy: + description: switchPolicy defines the strategy for switchover + and failover when workloadType is Replication. + properties: + type: + default: Noop + description: 'clusterSwitchPolicy defines type of the + switchPolicy when workloadType is Replication. MaximumAvailability: + [WIP] when the primary is active, do switch if the + synchronization delay = 0 in the user-defined lagProbe + data delay detection logic, otherwise do not switch. + The primary is down, switch immediately. It will be + available in future versions. MaximumDataProtection: + [WIP] when the primary is active, do switch if synchronization + delay = 0 in the user-defined lagProbe data lag detection + logic, otherwise do not switch. If the primary is + down, if it can be judged that the primary and secondary + data are consistent, then do the switch, otherwise + do not switch. It will be available in future versions. + Noop: KubeBlocks will not perform high-availability + switching on components. Users need to implement HA + by themselves or integrate open source HA solution.' + enum: + - Noop + type: string + type: object + tls: + description: Enables or disables TLS certs. + type: boolean + tolerations: + description: Component tolerations will override ClusterSpec.Tolerations + if specified. + items: + description: The pod this Toleration is attached to tolerates + any taint that matches the triple + using the matching operator . + properties: + effect: + description: Effect indicates the taint effect to + match. Empty means match all taint effects. When + specified, allowed values are NoSchedule, PreferNoSchedule + and NoExecute. + type: string + key: + description: Key is the taint key that the toleration + applies to. Empty means match all taint keys. If + the key is empty, operator must be Exists; this + combination means to match all values and all keys. + type: string + operator: + description: Operator represents a key's relationship + to the value. Valid operators are Exists and Equal. + Defaults to Equal. Exists is equivalent to wildcard + for value, so that a pod can tolerate all taints + of a particular category. + type: string + tolerationSeconds: + description: TolerationSeconds represents the period + of time the toleration (which must be of effect + NoExecute, otherwise this field is ignored) tolerates + the taint. By default, it is not set, which means + tolerate the taint forever (do not evict). Zero + and negative values will be treated as 0 (evict + immediately) by the system. + format: int64 + type: integer + value: + description: Value is the taint value the toleration + matches to. If the operator is Exists, the value + should be empty, otherwise just a regular string. + type: string + type: object + type: array + x-kubernetes-preserve-unknown-fields: true + updateStrategy: + description: updateStrategy defines the update strategy + for the component. Not supported. + enum: + - Serial + - BestEffortParallel + - Parallel + type: string + userResourceRefs: + description: userResourceRefs defines the user-defined volumes. + properties: + configMapRefs: + description: configMapRefs defines the user-defined + configmaps. + items: + properties: + asVolumeFrom: + description: asVolumeFrom defines the list of + containers where volumeMounts will be injected + into. + items: + type: string + type: array + x-kubernetes-list-type: set + configMap: + description: configMap defines the configmap volume + source. + properties: + defaultMode: + description: 'defaultMode is optional: mode + bits used to set permissions on created + files by default. Must be an octal value + between 0000 and 0777 or a decimal value + between 0 and 511. YAML accepts both octal + and decimal values, JSON requires decimal + values for mode bits. 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 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: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode + bits used to set permissions on this + file. Must be an octal value between + 0000 and 0777 or a decimal value between + 0 and 511. YAML accepts both octal + and decimal values, JSON requires + decimal values for mode bits. 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: path is 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: optional specify whether the + ConfigMap or its keys must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + mountPoint: + description: mountPath is the path at which to + mount the volume. + maxLength: 256 + pattern: ^/[a-z]([a-z0-9\-]*[a-z0-9])?$ + type: string + name: + description: name is the name of the referenced + the Configmap/Secret object. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + subPath: + description: subPath is a relative file path within + the volume to mount. + type: string + required: + - configMap + - mountPoint + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + secretRefs: + description: secretRefs defines the user-defined secrets. + items: + properties: + asVolumeFrom: + description: asVolumeFrom defines the list of + containers where volumeMounts will be injected + into. + items: + type: string + type: array + x-kubernetes-list-type: set + mountPoint: + description: mountPath is the path at which to + mount the volume. + maxLength: 256 + pattern: ^/[a-z]([a-z0-9\-]*[a-z0-9])?$ + type: string + name: + description: name is the name of the referenced + the Configmap/Secret object. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + secret: + description: secret defines the secret volume + source. + properties: + defaultMode: + description: 'defaultMode is Optional: mode + bits used to set permissions on created + files by default. Must be an octal value + between 0000 and 0777 or a decimal value + between 0 and 511. YAML accepts both octal + and decimal values, JSON requires decimal + values for mode bits. 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 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: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode + bits used to set permissions on this + file. Must be an octal value between + 0000 and 0777 or a decimal value between + 0 and 511. YAML accepts both octal + and decimal values, JSON requires + decimal values for mode bits. 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: path is 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: optional field specify whether + the Secret or its keys must be defined + type: boolean + secretName: + description: 'secretName is the 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 + subPath: + description: subPath is a relative file path within + the volume to mount. + type: string + required: + - mountPoint + - name + - secret + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + type: object + volumeClaimTemplates: + description: volumeClaimTemplates information for statefulset.spec.volumeClaimTemplates. + items: + properties: + name: + description: Reference `ClusterDefinition.spec.componentDefs.containers.volumeMounts.name`. + type: string + spec: + description: spec defines the desired characteristics + of a volume requested by a pod author. + properties: + accessModes: + description: 'accessModes contains the desired + access modes the volume should have. More info: + https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1.' + items: + type: string + type: array + x-kubernetes-preserve-unknown-fields: true + resources: + description: 'resources represents the minimum + resources the volume should have. If RecoverVolumeExpansionFailure + feature is enabled users are allowed to specify + resource requirements that are lower than previous + value but must still be higher than capacity + recorded in the status field of the claim. More + info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources.' + properties: + claims: + description: "Claims lists the names of resources, + defined in spec.resourceClaims, that are + used by this container. \n This is an alpha + field and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. + It can only be set for containers." + items: + description: ResourceClaim references one + entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name + of one entry in pod.spec.resourceClaims + of the Pod where this field is used. + It makes that resource available inside + a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + 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-resources-containers/' + 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. Requests cannot exceed Limits. More + info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + x-kubernetes-preserve-unknown-fields: true + storageClassName: + description: 'storageClassName is the name of + the StorageClass required by the claim. More + info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1.' + type: string + volumeMode: + description: volumeMode defines what type of volume + is required by the claim. + type: string + type: object + required: + - name + type: object + type: array + required: + - replicas + type: object + x-kubernetes-validations: + - message: either componentDefRef or componentDef should be + provided + rule: has(self.componentDefRef) || has(self.componentDef) + required: + - name + - template + type: object + maxItems: 128 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + storage: + description: storage specifies the storage of the first componentSpec, + if the storage of the first componentSpec is specified, this value + will be ignored. + properties: + size: + anyOf: + - type: integer + - type: string + description: 'storage size needed, more info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + 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 + tenancy: + description: tenancy describes how pods are distributed across node. + SharedNode means multiple pods may share the same node. DedicatedNode + means each pod runs on their own dedicated node. + enum: + - SharedNode + - DedicatedNode + type: string + terminationPolicy: + description: Cluster termination policy. Valid values are DoNotTerminate, + Halt, Delete, WipeOut. DoNotTerminate will block delete operation. + Halt will delete workload resources such as statefulset, deployment + workloads but keep PVCs. Delete is based on Halt and deletes PVCs. + WipeOut is based on Delete and wipe out all volume snapshots and + snapshot data from backup storage location. + enum: + - DoNotTerminate + - Halt + - Delete + - WipeOut + type: string + tolerations: + description: tolerations are attached to tolerate any taint that matches + the triple `key,value,effect` using the matching operator `operator`. + items: + description: The pod this Toleration is attached to tolerates any + taint that matches the triple using the matching + operator . + properties: + effect: + description: Effect indicates the taint effect to match. Empty + means match all taint effects. When specified, allowed values + are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: Key is the taint key that the toleration applies + to. Empty means match all taint keys. If the key is empty, + operator must be Exists; this combination means to match all + values and all keys. + type: string + operator: + description: Operator represents a key's relationship to the + value. Valid operators are Exists and Equal. Defaults to Equal. + Exists is equivalent to wildcard for value, so that a pod + can tolerate all taints of a particular category. + type: string + tolerationSeconds: + description: TolerationSeconds represents the period of time + the toleration (which must be of effect NoExecute, otherwise + this field is ignored) tolerates the taint. By default, it + is not set, which means tolerate the taint forever (do not + evict). Zero and negative values will be treated as 0 (evict + immediately) by the system. + format: int64 + type: integer + value: + description: Value is the taint value the toleration matches + to. If the operator is Exists, the value should be empty, + otherwise just a regular string. + type: string + type: object + type: array + x-kubernetes-preserve-unknown-fields: true + required: + - terminationPolicy + type: object + status: + description: ClusterStatus defines the observed state of Cluster. + properties: + clusterDefGeneration: + description: clusterDefGeneration represents the generation number + of ClusterDefinition referenced. + format: int64 + type: integer + components: + additionalProperties: + description: ClusterComponentStatus records components status. + properties: + membersStatus: + description: members' status. + items: + properties: + podName: + default: Unknown + description: PodName pod name. + type: string + readyWithoutPrimary: + description: Is it required for rsm to have at least one + primary pod to be ready. + type: boolean + role: + properties: + accessMode: + default: ReadWrite + description: AccessMode, what service this member + capable. + enum: + - None + - Readonly + - ReadWrite + type: string + canVote: + default: true + description: CanVote, whether this member has voting + rights + type: boolean + isLeader: + default: false + description: IsLeader, whether this member is the + leader + type: boolean + name: + default: leader + description: Name, role name. + type: string + required: + - accessMode + - name + type: object + required: + - podName + - role + type: object + type: array + message: + additionalProperties: + type: string + description: message records the component details message in + current phase. Keys are podName or deployName or statefulSetName. + The format is `ObjectKind/Name`. + type: object + phase: + description: 'phase describes the phase of the component and + the detail information of the phases are as following: Creating: + `Creating` is a special `Updating` with previous phase `empty`(means + "") or `Creating`. Running: component replicas > 0 and all + pod specs are latest with a Running state. Updating: component + replicas > 0 and has no failed pods. the component is being + updated. Abnormal: component replicas > 0 but having some + failed pods. the component basically works but in a fragile + state. Failed: component replicas > 0 but having some failed + pods. the component doesn''t work anymore. Stopping: component + replicas = 0 and has terminating pods. Stopped: component + replicas = 0 and all pods have been deleted. Deleting: the + component is being deleted.' + enum: + - Creating + - Running + - Updating + - Stopping + - Stopped + - Deleting + - Failed + - Abnormal + type: string + podsReady: + description: podsReady checks if all pods of the component are + ready. + type: boolean + podsReadyTime: + description: podsReadyTime what time point of all component + pods are ready, this time is the ready time of the last component + pod. + format: date-time + type: string + type: object + description: components record the current status information of all + components of the cluster. + type: object + conditions: + description: Describe current state of cluster API Resource, like + warning. + items: + description: "Condition contains details for one aspect of the current + state of this API Resource. --- This struct is intended for direct + use as an array at the field path .status.conditions. For example, + \n type FooStatus struct{ // Represents the observations of a + foo's current state. // Known .status.conditions.type are: \"Available\", + \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge + // +listType=map // +listMapKey=type Conditions []metav1.Condition + `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" + protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" + properties: + lastTransitionTime: + description: lastTransitionTime is the last time the condition + transitioned from one status to another. This should be when + the underlying condition changed. If that is not known, then + using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: message is a human readable message indicating + details about the transition. This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: observedGeneration represents the .metadata.generation + that the condition was set based upon. For instance, if .metadata.generation + is currently 12, but the .status.conditions[x].observedGeneration + is 9, the condition is out of date with respect to the current + state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: reason contains a programmatic identifier indicating + the reason for the condition's last transition. Producers + of specific condition types may define expected values and + meanings for this field, and whether the values are considered + a guaranteed API. The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + --- Many .condition.type values are consistent across resources + like Available, but because arbitrary conditions can be useful + (see .node.status.conditions), the ability to deconflict is + important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + message: + description: message describes cluster details message in current + phase. + type: string + observedGeneration: + description: observedGeneration is the most recent generation observed + for this Cluster. It corresponds to the Cluster's generation, which + is updated on mutation by the API Server. + format: int64 + type: integer + phase: + description: 'phase describes the phase of the Cluster, the detail + information of the phases are as following: Creating: all components + are in `Creating` phase. Running: all components are in `Running` + phase, means the cluster is working well. Updating: all components + are in `Creating`, `Running` or `Updating` phase, and at least one + component is in `Creating` or `Updating` phase, means the cluster + is doing an update. Stopping: at least one component is in `Stopping` + phase, means the cluster is in a stop progress. Stopped: all components + are in ''Stopped` phase, means the cluster has stopped and didn''t + provide any function anymore. Failed: all components are in `Failed` + phase, means the cluster is unavailable. Abnormal: some components + are in `Failed` or `Abnormal` phase, means the cluster in a fragile + state. troubleshoot need to be done. Deleting: the cluster is being + deleted.' + enum: + - Creating + - Running + - Updating + - Stopping + - Stopped + - Deleting + - Failed + - Abnormal + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/data/kubeblocks-postgresql-operator/context.json b/data/kubeblocks-postgresql-operator/context.json new file mode 100644 index 0000000000..86421e0731 --- /dev/null +++ b/data/kubeblocks-postgresql-operator/context.json @@ -0,0 +1,1627 @@ +{ + "crd": { + "body": { + "apiVersion": "apiextensions.k8s.io/v1", + "kind": "CustomResourceDefinition", + "metadata": { + "annotations": { + "controller-gen.kubebuilder.io/version": "v0.12.1" + }, + "creationTimestamp": "2024-02-23T18:50:48Z", + "generation": 1, + "labels": { + "app.kubernetes.io/name": "kubeblocks" + }, + "name": "clusters.apps.kubeblocks.io", + "resourceVersion": "619", + "uid": "5f40d7bf-c416-4886-90ea-1aa4063788e1" + }, + "spec": { + "conversion": { + "strategy": "None" + }, + "group": "apps.kubeblocks.io", + "names": { + "categories": [ + "kubeblocks", + "all" + ], + "kind": "Cluster", + "listKind": "ClusterList", + "plural": "clusters", + "singular": "cluster" + }, + "scope": "Namespaced", + "versions": [ + { + "additionalPrinterColumns": [ + { + "description": "ClusterDefinition referenced by cluster.", + "jsonPath": ".spec.clusterDefinitionRef", + "name": "CLUSTER-DEFINITION", + "type": "string" + }, + { + "description": "Cluster Application Version.", + "jsonPath": ".spec.clusterVersionRef", + "name": "VERSION", + "type": "string" + }, + { + "description": "Cluster termination policy.", + "jsonPath": ".spec.terminationPolicy", + "name": "TERMINATION-POLICY", + "type": "string" + }, + { + "description": "Cluster Status.", + "jsonPath": ".status.phase", + "name": "STATUS", + "type": "string" + }, + { + "jsonPath": ".metadata.creationTimestamp", + "name": "AGE", + "type": "date" + } + ], + "name": "v1alpha1", + "schema": { + "openAPIV3Schema": { + "description": "Cluster is the Schema for the clusters 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": { + "type": "object" + }, + "spec": { + "description": "ClusterSpec defines the desired state of Cluster.", + "properties": { + "affinity": { + "description": "affinity is a group of affinity scheduling rules.", + "properties": { + "nodeLabels": { + "additionalProperties": { + "type": "string" + }, + "description": "nodeLabels describes that pods must be scheduled to the nodes with the specified node labels.", + "type": "object" + }, + "podAntiAffinity": { + "default": "Preferred", + "description": "podAntiAffinity describes the anti-affinity level of pods within a component. Preferred means try spread pods by `TopologyKeys`. Required means must spread pods by `TopologyKeys`.", + "enum": [ + "Preferred", + "Required" + ], + "type": "string" + }, + "tenancy": { + "default": "SharedNode", + "description": "tenancy describes how pods are distributed across node. SharedNode means multiple pods may share the same node. DedicatedNode means each pod runs on their own dedicated node.", + "enum": [ + "SharedNode", + "DedicatedNode" + ], + "type": "string" + }, + "topologyKeys": { + "description": "topologyKey is the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. It's used as the topology domain for pod anti-affinity and pod spread constraint. Some well-known label keys, such as \"kubernetes.io/hostname\" and \"topology.kubernetes.io/zone\" are often used as TopologyKey, as well as any other custom label key.", + "items": { + "type": "string" + }, + "type": "array", + "x-kubernetes-list-type": "set" + } + }, + "type": "object" + }, + "availabilityPolicy": { + "description": "availabilityPolicy describes the availability policy, including zone, node, and none.", + "enum": [ + "zone", + "node", + "none" + ], + "type": "string" + }, + "backup": { + "description": "cluster backup configuration.", + "properties": { + "cronExpression": { + "description": "the cron expression for schedule, the timezone is in UTC. see https://en.wikipedia.org/wiki/Cron.", + "type": "string" + }, + "enabled": { + "default": false, + "description": "enabled defines whether to enable automated backup.", + "type": "boolean" + }, + "method": { + "description": "backup method name to use, that is defined in backupPolicy.", + "type": "string" + }, + "pitrEnabled": { + "default": false, + "description": "pitrEnabled defines whether to enable point-in-time recovery.", + "type": "boolean" + }, + "repoName": { + "description": "repoName is the name of the backupRepo, if not set, will use the default backupRepo.", + "type": "string" + }, + "retentionPeriod": { + "default": "7d", + "description": "retentionPeriod determines a duration up to which the backup should be kept. controller will remove all backups that are older than the RetentionPeriod. For example, RetentionPeriod of `30d` will keep only the backups of last 30 days. Sample duration format: - years: \t2y - months: \t6mo - days: \t\t30d - hours: \t12h - minutes: \t30m You can also combine the above durations. For example: 30d12h30m", + "type": "string" + }, + "startingDeadlineMinutes": { + "description": "startingDeadlineMinutes defines the deadline in minutes for starting the backup job if it misses scheduled time for any reason.", + "format": "int64", + "maximum": 1440, + "minimum": 0, + "type": "integer" + } + }, + "type": "object" + }, + "clusterDefinitionRef": { + "description": "Cluster referencing ClusterDefinition name. This is an immutable attribute. If ClusterDefRef is not specified, ComponentDef must be specified for each Component in ComponentSpecs.", + "maxLength": 63, + "pattern": "^[a-z0-9]([a-z0-9\\.\\-]*[a-z0-9])?$", + "type": "string", + "x-kubernetes-validations": [ + { + "message": "clusterDefinitionRef is immutable", + "rule": "self == oldSelf" + } + ] + }, + "clusterVersionRef": { + "description": "Cluster referencing ClusterVersion name.", + "maxLength": 63, + "pattern": "^[a-z0-9]([a-z0-9\\.\\-]*[a-z0-9])?$", + "type": "string" + }, + "componentSpecs": { + "description": "List of componentSpecs you want to replace in ClusterDefinition and ClusterVersion. It will replace the field in ClusterDefinition's and ClusterVersion's component if type is matching.", + "items": { + "description": "ClusterComponentSpec defines the cluster component spec.", + "properties": { + "affinity": { + "description": "affinity describes affinities specified by users.", + "properties": { + "nodeLabels": { + "additionalProperties": { + "type": "string" + }, + "description": "nodeLabels describes that pods must be scheduled to the nodes with the specified node labels.", + "type": "object" + }, + "podAntiAffinity": { + "default": "Preferred", + "description": "podAntiAffinity describes the anti-affinity level of pods within a component. Preferred means try spread pods by `TopologyKeys`. Required means must spread pods by `TopologyKeys`.", + "enum": [ + "Preferred", + "Required" + ], + "type": "string" + }, + "tenancy": { + "default": "SharedNode", + "description": "tenancy describes how pods are distributed across node. SharedNode means multiple pods may share the same node. DedicatedNode means each pod runs on their own dedicated node.", + "enum": [ + "SharedNode", + "DedicatedNode" + ], + "type": "string" + }, + "topologyKeys": { + "description": "topologyKey is the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. It's used as the topology domain for pod anti-affinity and pod spread constraint. Some well-known label keys, such as \"kubernetes.io/hostname\" and \"topology.kubernetes.io/zone\" are often used as TopologyKey, as well as any other custom label key.", + "items": { + "type": "string" + }, + "type": "array", + "x-kubernetes-list-type": "set" + } + }, + "type": "object" + }, + "classDefRef": { + "description": "classDefRef references the class defined in ComponentClassDefinition.", + "properties": { + "class": { + "description": "Class refers to the name of the class that is defined in the ComponentClassDefinition.", + "type": "string" + }, + "name": { + "description": "Name refers to the name of the ComponentClassDefinition.", + "maxLength": 63, + "pattern": "^[a-z0-9]([a-z0-9\\.\\-]*[a-z0-9])?$", + "type": "string" + } + }, + "required": [ + "class" + ], + "type": "object" + }, + "componentDef": { + "description": "componentDef references the name of the ComponentDefinition. If both componentDefRef and componentDef are provided, the componentDef will take precedence over componentDefRef.", + "maxLength": 22, + "pattern": "^[a-z0-9]([a-z0-9\\.\\-]*[a-z0-9])?$", + "type": "string", + "x-kubernetes-validations": [ + { + "message": "componentDef is immutable", + "rule": "self == oldSelf" + } + ] + }, + "componentDefRef": { + "description": "componentDefRef references componentDef defined in ClusterDefinition spec. Need to comply with IANA Service Naming rule.", + "maxLength": 22, + "pattern": "^[a-z]([a-z0-9\\-]*[a-z0-9])?$", + "type": "string", + "x-kubernetes-validations": [ + { + "message": "componentDefRef is immutable", + "rule": "self == oldSelf" + } + ] + }, + "enabledLogs": { + "description": "enabledLogs indicates which log file takes effect in the database cluster. element is the log type which is defined in cluster definition logConfig.name, and will set relative variables about this log type in database kernel.", + "items": { + "type": "string" + }, + "type": "array", + "x-kubernetes-list-type": "set" + }, + "instances": { + "description": "Instances defines the list of instance to be deleted priorly If the RsmTransformPolicy is specified as ToPod,the list of instances will be used.", + "items": { + "type": "string" + }, + "type": "array" + }, + "issuer": { + "description": "issuer defines provider context for TLS certs. required when TLS enabled", + "properties": { + "name": { + "default": "KubeBlocks", + "description": "Name of issuer. Options supported: - KubeBlocks - Certificates signed by KubeBlocks Operator. - UserProvided - User provided own CA-signed certificates.", + "enum": [ + "KubeBlocks", + "UserProvided" + ], + "type": "string" + }, + "secretRef": { + "description": "secretRef. TLS certs Secret reference required when from is UserProvided", + "properties": { + "ca": { + "description": "CA cert key in Secret", + "type": "string" + }, + "cert": { + "description": "Cert key in Secret", + "type": "string" + }, + "key": { + "description": "Key of TLS private key in Secret", + "type": "string" + }, + "name": { + "description": "Name of the Secret", + "type": "string" + } + }, + "required": [ + "ca", + "cert", + "key", + "name" + ], + "type": "object" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "monitor": { + "default": false, + "description": "monitor is a switch to enable monitoring and is set as false by default. KubeBlocks provides an extension mechanism to support component level monitoring, which will scrape metrics auto or manually from servers in component and export metrics to Time Series Database.", + "type": "boolean" + }, + "name": { + "description": "name defines cluster's component name, this name is also part of Service DNS name, so this name will comply with IANA Service Naming rule.", + "maxLength": 22, + "pattern": "^[a-z]([a-z0-9\\-]*[a-z0-9])?$", + "type": "string", + "x-kubernetes-validations": [ + { + "message": "name is immutable", + "rule": "self == oldSelf" + } + ] + }, + "noCreatePDB": { + "default": false, + "description": "noCreatePDB defines the PodDisruptionBudget creation behavior and is set to true if creation of PodDisruptionBudget for this component is not needed. It defaults to false.", + "type": "boolean" + }, + "nodes": { + "description": "Nodes defines the list of nodes that pods can schedule If the RsmTransformPolicy is specified as ToPod,the list of nodes will be used. If the list of nodes is empty, no specific node will be assigned. However, if the list of node is filled, all pods will be evenly scheduled across the nodes in the list.", + "items": { + "description": "NodeName is a type that holds a api.Node's Name identifier. Being a type captures intent and helps make sure that the node name is not confused with similar concepts (the hostname, the cloud provider id, the cloud provider name etc) \n To clarify the various types: \n - Node.Name is the Name field of the Node in the API. This should be stored in a NodeName. Unfortunately, because Name is part of ObjectMeta, we can't store it as a NodeName at the API level. \n - Hostname is the hostname of the local machine (from uname -n). However, some components allow the user to pass in a --hostname-override flag, which will override this in most places. In the absence of anything more meaningful, kubelet will use Hostname as the Node.Name when it creates the Node. \n * The cloudproviders have the own names: GCE has InstanceName, AWS has InstanceId. \n For GCE, InstanceName is the Name of an Instance object in the GCE API. On GCE, Instance.Name becomes the Hostname, and thus it makes sense also to use it as the Node.Name. But that is GCE specific, and it is up to the cloudprovider how to do this mapping. \n For AWS, the InstanceID is not yet suitable for use as a Node.Name, so we actually use the PrivateDnsName for the Node.Name. And this is _not_ always the same as the hostname: if we are using a custom DHCP domain it won't be.", + "type": "string" + }, + "type": "array" + }, + "replicas": { + "default": 1, + "description": "Component replicas.", + "format": "int32", + "minimum": 0, + "type": "integer" + }, + "resources": { + "description": "Resources requests and limits of workload.", + "properties": { + "claims": { + "description": "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. \n This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. \n This field is immutable. It can only be set for containers.", + "items": { + "description": "ResourceClaim references one entry in PodSpec.ResourceClaims.", + "properties": { + "name": { + "description": "Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container.", + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "type": "array", + "x-kubernetes-list-map-keys": [ + "name" + ], + "x-kubernetes-list-type": "map" + }, + "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-resources-containers/", + "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. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/", + "type": "object" + } + }, + "type": "object", + "x-kubernetes-preserve-unknown-fields": true + }, + "rsmTransformPolicy": { + "default": "ToSts", + "description": "RsmTransformPolicy defines the policy generate sts using rsm. ToSts: rsm transforms to statefulSet ToPod: rsm transforms to pods", + "enum": [ + "ToPod", + "ToSts" + ], + "type": "string" + }, + "serviceAccountName": { + "description": "serviceAccountName is the name of the ServiceAccount that running component depends on.", + "type": "string" + }, + "serviceRefs": { + "description": "serviceRefs define service references for the current component. Based on the referenced services, they can be categorized into two types: Service provided by external sources: These services are provided by external sources and are not managed by KubeBlocks. They can be Kubernetes-based or non-Kubernetes services. For external services, you need to provide an additional ServiceDescriptor object to establish the service binding. Service provided by other KubeBlocks clusters: These services are provided by other KubeBlocks clusters. You can bind to these services by specifying the name of the hosting cluster. Each type of service reference requires specific configurations and bindings to establish the connection and interaction with the respective services. It should be noted that the ServiceRef has cluster-level semantic consistency, meaning that within the same Cluster, service references with the same ServiceRef.Name are considered to be the same service. It is only allowed to bind to the same Cluster or ServiceDescriptor.", + "items": { + "properties": { + "cluster": { + "description": "When referencing a service provided by other KubeBlocks cluster, you need to provide the name of the Cluster being referenced. By default, when other KubeBlocks Cluster are referenced, the ClusterDefinition.spec.connectionCredential secret corresponding to the referenced Cluster will be used to bind to the current component. Currently, if a KubeBlocks cluster is to be referenced, the connection credential secret should include and correspond to the following fields: endpoint, port, username, and password. Under this referencing approach, the ServiceKind and ServiceVersion of service reference declaration defined in the ClusterDefinition will not be validated. If both Cluster and ServiceDescriptor are specified, the Cluster takes precedence.", + "type": "string" + }, + "name": { + "description": "name of the service reference declaration. references the serviceRefDeclaration name defined in clusterDefinition.componentDefs[*].serviceRefDeclarations[*].name", + "type": "string" + }, + "namespace": { + "description": "namespace defines the namespace of the referenced Cluster or the namespace of the referenced ServiceDescriptor object. If not set, the referenced Cluster and ServiceDescriptor will be searched in the namespace of the current cluster by default.", + "type": "string" + }, + "serviceDescriptor": { + "description": "serviceDescriptor defines the service descriptor of the service provided by external sources. When referencing a service provided by external sources, you need to provide the ServiceDescriptor object name to establish the service binding. And serviceDescriptor is the name of the ServiceDescriptor object, furthermore, the ServiceDescriptor.spec.serviceKind and ServiceDescriptor.spec.serviceVersion should match clusterDefinition.componentDefs[*].serviceRefDeclarations[*].serviceRefDeclarationSpecs[*].serviceKind and the regular expression defines in clusterDefinition.componentDefs[*].serviceRefDeclarations[*].serviceRefDeclarationSpecs[*].serviceVersion. If both Cluster and ServiceDescriptor are specified, the Cluster takes precedence.", + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "type": "array" + }, + "services": { + "description": "Services expose endpoints that can be accessed by clients.", + "items": { + "properties": { + "annotations": { + "additionalProperties": { + "type": "string" + }, + "description": "If ServiceType is LoadBalancer, cloud provider related parameters can be put here More info: https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer.", + "type": "object" + }, + "name": { + "description": "Service name", + "maxLength": 15, + "type": "string" + }, + "serviceType": { + "default": "ClusterIP", + "description": "serviceType determines how the Service is exposed. Valid options are ClusterIP, NodePort, and LoadBalancer. \"ClusterIP\" allocates a cluster-internal IP address for load-balancing to endpoints. Endpoints are determined by the selector or if that is not specified, they are determined by manual construction of an Endpoints object or EndpointSlice objects. If clusterIP is \"None\", no virtual IP is allocated and the endpoints are published as a set of endpoints rather than a virtual IP. \"NodePort\" builds on ClusterIP and allocates a port on every node which routes to the same endpoints as the clusterIP. \"LoadBalancer\" builds on NodePort and creates an external load-balancer (if supported in the current cloud) which routes to the same endpoints as the clusterIP. More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types.", + "enum": [ + "ClusterIP", + "NodePort", + "LoadBalancer" + ], + "type": "string", + "x-kubernetes-preserve-unknown-fields": true + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "type": "array" + }, + "switchPolicy": { + "description": "switchPolicy defines the strategy for switchover and failover when workloadType is Replication.", + "properties": { + "type": { + "default": "Noop", + "description": "clusterSwitchPolicy defines type of the switchPolicy when workloadType is Replication. MaximumAvailability: [WIP] when the primary is active, do switch if the synchronization delay = 0 in the user-defined lagProbe data delay detection logic, otherwise do not switch. The primary is down, switch immediately. It will be available in future versions. MaximumDataProtection: [WIP] when the primary is active, do switch if synchronization delay = 0 in the user-defined lagProbe data lag detection logic, otherwise do not switch. If the primary is down, if it can be judged that the primary and secondary data are consistent, then do the switch, otherwise do not switch. It will be available in future versions. Noop: KubeBlocks will not perform high-availability switching on components. Users need to implement HA by themselves or integrate open source HA solution.", + "enum": [ + "Noop" + ], + "type": "string" + } + }, + "type": "object" + }, + "tls": { + "description": "Enables or disables TLS certs.", + "type": "boolean" + }, + "tolerations": { + "description": "Component tolerations will override ClusterSpec.Tolerations if specified.", + "items": { + "description": "The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator .", + "properties": { + "effect": { + "description": "Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.", + "type": "string" + }, + "key": { + "description": "Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys.", + "type": "string" + }, + "operator": { + "description": "Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category.", + "type": "string" + }, + "tolerationSeconds": { + "description": "TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system.", + "format": "int64", + "type": "integer" + }, + "value": { + "description": "Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array", + "x-kubernetes-preserve-unknown-fields": true + }, + "updateStrategy": { + "description": "updateStrategy defines the update strategy for the component.", + "enum": [ + "Serial", + "BestEffortParallel", + "Parallel" + ], + "type": "string" + }, + "userResourceRefs": { + "description": "userResourceRefs defines the user-defined volumes.", + "properties": { + "configMapRefs": { + "description": "configMapRefs defines the user-defined configmaps.", + "items": { + "properties": { + "asVolumeFrom": { + "description": "asVolumeFrom defines the list of containers where volumeMounts will be injected into.", + "items": { + "type": "string" + }, + "type": "array", + "x-kubernetes-list-type": "set" + }, + "configMap": { + "description": "configMap defines the configmap volume source.", + "properties": { + "defaultMode": { + "description": "defaultMode is optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. 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 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": "key is the key to project.", + "type": "string" + }, + "mode": { + "description": "mode is Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. 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": "path is 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": "optional specify whether the ConfigMap or its keys must be defined", + "type": "boolean" + } + }, + "type": "object", + "x-kubernetes-map-type": "atomic" + }, + "mountPoint": { + "description": "mountPath is the path at which to mount the volume.", + "maxLength": 256, + "pattern": "^/[a-z]([a-z0-9\\-]*[a-z0-9])?$", + "type": "string" + }, + "name": { + "description": "name is the name of the referenced the Configmap/Secret object.", + "maxLength": 63, + "pattern": "^[a-z0-9]([a-z0-9\\.\\-]*[a-z0-9])?$", + "type": "string" + }, + "subPath": { + "description": "subPath is a relative file path within the volume to mount.", + "type": "string" + } + }, + "required": [ + "configMap", + "mountPoint", + "name" + ], + "type": "object" + }, + "type": "array", + "x-kubernetes-list-map-keys": [ + "name" + ], + "x-kubernetes-list-type": "map" + }, + "secretRefs": { + "description": "secretRefs defines the user-defined secrets.", + "items": { + "properties": { + "asVolumeFrom": { + "description": "asVolumeFrom defines the list of containers where volumeMounts will be injected into.", + "items": { + "type": "string" + }, + "type": "array", + "x-kubernetes-list-type": "set" + }, + "mountPoint": { + "description": "mountPath is the path at which to mount the volume.", + "maxLength": 256, + "pattern": "^/[a-z]([a-z0-9\\-]*[a-z0-9])?$", + "type": "string" + }, + "name": { + "description": "name is the name of the referenced the Configmap/Secret object.", + "maxLength": 63, + "pattern": "^[a-z0-9]([a-z0-9\\.\\-]*[a-z0-9])?$", + "type": "string" + }, + "secret": { + "description": "secret defines the secret volume source.", + "properties": { + "defaultMode": { + "description": "defaultMode is Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. 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 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": "key is the key to project.", + "type": "string" + }, + "mode": { + "description": "mode is Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. 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": "path is 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": "optional field specify whether the Secret or its keys must be defined", + "type": "boolean" + }, + "secretName": { + "description": "secretName is the 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" + }, + "subPath": { + "description": "subPath is a relative file path within the volume to mount.", + "type": "string" + } + }, + "required": [ + "mountPoint", + "name", + "secret" + ], + "type": "object" + }, + "type": "array", + "x-kubernetes-list-map-keys": [ + "name" + ], + "x-kubernetes-list-type": "map" + } + }, + "type": "object" + }, + "volumeClaimTemplates": { + "description": "volumeClaimTemplates information for statefulset.spec.volumeClaimTemplates.", + "items": { + "properties": { + "name": { + "description": "Reference `ClusterDefinition.spec.componentDefs.containers.volumeMounts.name`.", + "type": "string" + }, + "spec": { + "description": "spec defines the desired characteristics of a volume requested by a pod author.", + "properties": { + "accessModes": { + "description": "accessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1.", + "items": { + "type": "string" + }, + "type": "array", + "x-kubernetes-preserve-unknown-fields": true + }, + "resources": { + "description": "resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources.", + "properties": { + "claims": { + "description": "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. \n This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. \n This field is immutable. It can only be set for containers.", + "items": { + "description": "ResourceClaim references one entry in PodSpec.ResourceClaims.", + "properties": { + "name": { + "description": "Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container.", + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "type": "array", + "x-kubernetes-list-map-keys": [ + "name" + ], + "x-kubernetes-list-type": "map" + }, + "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-resources-containers/", + "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. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/", + "type": "object" + } + }, + "type": "object", + "x-kubernetes-preserve-unknown-fields": true + }, + "storageClassName": { + "description": "storageClassName is the name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1.", + "type": "string" + }, + "volumeMode": { + "description": "volumeMode defines what type of volume is required by the claim.", + "type": "string" + } + }, + "type": "object" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "type": "array" + } + }, + "required": [ + "name", + "replicas" + ], + "type": "object", + "x-kubernetes-validations": [ + { + "message": "either componentDefRef or componentDef should be provided", + "rule": "has(self.componentDefRef) || has(self.componentDef)" + }, + { + "message": "componentDefRef is required once set", + "rule": "!has(oldSelf.componentDefRef) || has(self.componentDefRef)" + }, + { + "message": "componentDef is required once set", + "rule": "!has(oldSelf.componentDef) || has(self.componentDef)" + } + ] + }, + "maxItems": 128, + "minItems": 1, + "type": "array", + "x-kubernetes-list-map-keys": [ + "name" + ], + "x-kubernetes-list-type": "map", + "x-kubernetes-validations": [ + { + "message": "duplicated component", + "rule": "self.all(x, size(self.filter(c, c.name == x.name)) == 1)" + } + ] + }, + "monitor": { + "description": "monitor specifies the configuration of monitor", + "properties": { + "monitoringInterval": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], + "description": "monitoringInterval specifies interval of monitoring, no monitor if set to 0", + "x-kubernetes-int-or-string": true + } + }, + "type": "object" + }, + "network": { + "description": "network specifies the configuration of network", + "properties": { + "hostNetworkAccessible": { + "default": false, + "description": "hostNetworkAccessible specifies whether host network is accessible. It defaults to false", + "type": "boolean" + }, + "publiclyAccessible": { + "default": false, + "description": "publiclyAccessible specifies whether it is publicly accessible. It defaults to false", + "type": "boolean" + } + }, + "type": "object" + }, + "replicas": { + "description": "replicas specifies the replicas of the first componentSpec, if the replicas of the first componentSpec is specified, this value will be ignored.", + "format": "int32", + "type": "integer" + }, + "resources": { + "description": "resources specifies the resources of the first componentSpec, if the resources of the first componentSpec is specified, this value will be ignored.", + "properties": { + "cpu": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], + "description": "cpu resource needed, more info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/", + "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$", + "x-kubernetes-int-or-string": true + }, + "memory": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], + "description": "memory resource needed, more info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/", + "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" + }, + "services": { + "description": "services defines the services to access a cluster.", + "items": { + "properties": { + "annotations": { + "additionalProperties": { + "type": "string" + }, + "description": "If ServiceType is LoadBalancer, cloud provider related parameters can be put here More info: https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer.", + "type": "object" + }, + "componentSelector": { + "description": "ComponentSelector extends the ServiceSpec.Selector by allowing you to specify a component as selectors for the service.", + "type": "string" + }, + "name": { + "description": "Name defines the name of the service. otherwise, it indicates the name of the service. Others can refer to this service by its name. (e.g., connection credential) Cannot be updated.", + "type": "string" + }, + "roleSelector": { + "description": "RoleSelector extends the ServiceSpec.Selector by allowing you to specify defined role as selector for the service. if GeneratePodOrdinalService sets to true, RoleSelector will be ignored.", + "type": "string" + }, + "serviceName": { + "description": "ServiceName defines the name of the underlying service object. If not specified, the default service name with different patterns will be used: - : for cluster-level services - -: for component-level services Only one default service name is allowed. Cannot be updated.", + "type": "string" + }, + "spec": { + "description": "Spec defines the behavior of a service. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "properties": { + "allocateLoadBalancerNodePorts": { + "description": "allocateLoadBalancerNodePorts defines if NodePorts will be automatically allocated for services with type LoadBalancer. Default is \"true\". It may be set to \"false\" if the cluster load-balancer does not rely on NodePorts. If the caller requests specific NodePorts (by specifying a value), those requests will be respected, regardless of this field. This field may only be set for services with type LoadBalancer and will be cleared if the type is changed to any other type.", + "type": "boolean" + }, + "clusterIP": { + "description": "clusterIP is the IP address of the service and is usually assigned randomly. If an address is specified manually, is in-range (as per system configuration), and is not in use, it will be allocated to the service; otherwise creation of the service will fail. This field may not be changed through updates unless the type field is also being changed to ExternalName (which requires this field to be blank) or the type field is being changed from ExternalName (in which case this field may optionally be specified, as describe above). Valid values are \"None\", empty string (\"\"), or a valid IP address. Setting this to \"None\" makes a \"headless service\" (no virtual IP), which is useful when direct endpoint connections are preferred and proxying is not required. Only applies to types ClusterIP, NodePort, and LoadBalancer. If this field is specified when creating a Service of type ExternalName, creation will fail. This field will be wiped when updating a Service to type ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies", + "type": "string" + }, + "clusterIPs": { + "description": "ClusterIPs is a list of IP addresses assigned to this service, and are usually assigned randomly. If an address is specified manually, is in-range (as per system configuration), and is not in use, it will be allocated to the service; otherwise creation of the service will fail. This field may not be changed through updates unless the type field is also being changed to ExternalName (which requires this field to be empty) or the type field is being changed from ExternalName (in which case this field may optionally be specified, as describe above). Valid values are \"None\", empty string (\"\"), or a valid IP address. Setting this to \"None\" makes a \"headless service\" (no virtual IP), which is useful when direct endpoint connections are preferred and proxying is not required. Only applies to types ClusterIP, NodePort, and LoadBalancer. If this field is specified when creating a Service of type ExternalName, creation will fail. This field will be wiped when updating a Service to type ExternalName. If this field is not specified, it will be initialized from the clusterIP field. If this field is specified, clients must ensure that clusterIPs[0] and clusterIP have the same value. \n This field may hold a maximum of two entries (dual-stack IPs, in either order). These IPs must correspond to the values of the ipFamilies field. Both clusterIPs and ipFamilies are governed by the ipFamilyPolicy field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies", + "items": { + "type": "string" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + }, + "externalIPs": { + "description": "externalIPs is a list of IP addresses for which nodes in the cluster will also accept traffic for this service. These IPs are not managed by Kubernetes. The user is responsible for ensuring that traffic arrives at a node with this IP. A common example is external load-balancers that are not part of the Kubernetes system.", + "items": { + "type": "string" + }, + "type": "array" + }, + "externalName": { + "description": "externalName is the external reference that discovery mechanisms will return as an alias for this service (e.g. a DNS CNAME record). No proxying will be involved. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) and requires `type` to be \"ExternalName\".", + "type": "string" + }, + "externalTrafficPolicy": { + "description": "externalTrafficPolicy describes how nodes distribute service traffic they receive on one of the Service's \"externally-facing\" addresses (NodePorts, ExternalIPs, and LoadBalancer IPs). If set to \"Local\", the proxy will configure the service in a way that assumes that external load balancers will take care of balancing the service traffic between nodes, and so each node will deliver traffic only to the node-local endpoints of the service, without masquerading the client source IP. (Traffic mistakenly sent to a node with no endpoints will be dropped.) The default value, \"Cluster\", uses the standard behavior of routing to all endpoints evenly (possibly modified by topology and other features). Note that traffic sent to an External IP or LoadBalancer IP from within the cluster will always get \"Cluster\" semantics, but clients sending to a NodePort from within the cluster may need to take traffic policy into account when picking a node.", + "type": "string" + }, + "healthCheckNodePort": { + "description": "healthCheckNodePort specifies the healthcheck nodePort for the service. This only applies when type is set to LoadBalancer and externalTrafficPolicy is set to Local. If a value is specified, is in-range, and is not in use, it will be used. If not specified, a value will be automatically allocated. External systems (e.g. load-balancers) can use this port to determine if a given node holds endpoints for this service or not. If this field is specified when creating a Service which does not need it, creation will fail. This field will be wiped when updating a Service to no longer need it (e.g. changing type). This field cannot be updated once set.", + "format": "int32", + "type": "integer" + }, + "internalTrafficPolicy": { + "description": "InternalTrafficPolicy describes how nodes distribute service traffic they receive on the ClusterIP. If set to \"Local\", the proxy will assume that pods only want to talk to endpoints of the service on the same node as the pod, dropping the traffic if there are no local endpoints. The default value, \"Cluster\", uses the standard behavior of routing to all endpoints evenly (possibly modified by topology and other features).", + "type": "string" + }, + "ipFamilies": { + "description": "IPFamilies is a list of IP families (e.g. IPv4, IPv6) assigned to this service. This field is usually assigned automatically based on cluster configuration and the ipFamilyPolicy field. If this field is specified manually, the requested family is available in the cluster, and ipFamilyPolicy allows it, it will be used; otherwise creation of the service will fail. This field is conditionally mutable: it allows for adding or removing a secondary IP family, but it does not allow changing the primary IP family of the Service. Valid values are \"IPv4\" and \"IPv6\". This field only applies to Services of types ClusterIP, NodePort, and LoadBalancer, and does apply to \"headless\" services. This field will be wiped when updating a Service to type ExternalName. \n This field may hold a maximum of two entries (dual-stack families, in either order). These families must correspond to the values of the clusterIPs field, if specified. Both clusterIPs and ipFamilies are governed by the ipFamilyPolicy field.", + "items": { + "description": "IPFamily represents the IP Family (IPv4 or IPv6). This type is used to express the family of an IP expressed by a type (e.g. service.spec.ipFamilies).", + "type": "string" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + }, + "ipFamilyPolicy": { + "description": "IPFamilyPolicy represents the dual-stack-ness requested or required by this Service. If there is no value provided, then this field will be set to SingleStack. Services can be \"SingleStack\" (a single IP family), \"PreferDualStack\" (two IP families on dual-stack configured clusters or a single IP family on single-stack clusters), or \"RequireDualStack\" (two IP families on dual-stack configured clusters, otherwise fail). The ipFamilies and clusterIPs fields depend on the value of this field. This field will be wiped when updating a service to type ExternalName.", + "type": "string" + }, + "loadBalancerClass": { + "description": "loadBalancerClass is the class of the load balancer implementation this Service belongs to. If specified, the value of this field must be a label-style identifier, with an optional prefix, e.g. \"internal-vip\" or \"example.com/internal-vip\". Unprefixed names are reserved for end-users. This field can only be set when the Service type is 'LoadBalancer'. If not set, the default load balancer implementation is used, today this is typically done through the cloud provider integration, but should apply for any default implementation. If set, it is assumed that a load balancer implementation is watching for Services with a matching class. Any default load balancer implementation (e.g. cloud providers) should ignore Services that set this field. This field can only be set when creating or updating a Service to type 'LoadBalancer'. Once set, it can not be changed. This field will be wiped when a service is updated to a non 'LoadBalancer' type.", + "type": "string" + }, + "loadBalancerIP": { + "description": "Only applies to Service Type: LoadBalancer. This feature depends on whether the underlying cloud-provider supports specifying the loadBalancerIP when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature. Deprecated: This field was under-specified and its meaning varies across implementations. Using it is non-portable and it may not support dual-stack. Users are encouraged to use implementation-specific annotations when available.", + "type": "string" + }, + "loadBalancerSourceRanges": { + "description": "If specified and supported by the platform, this will restrict traffic through the cloud-provider load-balancer will be restricted to the specified client IPs. This field will be ignored if the cloud-provider does not support the feature.\" More info: https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/", + "items": { + "type": "string" + }, + "type": "array" + }, + "ports": { + "description": "The list of ports that are exposed by this service. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies", + "items": { + "description": "ServicePort contains information on service's port.", + "properties": { + "appProtocol": { + "description": "The application protocol for this port. This is used as a hint for implementations to offer richer behavior for protocols that they understand. This field follows standard Kubernetes label syntax. Valid values are either: \n * Un-prefixed protocol names - reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names). \n * Kubernetes-defined prefixed names: * 'kubernetes.io/h2c' - HTTP/2 over cleartext as described in https://www.rfc-editor.org/rfc/rfc7540 * 'kubernetes.io/ws' - WebSocket over cleartext as described in https://www.rfc-editor.org/rfc/rfc6455 * 'kubernetes.io/wss' - WebSocket over TLS as described in https://www.rfc-editor.org/rfc/rfc6455 \n * Other protocols should use implementation-defined prefixed names such as mycompany.com/my-custom-protocol.", + "type": "string" + }, + "name": { + "description": "The name of this port within the service. This must be a DNS_LABEL. All ports within a ServiceSpec must have unique names. When considering the endpoints for a Service, this must match the 'name' field in the EndpointPort. Optional if only one ServicePort is defined on this service.", + "type": "string" + }, + "nodePort": { + "description": "The port on each node on which this service is exposed when type is NodePort or LoadBalancer. Usually assigned by the system. If a value is specified, in-range, and not in use it will be used, otherwise the operation will fail. If not specified, a port will be allocated if this Service requires one. If this field is specified when creating a Service which does not need it, creation will fail. This field will be wiped when updating a Service to no longer need it (e.g. changing type from NodePort to ClusterIP). More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport", + "format": "int32", + "type": "integer" + }, + "port": { + "description": "The port that will be exposed by this service.", + "format": "int32", + "type": "integer" + }, + "protocol": { + "default": "TCP", + "description": "The IP protocol for this port. Supports \"TCP\", \"UDP\", and \"SCTP\". Default is TCP.", + "type": "string" + }, + "targetPort": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], + "description": "Number or name of the port to access on the pods targeted by the service. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. If this is a string, it will be looked up as a named port in the target Pod's container ports. If this is not specified, the value of the 'port' field is used (an identity map). This field is ignored for services with clusterIP=None, and should be omitted or set equal to the 'port' field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service", + "x-kubernetes-int-or-string": true + } + }, + "required": [ + "port" + ], + "type": "object" + }, + "type": "array", + "x-kubernetes-list-map-keys": [ + "port", + "protocol" + ], + "x-kubernetes-list-type": "map" + }, + "publishNotReadyAddresses": { + "description": "publishNotReadyAddresses indicates that any agent which deals with endpoints for this Service should disregard any indications of ready/not-ready. The primary use case for setting this field is for a StatefulSet's Headless Service to propagate SRV DNS records for its Pods for the purpose of peer discovery. The Kubernetes controllers that generate Endpoints and EndpointSlice resources for Services interpret this to mean that all endpoints are considered \"ready\" even if the Pods themselves are not. Agents which consume only Kubernetes generated endpoints through the Endpoints or EndpointSlice resources can safely assume this behavior.", + "type": "boolean" + }, + "selector": { + "additionalProperties": { + "type": "string" + }, + "description": "Route service traffic to pods with label keys and values matching this selector. If empty or not present, the service is assumed to have an external process managing its endpoints, which Kubernetes will not modify. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/", + "type": "object", + "x-kubernetes-map-type": "atomic" + }, + "sessionAffinity": { + "description": "Supports \"ClientIP\" and \"None\". Used to maintain session affinity. Enable client IP based session affinity. Must be ClientIP or None. Defaults to None. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies", + "type": "string" + }, + "sessionAffinityConfig": { + "description": "sessionAffinityConfig contains the configurations of session affinity.", + "properties": { + "clientIP": { + "description": "clientIP contains the configurations of Client IP based session affinity.", + "properties": { + "timeoutSeconds": { + "description": "timeoutSeconds specifies the seconds of ClientIP type session sticky time. The value must be >0 && <=86400(for 1 day) if ServiceAffinity == \"ClientIP\". Default value is 10800(for 3 hours).", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "type": { + "description": "type determines how the Service is exposed. Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer. \"ClusterIP\" allocates a cluster-internal IP address for load-balancing to endpoints. Endpoints are determined by the selector or if that is not specified, by manual construction of an Endpoints object or EndpointSlice objects. If clusterIP is \"None\", no virtual IP is allocated and the endpoints are published as a set of endpoints rather than a virtual IP. \"NodePort\" builds on ClusterIP and allocates a port on every node which routes to the same endpoints as the clusterIP. \"LoadBalancer\" builds on NodePort and creates an external load-balancer (if supported in the current cloud) which routes to the same endpoints as the clusterIP. \"ExternalName\" aliases this service to the specified externalName. Several other fields do not apply to ExternalName services. More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types", + "type": "string" + } + }, + "type": "object" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "type": "array", + "x-kubernetes-preserve-unknown-fields": true + }, + "storage": { + "description": "storage specifies the storage of the first componentSpec, if the storage of the first componentSpec is specified, this value will be ignored.", + "properties": { + "size": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], + "description": "storage size needed, more info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/", + "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" + }, + "tenancy": { + "description": "tenancy describes how pods are distributed across node. SharedNode means multiple pods may share the same node. DedicatedNode means each pod runs on their own dedicated node.", + "enum": [ + "SharedNode", + "DedicatedNode" + ], + "type": "string" + }, + "terminationPolicy": { + "description": "Cluster termination policy. Valid values are DoNotTerminate, Halt, Delete, WipeOut. DoNotTerminate will block delete operation. Halt will delete workload resources such as statefulset, deployment workloads but keep PVCs. Delete is based on Halt and deletes PVCs. WipeOut is based on Delete and wipe out all volume snapshots and snapshot data from backup storage location.", + "enum": [ + "DoNotTerminate", + "Halt", + "Delete", + "WipeOut" + ], + "type": "string" + }, + "tolerations": { + "description": "tolerations are attached to tolerate any taint that matches the triple `key,value,effect` using the matching operator `operator`.", + "items": { + "description": "The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator .", + "properties": { + "effect": { + "description": "Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.", + "type": "string" + }, + "key": { + "description": "Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys.", + "type": "string" + }, + "operator": { + "description": "Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category.", + "type": "string" + }, + "tolerationSeconds": { + "description": "TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system.", + "format": "int64", + "type": "integer" + }, + "value": { + "description": "Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array", + "x-kubernetes-preserve-unknown-fields": true + } + }, + "required": [ + "terminationPolicy" + ], + "type": "object" + }, + "status": { + "description": "ClusterStatus defines the observed state of Cluster.", + "properties": { + "clusterDefGeneration": { + "description": "clusterDefGeneration represents the generation number of ClusterDefinition referenced.", + "format": "int64", + "type": "integer" + }, + "components": { + "additionalProperties": { + "description": "ClusterComponentStatus records components status.", + "properties": { + "consensusSetStatus": { + "description": "consensusSetStatus specifies the mapping of role and pod name.", + "properties": { + "followers": { + "description": "Followers status.", + "items": { + "properties": { + "accessMode": { + "default": "ReadWrite", + "description": "accessMode defines what service this pod provides.", + "enum": [ + "None", + "Readonly", + "ReadWrite" + ], + "type": "string" + }, + "name": { + "default": "leader", + "description": "Defines the role name.", + "type": "string" + }, + "pod": { + "default": "Unknown", + "description": "Pod name.", + "type": "string" + } + }, + "required": [ + "accessMode", + "name", + "pod" + ], + "type": "object" + }, + "type": "array" + }, + "leader": { + "description": "Leader status.", + "properties": { + "accessMode": { + "default": "ReadWrite", + "description": "accessMode defines what service this pod provides.", + "enum": [ + "None", + "Readonly", + "ReadWrite" + ], + "type": "string" + }, + "name": { + "default": "leader", + "description": "Defines the role name.", + "type": "string" + }, + "pod": { + "default": "Unknown", + "description": "Pod name.", + "type": "string" + } + }, + "required": [ + "accessMode", + "name", + "pod" + ], + "type": "object" + }, + "learner": { + "description": "Learner status.", + "properties": { + "accessMode": { + "default": "ReadWrite", + "description": "accessMode defines what service this pod provides.", + "enum": [ + "None", + "Readonly", + "ReadWrite" + ], + "type": "string" + }, + "name": { + "default": "leader", + "description": "Defines the role name.", + "type": "string" + }, + "pod": { + "default": "Unknown", + "description": "Pod name.", + "type": "string" + } + }, + "required": [ + "accessMode", + "name", + "pod" + ], + "type": "object" + } + }, + "required": [ + "leader" + ], + "type": "object" + }, + "membersStatus": { + "description": "members' status.", + "items": { + "properties": { + "podName": { + "default": "Unknown", + "description": "PodName pod name.", + "type": "string" + }, + "readyWithoutPrimary": { + "description": "Is it required for rsm to have at least one primary pod to be ready.", + "type": "boolean" + }, + "role": { + "properties": { + "accessMode": { + "default": "ReadWrite", + "description": "AccessMode, what service this member capable.", + "enum": [ + "None", + "Readonly", + "ReadWrite" + ], + "type": "string" + }, + "canVote": { + "default": true, + "description": "CanVote, whether this member has voting rights", + "type": "boolean" + }, + "isLeader": { + "default": false, + "description": "IsLeader, whether this member is the leader", + "type": "boolean" + }, + "name": { + "default": "leader", + "description": "Name, role name.", + "type": "string" + } + }, + "required": [ + "accessMode", + "name" + ], + "type": "object" + } + }, + "required": [ + "podName", + "role" + ], + "type": "object" + }, + "type": "array" + }, + "message": { + "additionalProperties": { + "type": "string" + }, + "description": "message records the component details message in current phase. Keys are podName or deployName or statefulSetName. The format is `ObjectKind/Name`.", + "type": "object" + }, + "phase": { + "description": "phase describes the phase of the component and the detail information of the phases are as following: Creating: `Creating` is a special `Updating` with previous phase `empty`(means \"\") or `Creating`. Running: component replicas > 0 and all pod specs are latest with a Running state. Updating: component replicas > 0 and has no failed pods. the component is being updated. Abnormal: component replicas > 0 but having some failed pods. the component basically works but in a fragile state. Failed: component replicas > 0 but having some failed pods. the component doesn't work anymore. Stopping: component replicas = 0 and has terminating pods. Stopped: component replicas = 0 and all pods have been deleted. Deleting: the component is being deleted.", + "enum": [ + "Creating", + "Running", + "Updating", + "Stopping", + "Stopped", + "Deleting", + "Failed", + "Abnormal" + ], + "type": "string" + }, + "podsReady": { + "description": "podsReady checks if all pods of the component are ready.", + "type": "boolean" + }, + "podsReadyTime": { + "description": "podsReadyTime what time point of all component pods are ready, this time is the ready time of the last component pod.", + "format": "date-time", + "type": "string" + }, + "replicationSetStatus": { + "description": "replicationSetStatus specifies the mapping of role and pod name.", + "properties": { + "primary": { + "description": "Primary status.", + "properties": { + "pod": { + "default": "Unknown", + "description": "Pod name.", + "type": "string" + } + }, + "required": [ + "pod" + ], + "type": "object" + }, + "secondaries": { + "description": "Secondaries status.", + "items": { + "properties": { + "pod": { + "default": "Unknown", + "description": "Pod name.", + "type": "string" + } + }, + "required": [ + "pod" + ], + "type": "object" + }, + "type": "array" + } + }, + "required": [ + "primary" + ], + "type": "object" + } + }, + "type": "object" + }, + "description": "components record the current status information of all components of the cluster.", + "type": "object" + }, + "conditions": { + "description": "Describe current state of cluster API Resource, like warning.", + "items": { + "description": "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, \n type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }", + "properties": { + "lastTransitionTime": { + "description": "lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.", + "format": "date-time", + "type": "string" + }, + "message": { + "description": "message is a human readable message indicating details about the transition. This may be an empty string.", + "maxLength": 32768, + "type": "string" + }, + "observedGeneration": { + "description": "observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.", + "format": "int64", + "minimum": 0, + "type": "integer" + }, + "reason": { + "description": "reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.", + "maxLength": 1024, + "minLength": 1, + "pattern": "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$", + "type": "string" + }, + "status": { + "description": "status of the condition, one of True, False, Unknown.", + "enum": [ + "True", + "False", + "Unknown" + ], + "type": "string" + }, + "type": { + "description": "type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)", + "maxLength": 316, + "pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$", + "type": "string" + } + }, + "required": [ + "lastTransitionTime", + "message", + "reason", + "status", + "type" + ], + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "message describes cluster details message in current phase.", + "type": "string" + }, + "observedGeneration": { + "description": "observedGeneration is the most recent generation observed for this Cluster. It corresponds to the Cluster's generation, which is updated on mutation by the API Server.", + "format": "int64", + "type": "integer" + }, + "phase": { + "description": "phase describes the phase of the Cluster, the detail information of the phases are as following: Creating: all components are in `Creating` phase. Running: all components are in `Running` phase, means the cluster is working well. Updating: all components are in `Creating`, `Running` or `Updating` phase, and at least one component is in `Creating` or `Updating` phase, means the cluster is doing an update. Stopping: at least one component is in `Stopping` phase, means the cluster is in a stop progress. Stopped: all components are in 'Stopped` phase, means the cluster has stopped and didn't provide any function anymore. Failed: all components are in `Failed` phase, means the cluster is unavailable. Abnormal: some components are in `Failed` or `Abnormal` phase, means the cluster in a fragile state. troubleshoot need to be done. Deleting: the cluster is being deleted.", + "enum": [ + "Creating", + "Running", + "Updating", + "Stopping", + "Stopped", + "Deleting", + "Failed", + "Abnormal" + ], + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + } + }, + "served": true, + "storage": true, + "subresources": { + "status": {} + } + } + ] + }, + "status": { + "acceptedNames": { + "categories": [ + "kubeblocks", + "all" + ], + "kind": "Cluster", + "listKind": "ClusterList", + "plural": "clusters", + "singular": "cluster" + }, + "conditions": [ + { + "lastTransitionTime": "2024-02-23T18:50:48Z", + "message": "no conflicts found", + "reason": "NoConflicts", + "status": "True", + "type": "NamesAccepted" + }, + { + "lastTransitionTime": "2024-02-23T18:50:49Z", + "message": "the initial names have been accepted", + "reason": "InitialNamesAccepted", + "status": "True", + "type": "Established" + } + ], + "storedVersions": [ + "v1alpha1" + ] + } + }, + "group": "apps.kubeblocks.io", + "plural": "clusters", + "version": "v1alpha1" + }, + "learnrun_time": 393.4551455974579, + "namespace": "acto-namespace", + "preload_images": [ + "infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks:0.8.1", + "infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/spilo:14.8.0-pgvector-v0.5.0", + "infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-dataprotection:0.8.1", + "infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/snapshot-controller:v6.2.1", + "infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-tools:0.8.1", + "infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1", + "infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/pgbouncer:1.19.0", + "infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/agamotto:0.1.2-beta.1", + "infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-datascript:0.8.1" + ], + "static_analysis_time": 6.4373016357421875e-06 +} \ No newline at end of file diff --git a/data/kubeblocks-postgresql-operator/kubeblocks-postgresql-config.json b/data/kubeblocks-postgresql-operator/kubeblocks-postgresql-config.json new file mode 100644 index 0000000000..18655fdd38 --- /dev/null +++ b/data/kubeblocks-postgresql-operator/kubeblocks-postgresql-config.json @@ -0,0 +1,26 @@ +{ + "deploy": { + "steps": [ + { + "create": { + "file": "data/kubeblocks-postgresql-operator/kubeblocks_crds.yaml", + "namespace": null + } + }, + { + "wait": { + "duration": 10 + } + }, + { + "apply": { + "file": "data/kubeblocks-postgresql-operator/kubeblocks_manifest.yaml", + "operator": true, + "namespace": "acto-namespace" + } + } + ] + }, + "crd_name": "clusters.apps.kubeblocks.io", + "seed_custom_resource": "data/kubeblocks-postgresql-operator/kubeblocks_psql.yaml" +} diff --git a/data/kubeblocks-postgresql-operator/kubeblocks-postgresql-cr.yaml b/data/kubeblocks-postgresql-operator/kubeblocks-postgresql-cr.yaml new file mode 100644 index 0000000000..f28b12ee2d --- /dev/null +++ b/data/kubeblocks-postgresql-operator/kubeblocks-postgresql-cr.yaml @@ -0,0 +1,44 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: Cluster +metadata: + name: test-cluster + namespace: acto-namespace + labels: + helm.sh/chart: postgresql-cluster-0.6.0-alpha.36 + app.kubernetes.io/version: "14.8.0" + app.kubernetes.io/instance: pg +spec: + clusterVersionRef: postgresql-14.8.0 + terminationPolicy: Delete + affinity: + podAntiAffinity: Preferred + topologyKeys: + - kubernetes.io/hostname + tenancy: SharedNode + clusterDefinitionRef: postgresql + componentSpecs: + - name: postgresql + componentDefRef: postgresql + monitor: false + replicas: 1 + enabledLogs: + - running + serviceAccountName: kb-pg + switchPolicy: + type: Noop + resources: + limits: + cpu: "0.5" + memory: "0.5Gi" + requests: + cpu: "0.5" + memory: "0.5Gi" + volumeClaimTemplates: + - name: data # ref clusterDefinition components.containers.volumeMounts.name + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20Gi + services: diff --git a/data/kubeblocks-postgresql-operator/kubeblocks.yaml b/data/kubeblocks-postgresql-operator/kubeblocks.yaml new file mode 100644 index 0000000000..dd46b7bfce --- /dev/null +++ b/data/kubeblocks-postgresql-operator/kubeblocks.yaml @@ -0,0 +1,4400 @@ +--- +# Source: kubeblocks/templates/serviceaccount.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: kubeblocks + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +--- +# Source: kubeblocks/templates/serviceaccount.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: kubeblocks-addon-installer + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +--- +# Source: kubeblocks/templates/cloud-provider-secret.yaml +apiVersion: v1 +kind: Secret +metadata: + name: kubeblocks-cloud-provider + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +stringData: + csi-s3: | + secret: + accessKey: + secretKey: + region: + cloudProvider: + storageClass: + bucket: +--- +# Source: kubeblocks/templates/secret.yaml +apiVersion: v1 +kind: Secret +metadata: + name: kubeblocks-secret + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +type: Opaque +stringData: + dataProtectionEncryptionKey: kubeblocks-dp-aes256 +--- +# Source: kubeblocks/templates/applications/alertmanager-webhook-adaptor-values.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: alertmanager-webhook-adaptor-chart-kubeblocks-values + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +data: + values-kubeblocks-override.yaml: |- + affinity: + nodeAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - preference: + matchExpressions: + - key: kb-controller + operator: In + values: + - "true" + weight: 100 + configFiles: + config.yaml: {} + configMapOverrideName: config + image: + registry: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com +--- +# Source: kubeblocks/templates/applications/apecloud-otel-collector-values.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: apecloud-otel-collector-chart-kubeblocks-values + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +data: + values-kubeblocks-override.yaml: |- + enabled: false + image: + registry: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com +--- +# Source: kubeblocks/templates/applications/aws-loadbalancer-controller-values.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: aws-load-balancer-controller-chart-kubeblocks-values + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +data: + values-kubeblocks-override.yaml: |- + affinity: + nodeAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - preference: + matchExpressions: + - key: kb-controller + operator: In + values: + - "true" + weight: 100 + clusterName: "" + enabled: false + replicaCount: 1 + serviceAccount: + create: true + name: kubeblocks-service-account-aws-load-balancer-controller + tolerations: + - effect: NoSchedule + key: kb-controller + operator: Equal + value: "true" +--- +# Source: kubeblocks/templates/applications/csi-hostpath-driver-values.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: csi-hostpath-driver-chart-kubeblocks-values + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +data: + values-kubeblocks-override.yaml: |- + enabled: false + storageClass: + create: true + default: true +--- +# Source: kubeblocks/templates/applications/external-dns-values.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: external-dns-chart-kubeblocks-values + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +data: + values-kubeblocks-override.yaml: |- + domain: kubeblocks.io + enabled: false + tolerations: + - effect: NoSchedule + key: kb-controller + operator: Equal + value: "true" +--- +# Source: kubeblocks/templates/applications/grafana-values.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: grafana-chart-kubeblocks-values + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +data: + values-kubeblocks-override.yaml: |- + adminPassword: kubeblocks + adminUser: admin + affinity: + nodeAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - preference: + matchExpressions: + - key: kb-controller + operator: In + values: + - "true" + weight: 100 + defaultDashboardsTimezone: null + enabled: false + grafana.ini: + auth.anonymous: + enabled: true + hide_version: true + auth.basic: + enabled: false + image: + repository: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/grafana + tag: 9.2.4 + ingress: + annotations: {} + enabled: false + extraPaths: [] + hosts: + - chart-example.local + labels: {} + path: / + pathType: Prefix + tls: [] + rbac: + pspEnabled: false + replicas: 1 + resources: {} + service: + annotations: {} + appProtocol: "" + enabled: true + labels: {} + port: 80 + portName: service + targetPort: 3000 + type: ClusterIP + sidecar: + dashboards: + enabled: true + label: grafana_dashboard + labelValue: "1" + resource: configmap + searchNamespace: ALL + datasources: + defaultDatasourceEnabled: true + enabled: true + initDatasources: true + label: grafana_datasource + labelValue: "1" + resource: configmap + searchNamespace: ALL + skipReload: false + uid: prometheus + image: + repository: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/k8s-sidecar + tag: 1.19.2 + testFramework: + enabled: false + tolerations: + - effect: NoSchedule + key: kb-controller + operator: Equal + value: "true" +--- +# Source: kubeblocks/templates/applications/loki-values.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: loki-chart-kubeblocks-values + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +data: + values-kubeblocks-override.yaml: |- + enabled: false + loki: + auth_enabled: false + commonConfig: + replication_factor: 1 + compactor: + compaction_interval: 10m + delete_request_cancel_period: 2h + retention_delete_delay: 2h + retention_delete_worker_count: 150 + retention_enabled: true + shared_store: filesystem + working_directory: /var/loki/retention + limits_config: + max_query_lookback: 72h + retention_period: 72h + podSecurityContext: + runAsNonRoot: false + runAsUser: 0 + storage: + type: filesystem + monitoring: + dashboards: + enabled: false + lokiCanary: + enabled: false + rules: + enabled: false + selfMonitoring: + enabled: false + grafanaAgent: + installOperator: false + serviceMonitor: + enabled: false + singleBinary: + replicas: 1 + test: + enabled: false +--- +# Source: kubeblocks/templates/applications/prometheus-values.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: prometheus-chart-kubeblocks-values + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +data: + values-kubeblocks-override.yaml: |- + # set prometheus.alertmanager.image.repository + # set prometheus.nodeExporter.image.repository + # set prometheus configmapReload prometheus and alertmanager image.repository + # set prometheus.server.image.repository + alertmanager: + affinity: + nodeAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - preference: + matchExpressions: + - key: kb-controller + operator: In + values: + - "true" + weight: 100 + configMapOverrideName: alertmanager-config + containerSecurityContext: + allowPrivilegeEscalation: false + enabled: true + image: + repository: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/alertmanager + tag: v0.24.0 + ingress: + annotations: {} + enabled: false + extraLabels: {} + extraPaths: [] + hosts: [] + path: / + pathType: Prefix + tls: [] + persistentVolume: + enabled: false + size: 1Gi + replicaCount: 1 + resources: {} + securityContext: + fsGroup: 65534 + runAsGroup: 65534 + runAsNonRoot: false + runAsUser: 0 + service: + annotations: {} + clusterIP: "" + externalIPs: [] + labels: {} + loadBalancerIP: "" + loadBalancerSourceRanges: [] + servicePort: 80 + sessionAffinity: None + type: ClusterIP + statefulSet: + enabled: true + headless: + enableMeshPeer: true + tolerations: + - effect: NoSchedule + key: kb-controller + operator: Equal + value: "true" + alertmanagerFiles: + alertmanager.yml: + global: {} + receivers: + - name: default-receiver + route: + group_interval: 30s + group_wait: 5s + receiver: default-receiver + repeat_interval: 10m + configmapReload: + alertmanager: + image: + repository: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/configmap-reload + tag: v0.5.0 + prometheus: + image: + repository: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/configmap-reload + tag: v0.5.0 + enabled: false + kubeStateMetrics: + enabled: false + nodeExporter: + enabled: false + image: + repository: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/node-exporter + tag: v1.3.1 + pushgateway: + enabled: false + ruleFiles: + kafka_alert_rules.yaml: |- + group: + - name: KafkaExporter + rules: + - alert: KafkaTopicsReplicas + expr: 'sum(kafka_topic_partition_in_sync_replica) by (topic) < 3' + for: 0m + labels: + severity: critical + annotations: + summary: 'Kafka topics replicas (instance {{ $labels.app_kubernetes_io_instance }})' + description: 'Kafka topic in-sync partition\n VALUE = {{ $value }}\n LABELS = {{ $labels }}' + - alert: KafkaConsumersGroup + expr: 'sum(kafka_consumergroup_lag) by (consumergroup) > 50' + for: 1m + labels: + severity: critical + annotations: + summary: 'Kafka consumers group (instance {{ $labels.app_kubernetes_io_instance }})' + description: 'Kafka consumers group\n VALUE = {{ $value }}\n LABELS = {{ $labels }}' + - alert: KafkaBrokerDown + expr: 'kafka_brokers < 3' + for: 0m + labels: + severity: critical + annotations: + Summary: 'Kafka broker *{{ $labels.app_kubernetes_io_instance }}* alert status' + description: 'One of the Kafka broker *{{ $labels.app_kubernetes_io_instance }}* is down.' + kubelet_alert_rules.yml: | + groups: + - name: KubeletSummary + rules: + - alert: ContainerCpuUsageWarning + expr: 'rate(container_cpu_time_seconds_total[2m]) / container_cpu_limit * 100 > 70' + for: 2m + labels: + severity: warning + annotations: + summary: 'Container CPU usage is high (> 70%)' + description: 'Container CPU usage is {{ $value | printf "%.2f" }} percent. (pod: {{ $labels.k8s_pod_name }}, container: {{ $labels.k8s_container_name }})' + + - alert: ContainerCpuUsageCritical + expr: 'rate(container_cpu_time_seconds_total[2m]) / container_cpu_limit * 100 > 90' + for: 1m + labels: + severity: critical + annotations: + summary: 'Container CPU usage is very high (> 90%)' + description: 'Container CPU usage is {{ $value | printf "%.2f" }} percent. (pod: {{ $labels.k8s_pod_name }}, container: {{ $labels.k8s_container_name }})' + + - alert: ContainerMemoryUsage + expr: 'container_memory_working_set_bytes / container_memory_limit_bytes * 100 > 90' + for: 2m + labels: + severity: warning + annotations: + summary: 'Container Memory usage is high (> 90%)' + description: 'Container Memory usage is {{ $value | printf "%.2f" }} percent. (pod: {{ $labels.k8s_pod_name }}, container: {{ $labels.k8s_container_name }})' + + - alert: ContainerMemoryUsagePredict + expr: 'predict_linear(container_memory_working_set_bytes[15m], 30*60) - container_memory_limit_bytes > 0' + for: 5m + labels: + severity: critical + annotations: + summary: 'Container Memory predict usage may exceed the limit 30 minutes later' + description: 'Container Memory predict usage may exceed the limit 30 minutes later, the predict value is {{ $value | humanize1024 }}. (pod: {{ $labels.k8s_pod_name }}, container: {{ $labels.k8s_container_name }})' + + - alert: ContainerVolumeUsage + expr: '(k8s_volume_capacity_bytes - k8s_volume_available_bytes) / k8s_volume_capacity_bytes * 100 > 90' + for: 2m + labels: + severity: warning + annotations: + summary: 'Volume usage is high (> 90%)' + description: 'Volume usage is {{ $value | printf "%.2f" }} percent. (pod: {{ $labels.k8s_pod_name }}, volume: {{ $labels.k8s_volume_name }})' + mongodb_alert_rules.yml: "groups:\n - name: MongodbExporter\n rules:\n - + alert: MongodbDown\n expr: 'max_over_time(mongodb_up[1m]) == 0'\n for: + 0m\n labels:\n severity: critical\n annotations:\n summary: + 'MongoDB is Down'\n description: 'MongoDB instance is down\\n VALUE + = {{ $value }}\\n LABELS = {{ $labels }}'\n\n - alert: MongodbRestarted\n + \ expr: 'mongodb_instance_uptime_seconds < 60'\n for: 0m\n labels:\n + \ severity: info\n annotations:\n summary: 'Mongodb has + just been restarted (< 60s)'\n description: 'Mongodb has just been restarted + {{ $value | printf \"%.1f\" }} seconds ago\\n LABELS = {{ $labels }}'\n\n - + alert: MongodbReplicaMemberUnhealthy\n expr: 'max_over_time(mongodb_rs_members_health[1m]) + == 0'\n for: 0m\n labels:\n severity: critical\n annotations:\n + \ summary: 'Mongodb replica member is unhealthy'\n description: + 'MongoDB replica member is not healthy\\n VALUE = {{ $value }}\\n LABELS = {{ + $labels }}'\n\n - alert: MongodbReplicationLag\n expr: '(mongodb_rs_members_optimeDate{member_state=\"PRIMARY\"} + - on (pod) group_right mongodb_rs_members_optimeDate{member_state=\"SECONDARY\"}) + / 1000 > 10'\n for: 0m\n labels:\n severity: critical\n + \ annotations:\n summary: 'MongoDB replication lag (> 10s)'\n description: + 'Mongodb replication lag is more than 10s\\n VALUE = {{ $value }}\\n LABELS + = {{ $labels }}'\n\n - alert: MongodbReplicationHeadroom\n expr: 'sum(avg(mongodb_mongod_replset_oplog_head_timestamp + - mongodb_mongod_replset_oplog_tail_timestamp)) - sum(avg(mongodb_rs_members_optimeDate{member_state=\"PRIMARY\"} + - on (pod) group_right mongodb_rs_members_optimeDate{member_state=\"SECONDARY\"})) + <= 0'\n for: 0m\n labels:\n severity: critical\n annotations:\n + \ summary: 'MongoDB replication headroom (< 0)'\n description: + 'MongoDB replication headroom is <= 0\\n VALUE = {{ $value }}\\n LABELS = {{ + $labels }}'\n\n - alert: MongodbNumberCursorsOpen\n expr: 'mongodb_ss_metrics_cursor_open{csr_type=\"total\"} + > 10 * 1000'\n for: 2m\n labels:\n severity: warning\n + \ annotations:\n summary: 'MongoDB opened cursors num (> 10k)'\n + \ description: 'Too many cursors opened by MongoDB for clients (> 10k)\\n + \ VALUE = {{ $value }}\\n LABELS = {{ $labels }}'\n\n - alert: MongodbCursorsTimeouts\n + \ expr: 'increase(mongodb_ss_metrics_cursor_timedOut[1m]) > 100'\n for: + 2m\n labels:\n severity: warning\n annotations:\n summary: + 'MongoDB cursors timeouts (>100/minute)' \n description: 'Too many cursors + are timing out (> 100/minute)\\n VALUE = {{ $value }}\\n LABELS = {{ $labels + }}'\n\n - alert: MongodbTooManyConnections\n expr: 'avg by(pod) (rate(mongodb_ss_connections{conn_type=\"current\"}[1m])) + / avg by(pod) (sum (mongodb_ss_connections) by(pod)) * 100 > 80'\n for: + 2m\n labels:\n severity: warning\n annotations:\n summary: + 'MongoDB too many connections (> 80%)'\n description: 'Too many connections + (> 80%)\\n VALUE = {{ $value }}\\n LABELS = {{ $labels }}'\n\n - alert: + MongodbVirtualMemoryUsage\n expr: '(sum(mongodb_ss_mem_virtual) BY (pod) + / sum(mongodb_ss_mem_resident) BY (pod)) > 100'\n for: 2m\n labels:\n + \ severity: warning\n annotations:\n summary: MongoDB + virtual memory usage high\n description: \"High memory usage: the quotient + of (mem_virtual / mem_resident) is more than 100\\n VALUE = {{ $value }}\\n LABELS + = {{ $labels }}\"" + mysql_alert_rules.yml: | + groups: + - name: MysqldExporter + rules: + - alert: MysqlDown + expr: 'max_over_time(mysql_up[1m]) == 0' + for: 0m + labels: + severity: critical + annotations: + summary: 'MySQL is down' + description: 'MySQL is down. (instance: {{ $labels.pod }})' + + - alert: MysqlRestarted + expr: 'mysql_global_status_uptime < 60' + for: 0m + labels: + severity: info + annotations: + summary: 'MySQL has just been restarted (< 60s)' + description: 'MySQL has just been restarted {{ $value | printf "%.1f" }} seconds ago. (instance: {{ $labels.pod }})' + + - alert: MysqlTooManyConnections + expr: 'sum(max_over_time(mysql_global_status_threads_connected[1m]) / mysql_global_variables_max_connections) BY (namespace,app_kubernetes_io_instance,pod) * 100 > 80' + for: 2m + labels: + severity: warning + annotations: + summary: 'MySQL has too many connections (> 80%)' + description: '{{ $value | printf "%.2f" }} percent of MySQL connections are in use. (instance: {{ $labels.pod }})' + + - alert: MysqlConnectionErrors + expr: 'sum(increase(mysql_global_status_connection_errors_total[1m])) BY (namespace,app_kubernetes_io_instance,pod) > 0' + for: 2m + labels: + severity: warning + annotations: + summary: 'MySQL connection errors' + description: 'MySQL has connection errors and the value is {{ $value | printf "%.2f" }}. (instance: {{ $labels.pod }})' + + - alert: MysqlHighThreadsRunning + expr: 'sum(max_over_time(mysql_global_status_threads_running[1m]) / mysql_global_variables_max_connections) BY (namespace,app_kubernetes_io_instance,pod) * 100 > 60' + for: 2m + labels: + severity: warning + annotations: + summary: 'MySQL high threads running (> 60%)' + description: '{{ $value | printf "%.2f" }} percent of MySQL connections are in running state. (instance: {{ $labels.pod }})' + + - alert: MysqlSlowQueries + expr: 'sum(increase(mysql_global_status_slow_queries[1m])) BY (namespace,app_kubernetes_io_instance,pod) > 0' + for: 2m + labels: + severity: info + annotations: + summary: 'MySQL slow queries' + description: 'MySQL server has {{ $value | printf "%.2f" }} slow query. (instance: {{ $labels.pod }})' + + - alert: MysqlInnodbLogWaits + expr: 'sum(rate(mysql_global_status_innodb_log_waits[5m])) BY (namespace,app_kubernetes_io_instance,pod) > 10' + for: 2m + labels: + severity: warning + annotations: + summary: 'MySQL InnoDB log waits (> 10)' + description: 'MySQL innodb log writes stalling and the value is {{ $value | printf "%.2f" }}. (instance: {{ $labels.pod }})' + + - alert: MysqlInnodbBufferPoolHits + expr: 'sum(rate(mysql_global_status_innodb_buffer_pool_reads[5m]) / rate(mysql_global_status_innodb_buffer_pool_read_requests[5m])) BY (namespace,app_kubernetes_io_instance,pod) * 100 > 5' + for: 2m + labels: + severity: warning + annotations: + summary: 'MySQL InnoDB high read requests rate hitting disk (> 5%)' + description: 'High number of logical reads that InnoDB could not satisfy from the buffer pool, and had to read directly from disk. The value is {{ $value | printf "%.2f" }} percent. (instance: {{ $labels.pod }})' + postgresql_alert_rules.yml: | + groups: + - name: PostgreSQLExporter + rules: + - alert: PostgreSQLDown + expr: 'max_over_time(pg_up[1m]) == 0' + for: 0m + labels: + severity: critical + annotations: + summary: 'PostgreSQL is down' + description: 'PostgreSQL is down. (instance: {{ $labels.pod }})' + + - alert: PostgreSQLRestarted + expr: 'time() - pg_postmaster_start_time_seconds < 60' + for: 0m + labels: + severity: info + annotations: + summary: 'PostgreSQL has just been restarted (< 60s)' + description: 'PostgreSQL has just been restarted {{ $value | printf "%.1f" }} seconds ago. (instance: {{ $labels.pod }})' + + - alert: PostgreSQLExporterError + expr: 'pg_exporter_last_scrape_error > 0' + for: 0m + labels: + severity: warning + annotations: + summary: 'PostgreSQL exporter scrape error' + description: 'PostgreSQL exporter has {{ $value | printf "%.2f" }} scrape errors. A query may be buggy in query.yaml. (instance: {{ $labels.pod }})' + + - alert: PostgreSQLTooManySlowQueries + expr: | + max by(namespace,app_kubernetes_io_instance,pod,datname) ( + max_over_time(pg_stat_activity_max_tx_duration{datname!~"template.*"}[2m]) + ) > 60 + for: 2m + labels: + severity: warning + annotations: + summary: 'PostgreSQL database has high number of slow queries' + description: 'PostgreSQL database has slow queries and the value is {{ $value | printf "%.2f" }}. (instance: {{ $labels.pod }}, database: {{ $labels.datname }})' + + - alert: PostgreSQLTooManyConnections + expr: | + sum by (namespace,app_kubernetes_io_instance,pod) (pg_stat_activity_count{datname!~"template.*"}) + > on(namespace,app_kubernetes_io_instance,pod) + (pg_settings_max_connections - pg_settings_superuser_reserved_connections) * 0.8 + for: 2m + labels: + severity: warning + annotations: + summary: 'PostgreSQL too many connections (> 80%)' + description: 'PostgreSQL has too many connections and the value is {{ $value | printf "%.2f" }} percent. (instance: {{ $labels.pod }})' + + - alert: PostgreSQLDeadLocks + expr: 'increase(pg_stat_database_deadlocks_total{datname!~"template.*", datname!=""}[2m]) > 5' + for: 2m + labels: + severity: warning + annotations: + summary: 'PostgreSQL database has dead locks (> 5)' + description: 'PostgreSQL database has {{ $value | printf "%.2f"}} dead locks. (instance: {{ $labels.pod }}, database: {{ $labels.datname }})' + + - alert: PostgreSQLHighRollbackRate + expr: | + rate(pg_stat_database_xact_rollback_total{datname!~"template.*", datname!=""}[2m]) + / + rate(pg_stat_database_xact_commit_total{datname!~"template.*", datname!=""}[2m]) + > 0.1 + for: 2m + labels: + severity: warning + annotations: + summary: 'PostgreSQL database has high rollback rate (> 10%)' + description: 'Ratio of transactions being aborted compared to committed is {{ $value | printf "%.2f"}} percent. (instance: {{ $labels.pod }}, database: {{ $labels.datname }})' + + - alert: PostgreSQLTooManyLocksAcquired + expr: | + sum by (namespace,app_kubernetes_io_instance,pod) (pg_locks_count) + / on(namespace,app_kubernetes_io_instance,pod) + (pg_settings_max_locks_per_transaction * pg_settings_max_connections) + > 0.2 + for: 2m + labels: + severity: warning + annotations: + summary: 'PostgreSQL has too many locks acquired (> 20%)' + description: 'Too many locks acquired on the database and the value is {{ $value | printf "%.2f" }} percent. (instance: {{ $labels.pod }})' + + - alert: PostgreSQLCacheHitRatio + expr: | + avg by (namespace,app_kubernetes_io_instance,pod,datname) ( + rate(pg_stat_database_blks_hit_total{datname!~"template.*", datname!=""}[2m]) + / + ( + rate( + pg_stat_database_blks_hit_total{datname!~"template.*", datname!=""}[2m] + ) + + + rate( + pg_stat_database_blks_read_total{datname!~"template.*", datname!=""}[2m] + ) + ) + ) < 0.9 + for: 2m + labels: + severity: warning + annotations: + summary: 'PostgreSQL database has low cache hit rate (< 90%)' + description: 'Low cache hit rate and the value is {{ $value | printf "%.2f" }} percent. (instance: {{ $labels.pod }}, database: {{ $labels.datname }})' + + - alert: PostgreSQLMaxWriteBufferReached + expr: 'rate(pg_stat_bgwriter_maxwritten_clean_total[2m]) > 0' + for: 2m + labels: + severity: warning + annotations: + summary: 'PostgreSQL write buffers reached max' + description: 'PostgreSQL background writer stops for max and the value is {{ $value | printf "%.2f" }}. (instance: {{ $labels.pod }})' + + - alert: PostgreSQLHighWALFilesArchiveErrorRate + expr: | + rate(pg_stat_archiver_failed_count_total[2m]) + / ( + rate(pg_stat_archiver_archived_count_total[2m]) + rate(pg_stat_archiver_failed_count_total[2m]) + ) > 0.1 + for: 2m + labels: + severity: warning + annotations: + summary: 'PostgreSQL has high error rate in WAL files archiver(> 10%)' + description: 'PostgreSQL high error rate in WAL files archiver and the value is {{ $value | printf "%.2f" }} percent. (instance: {{ $labels.pod }})' + + - alert: PostgreSQLTableNotAutoVacuumed + expr: | + (pg_stat_user_tables_last_autovacuum > 0) + and + (time() - pg_stat_user_tables_last_autovacuum) + > 24 * 60 * 60 * 10 + for: 0m + labels: + severity: warning + annotations: + summary: 'PostgreSQL table in database has not been auto vacuumed for 10 days' + description: 'Table {{ $labels.relname }} in database has not been auto vacuumed for 10 days. (instance: {{ $labels.pod }}, database: {{ $labels.datname }})' + + - alert: PostgreSQLTableNotAutoAnalyzed + expr: | + (pg_stat_user_tables_last_autoanalyze > 0) + and + (time() - pg_stat_user_tables_last_autoanalyze) + > 24 * 60 * 60 * 10 + for: 0m + labels: + severity: warning + annotations: + summary: 'PostgreSQL table in database has not been auto analyzed for 10 days' + description: 'Table {{ $labels.relname }} in database has not been auto analyzed for 10 days. (instance: {{ $labels.pod }}, database: {{ $labels.datname }})' + + - alert: PostgreSQLTableTooManyDeadTuples + expr: | + (pg_stat_user_tables_n_dead_tup > 10000) + / + (pg_stat_user_tables_n_live_tup + pg_stat_user_tables_n_dead_tup) + >= 0.1 + for: 2m + labels: + severity: warning + annotations: + summary: 'PostgreSQL table in database has too many dead tuples (> 10%)' + description: 'Table {{ $labels.relname }} in database dead tuples is too large and the value is {{ $value | printf "%.2f" }} percent. (instance: {{ $labels.pod }}, database: {{ $labels.datname }})' + redis_alert_rules.yml: | + groups: + - name: RedisExporter + rules: + - alert: RedisDown + expr: 'redis_up == 0' + for: 5m + labels: + severity: critical + annotations: + summary: 'Redis is down' + description: 'Redis is down. (instance: {{ $labels.pod }})' + + - alert: RedisCPUHigh + expr: '(rate(redis_cpu_sys_seconds_total[1m]) + rate(redis_cpu_user_seconds_total[1m])) * 100 > 80' + for: 2m + labels: + severity: warning + annotations: + summary: 'Out of CPU (> 80%)' + description: 'Redis is running out of CPU and the value is {{ $value | printf "%.2f" }} percent. (instance: {{ $labels.pod }})' + + - alert: RedisMemoryHigh + expr: '(redis_memory_max_bytes == 0 or redis_memory_used_bytes * 100 / redis_memory_max_bytes) > 90' + for: 5m + labels: + severity: warning + annotations: + summary: 'Out of memory (> 90%)' + description: 'Redis is running out of memory and the value is {{ $value | printf "%.2f" }} percent. (instance: {{ $labels.pod }})' + + - alert: RedisTooManyConnections + expr: 'redis_connected_clients * 100 / redis_config_maxclients > 80' + for: 1m + labels: + severity: warning + annotations: + summary: 'Redis has too many connections (> 80%)' + description: 'Redis has too many connections and the value is {{ $value | printf "%.2f" }} percent. (instance: {{ $labels.pod }})' + + - alert: RedisRejectedConnections + expr: 'increase(redis_rejected_connections_total[1m]) > 0' + for: 5m + labels: + severity: error + annotations: + summary: 'Redis has rejected connections' + description: '{{ $value | printf "%.2f" }} connections to Redis has been rejected. (instance: {{ $labels.pod }})' + + - alert: RedisKeyEviction + expr: 'increase(redis_evicted_keys_total[5m]) > 0' + for: 1s + labels: + severity: error + annotations: + summary: 'Redis has evicted keys' + description: 'Redis has evicted keys in the last 5 minutes and the value is {{ $value | printf "%.2f" }}. (instance: {{ $labels.pod }})' + + - alert: RedisMissingMaster + expr: 'count by (app_kubernetes_io_instance) (redis_instance_info{role="master"}) < 1' + for: 30s + labels: + severity: critical + annotations: + summary: 'Redis missing master' + description: 'Redis cluster has no node marked as master.' + + - alert: RedisDisconnectedSlaves + expr: 'count without (instance, job) (redis_connected_slaves) - sum without (instance, job) (redis_connected_slaves) - 1 > 1' + for: 0m + labels: + severity: critical + annotations: + summary: 'Redis disconnected slaves' + description: 'Redis not replicating for all slaves. Consider reviewing the redis replication status. (instance: {{ $labels.pod }})' + + - alert: RedisReplicationBroken + expr: 'delta(redis_connected_slaves[1m]) < 0' + for: 0m + labels: + severity: critical + annotations: + summary: 'Redis replication broken' + description: 'Redis instance lost a slave. (instance: {{ $labels.pod }})' + server: + affinity: + nodeAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - preference: + matchExpressions: + - key: kb-controller + operator: In + values: + - "true" + weight: 100 + containerSecurityContext: + allowPrivilegeEscalation: false + enabled: true + extraArgs: + enable-feature: memory-snapshot-on-shutdown + log.level: info + storage.tsdb.min-block-duration: 30m + storage.tsdb.retention.size: 10GB + extraFlags: + - web.enable-lifecycle + - web.enable-remote-write-receiver + global: + evaluation_interval: 15s + scrape_interval: 15s + scrape_timeout: 10s + image: + repository: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/prometheus + tag: v2.44.0 + ingress: + annotations: {} + enabled: false + extraLabels: {} + extraPaths: [] + hosts: [] + path: / + pathType: Prefix + tls: [] + persistentVolume: + enabled: false + size: 20Gi + remoteWrite: [] + replicaCount: 1 + resources: {} + retention: 2d + routePrefix: / + securityContext: + fsGroup: 65534 + runAsGroup: 65534 + runAsNonRoot: false + runAsUser: 0 + service: + annotations: {} + clusterIP: "" + enabled: true + externalIPs: [] + gRPC: + enabled: false + servicePort: 10901 + labels: {} + loadBalancerIP: "" + loadBalancerSourceRanges: [] + servicePort: 80 + sessionAffinity: None + statefulsetReplica: + enabled: false + replica: 0 + type: ClusterIP + statefulSet: + enabled: true + tolerations: + - effect: NoSchedule + key: kb-controller + operator: Equal + value: "true" + serverFiles: + prometheus.yml: + rule_files: + - /etc/config/recording_rules.yml + - /etc/config/alerting_rules.yml + - /etc/config/kubelet_alert_rules.yml + - /etc/config/mysql_alert_rules.yml + - /etc/config/postgresql_alert_rules.yml + - /etc/config/redis_alert_rules.yml + - /etc/config/kafka_alert_rules.yml + - /etc/config/mongodb_alert_rules.yml + scrape_configs: + - job_name: prometheus + static_configs: + - targets: + - localhost:9090 + - honor_labels: true + job_name: kubeblocks-service + kubernetes_sd_configs: + - role: endpoints + relabel_configs: + - action: keep + regex: kubeblocks + source_labels: + - __meta_kubernetes_service_label_app_kubernetes_io_managed_by + - action: drop + regex: agamotto + source_labels: + - __meta_kubernetes_service_label_monitor_kubeblocks_io_managed_by + - action: keep + regex: true + source_labels: + - __meta_kubernetes_service_annotation_monitor_kubeblocks_io_scrape + - action: replace + regex: (https?) + source_labels: + - __meta_kubernetes_service_annotation_monitor_kubeblocks_io_scheme + target_label: __scheme__ + - action: replace + regex: (.+) + source_labels: + - __meta_kubernetes_service_annotation_monitor_kubeblocks_io_path + target_label: __metrics_path__ + - action: replace + regex: (.+?)(?::\d+)?;(\d+) + replacement: $1:$2 + source_labels: + - __address__ + - __meta_kubernetes_service_annotation_monitor_kubeblocks_io_port + target_label: __address__ + - action: labelmap + regex: __meta_kubernetes_service_annotation_monitor_kubeblocks_io_param_(.+) + replacement: __param_$1 + - action: labelmap + regex: __meta_kubernetes_service_label_(.+) + - action: replace + source_labels: + - __meta_kubernetes_namespace + target_label: namespace + - action: replace + source_labels: + - __meta_kubernetes_service_name + target_label: service + - action: replace + source_labels: + - __meta_kubernetes_pod_node_name + target_label: node + - action: replace + source_labels: + - __meta_kubernetes_pod_name + target_label: pod + - action: drop + regex: Pending|Succeeded|Failed|Completed + source_labels: + - __meta_kubernetes_pod_phase + - honor_labels: true + job_name: kubeblocks-agamotto + kubernetes_sd_configs: + - role: endpoints + relabel_configs: + - action: keep + regex: agamotto + source_labels: + - __meta_kubernetes_service_label_monitor_kubeblocks_io_managed_by + - action: keep + regex: true + source_labels: + - __meta_kubernetes_service_annotation_monitor_kubeblocks_io_scrape + - action: replace + regex: (https?) + source_labels: + - __meta_kubernetes_service_annotation_monitor_kubeblocks_io_scheme + target_label: __scheme__ + - action: replace + regex: (.+) + source_labels: + - __meta_kubernetes_service_annotation_monitor_kubeblocks_io_path + target_label: __metrics_path__ + - action: replace + regex: (.+?)(?::\d+)?;(\d+) + replacement: $1:$2 + source_labels: + - __address__ + - __meta_kubernetes_service_annotation_monitor_kubeblocks_io_port + target_label: __address__ + - action: labelmap + regex: __meta_kubernetes_service_annotation_monitor_kubeblocks_io_param_(.+) + replacement: __param_$1 + - action: drop + regex: Pending|Succeeded|Failed|Completed + source_labels: + - __meta_kubernetes_pod_phase +--- +# Source: kubeblocks/templates/applications/snapshot-controller-values.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: snapshot-controller-chart-kubeblocks-values + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +data: + values-kubeblocks-override.yaml: |- + affinity: + nodeAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - preference: + matchExpressions: + - key: kb-controller + operator: In + values: + - "true" + weight: 100 + enabled: true + image: + repository: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/snapshot-controller + tag: v6.2.1 + replicaCount: 1 + tolerations: + - effect: NoSchedule + key: kb-controller + operator: Equal + value: "true" + volumeSnapshotClasses: + - deletionPolicy: Delete + driver: hostpath.csi.k8s.io + name: default-vsc +--- +# Source: kubeblocks/templates/configmap.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: kubeblocks-manager-config + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +data: + config.yaml: | + # data plane tolerations + DATA_PLANE_TOLERATIONS: '[{"effect":"NoSchedule","key":"kb-data","operator":"Equal","value":"true"}]' + + # data plane affinity + DATA_PLANE_AFFINITY: '{"nodeAffinity":{"preferredDuringSchedulingIgnoredDuringExecution":[{"preference":{"matchExpressions":[{"key":"kb-data","operator":"In","values":["true"]}]},"weight":100}]}}' + + # the default storage class name. + DEFAULT_STORAGE_CLASS: "" +--- +# Source: kubeblocks/templates/configmap.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: kubeblocks-host-ports + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +data: {} +--- +# Source: kubeblocks/templates/grafana/configmaps-datasources.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: kubeblocks-grafana-datasource + namespace: acto-namespace + annotations: + null + labels: + grafana_datasource: "1" + app: kubeblocks-grafana-datasource + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +data: + datasource.yaml: |- + apiVersion: 1 + datasources: + - name: Prometheus + type: prometheus + uid: prometheus + url: http://kb-addon-prometheus-server.kb-system:80/ + access: proxy + isDefault: true + jsonData: + timeInterval: 15s + - name: Prometheus-15s + type: prometheus + uid: prometheus-15 + url: http://kb-addon-prometheus-server.kb-system:80/ + access: proxy + isDefault: false + jsonData: + timeInterval: 15s + - name: Loki + type: loki + uid: loki-kubeblocks + access: proxy + url: http://loki-gateway:80 + jsonData: + maxLines: 1000 +--- +# Source: kubeblocks/templates/prometheus/alertmanager.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + name: kb-addon-prometheus-alertmanager-config +data: + alertmanager.yml: | + global: { } + receivers: + - name: default-receiver + route: + group_by: [ 'alertname', 'namespace', 'app_kubernetes_io_instance' ] + group_interval: 30s + group_wait: 5s + receiver: default-receiver + repeat_interval: 10m + routes: + - receiver: default-receiver + group_by: ['alertname', 'instance', 'pod'] + matchers: + - alertname=~"Container.*" +--- +# Source: kubeblocks/templates/prometheus/webhook-adaptor.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + name: kb-addon-alertmanager-webhook-adaptor-config +data: + config.yml: | + receivers: [ ] +--- +# Source: kubeblocks/templates/rbac/apps_backuppolicytemplate_editor_role.yaml +# permissions for end users to edit backuppolicytemplates. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-backuppolicytemplate-editor-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - apps.kubeblocks.io + resources: + - backuppolicytemplates + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - apps.kubeblocks.io + resources: + - backuppolicytemplates/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/apps_backuppolicytemplate_viewer_role.yaml +# permissions for end users to view backuppolicytemplates. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-backuppolicytemplate-viewer-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - apps.kubeblocks.io + resources: + - backuppolicytemplates + verbs: + - get + - list + - watch +- apiGroups: + - apps.kubeblocks.io + resources: + - backuppolicytemplates/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/apps_cluster_editor_role.yaml +# permissions for end users to edit clusters. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-cluster-editor-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - apps.kubeblocks.io + resources: + - clusters + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - apps.kubeblocks.io + resources: + - clusters/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/apps_cluster_viewer_role.yaml +# permissions for end users to view clusters. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-cluster-viewer-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - apps.kubeblocks.io + resources: + - clusters + verbs: + - get + - list + - watch +- apiGroups: + - apps.kubeblocks.io + resources: + - clusters/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/apps_clusterdefinition_editor_role.yaml +# permissions for end users to edit clusterdefinitions. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-clusterdefinition-editor-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - apps.kubeblocks.io + resources: + - clusterdefinitions + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - apps.kubeblocks.io + resources: + - clusterdefinitions/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/apps_clusterdefinition_viewer_role.yaml +# permissions for end users to view clusterdefinitions. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-clusterdefinition-viewer-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - apps.kubeblocks.io + resources: + - clusterdefinitions + verbs: + - get + - list + - watch +- apiGroups: + - apps.kubeblocks.io + resources: + - clusterdefinitions/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/apps_clusterversion_editor_role.yaml +# permissions for end users to edit clusterversions. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-clusterversion-editor-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - apps.kubeblocks.io + resources: + - clusterversions + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - apps.kubeblocks.io + resources: + - clusterversions/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/apps_clusterversion_viewer_role.yaml +# permissions for end users to view clusterversions. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-clusterversion-viewer-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - apps.kubeblocks.io + resources: + - clusterversions + verbs: + - get + - list + - watch +- apiGroups: + - apps.kubeblocks.io + resources: + - clusterversions/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/apps_configconstraint_editor_role.yaml +# permissions for end users to edit configconstraints. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-configconstraint-editor-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - apps.kubeblocks.io + resources: + - configconstraints + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - apps.kubeblocks.io + resources: + - configconstraints/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/apps_configconstraint_viewer_role.yaml +# permissions for end users to view configconstraints. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-configconstraint-viewer-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - apps.kubeblocks.io + resources: + - configconstraints + verbs: + - get + - list + - watch +- apiGroups: + - apps.kubeblocks.io + resources: + - configconstraints/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/auth_proxy_client_clusterrole.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-metrics-reader + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- nonResourceURLs: + - "/metrics" + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/auth_proxy_role.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-proxy-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - authentication.k8s.io + resources: + - tokenreviews + verbs: + - create +- apiGroups: + - authorization.k8s.io + resources: + - subjectaccessreviews + verbs: + - create +--- +# Source: kubeblocks/templates/rbac/cluster_pod_required_role.yaml +# permissions for end users to edit clusters. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-cluster-pod-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +aggregationRule: + clusterRoleSelectors: + - matchLabels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/required-by: pod +--- +# Source: kubeblocks/templates/rbac/cluster_pod_required_role.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-lorry-pod-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/required-by: pod +rules: +- apiGroups: + - "" + resources: + - events + verbs: + - create +- apiGroups: + - "" + resources: + - configmaps + verbs: + - create + - get + - list + - patch + - update + - delete +- apiGroups: + - apps.kubeblocks.io + resources: + - clusters + verbs: + - get + - list +- apiGroups: + - apps.kubeblocks.io + resources: + - clusters/status + verbs: + - get +- apiGroups: + - "" + resources: + - pods + verbs: + - get + - list +--- +# Source: kubeblocks/templates/rbac/cluster_pod_required_role.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-patroni-pod-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/required-by: pod +rules: +- apiGroups: + - "" + resources: + - configmaps + verbs: + - create + - get + - list + - patch + - update + - watch + # delete is required only for 'patronictl remove' + - delete +- apiGroups: + - "" + resources: + - endpoints + verbs: + - get + - patch + - update + - create + - list + - watch + # delete is required only for 'patronictl remove' + - delete +- apiGroups: + - "" + resources: + - pods + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +--- +# Source: kubeblocks/templates/rbac/cluster_pod_required_role.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-backup-pod-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/required-by: pod +rules: +- apiGroups: + - "dataprotection.kubeblocks.io" + resources: + - backups/status + verbs: + - get + - update + - patch +- apiGroups: + - "dataprotection.kubeblocks.io" + resources: + - backups + verbs: + - create +--- +# Source: kubeblocks/templates/rbac/cluster_pod_required_role.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-volume-protection-pod-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/required-by: pod +rules: +- apiGroups: + - "" + resources: + - nodes + - nodes/stats + verbs: + - get + - list +--- +# Source: kubeblocks/templates/rbac/clusterrole.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +aggregationRule: + clusterRoleSelectors: + - matchLabels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks +--- +# Source: kubeblocks/templates/rbac/clusterrole.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-manager-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: + - apiGroups: + - apps + resources: + - deployments + verbs: + - create + - delete + - deletecollection + - get + - list + - patch + - update + - watch + - apiGroups: + - apps + resources: + - deployments/finalizers + verbs: + - update + - apiGroups: + - apps + resources: + - deployments/status + verbs: + - get + - apiGroups: + - apps + resources: + - statefulsets + verbs: + - create + - delete + - deletecollection + - get + - list + - patch + - update + - watch + - apiGroups: + - apps + resources: + - statefulsets/finalizers + verbs: + - update + - apiGroups: + - apps + resources: + - statefulsets/status + verbs: + - get + - apiGroups: + - apps.kubeblocks.io + resources: + - backuppolicytemplates + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - apps.kubeblocks.io + resources: + - backuppolicytemplates/finalizers + verbs: + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - backuppolicytemplates/status + verbs: + - get + - patch + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - clusterdefinitions + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - apps.kubeblocks.io + resources: + - clusterdefinitions/finalizers + verbs: + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - clusterdefinitions/status + verbs: + - get + - patch + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - clusters + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - apps.kubeblocks.io + resources: + - clusters/finalizers + verbs: + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - clusters/status + verbs: + - get + - patch + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - clusterversions + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - apps.kubeblocks.io + resources: + - clusterversions/finalizers + verbs: + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - clusterversions/status + verbs: + - get + - patch + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - componentclassdefinitions + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - apps.kubeblocks.io + resources: + - componentclassdefinitions/finalizers + verbs: + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - componentclassdefinitions/status + verbs: + - get + - patch + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - componentdefinitions + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - apps.kubeblocks.io + resources: + - componentdefinitions/finalizers + verbs: + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - componentdefinitions/status + verbs: + - get + - patch + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - componentresourceconstraints + verbs: + - get + - list + - watch + - apiGroups: + - apps.kubeblocks.io + resources: + - components + verbs: + - create + - delete + - deletecollection + - get + - list + - patch + - update + - watch + - apiGroups: + - apps.kubeblocks.io + resources: + - components/finalizers + verbs: + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - components/status + verbs: + - get + - patch + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - configconstraints + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - apps.kubeblocks.io + resources: + - configconstraints/finalizers + verbs: + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - configconstraints/status + verbs: + - get + - patch + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - configurations + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - apps.kubeblocks.io + resources: + - configurations/finalizers + verbs: + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - configurations/status + verbs: + - get + - patch + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - opsdefinitions + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - apps.kubeblocks.io + resources: + - opsdefinitions/finalizers + verbs: + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - opsdefinitions/status + verbs: + - get + - patch + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - opsrequests + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - apps.kubeblocks.io + resources: + - opsrequests/finalizers + verbs: + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - opsrequests/status + verbs: + - get + - patch + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - servicedescriptors + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - apps.kubeblocks.io + resources: + - servicedescriptors/finalizers + verbs: + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - servicedescriptors/status + verbs: + - get + - patch + - update + - apiGroups: + - batch + resources: + - cronjobs + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - batch + resources: + - cronjobs/finalizers + verbs: + - patch + - update + - apiGroups: + - batch + resources: + - cronjobs/status + verbs: + - get + - apiGroups: + - batch + resources: + - jobs + verbs: + - create + - delete + - deletecollection + - get + - list + - patch + - update + - watch + - apiGroups: + - batch + resources: + - jobs/finalizers + verbs: + - update + - apiGroups: + - batch + resources: + - jobs/status + verbs: + - get + - apiGroups: + - coordination.k8s.io + resources: + - leases + verbs: + - create + - get + - list + - patch + - update + - watch + - apiGroups: + - "" + resources: + - configmap + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - "" + resources: + - configmap/finalizers + verbs: + - update + - apiGroups: + - "" + resources: + - configmaps + verbs: + - create + - delete + - deletecollection + - get + - list + - patch + - update + - watch + - apiGroups: + - "" + resources: + - configmaps/finalizers + verbs: + - update + - apiGroups: + - "" + resources: + - events + verbs: + - create + - get + - list + - patch + - watch + - apiGroups: + - "" + resources: + - persistentvolumeclaims + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - "" + resources: + - persistentvolumeclaims/finalizers + verbs: + - update + - apiGroups: + - "" + resources: + - persistentvolumeclaims/status + verbs: + - get + - patch + - update + - apiGroups: + - "" + resources: + - persistentvolumes + verbs: + - get + - list + - patch + - update + - watch + - apiGroups: + - "" + resources: + - pods + verbs: + - delete + - deletecollection + - get + - list + - patch + - update + - watch + - apiGroups: + - "" + resources: + - pods/exec + verbs: + - create + - apiGroups: + - "" + resources: + - pods/finalizers + verbs: + - update + - apiGroups: + - "" + resources: + - pods/log + verbs: + - get + - list + - apiGroups: + - "" + resources: + - secrets + verbs: + - create + - delete + - deletecollection + - get + - list + - patch + - update + - watch + - apiGroups: + - "" + resources: + - secrets/finalizers + verbs: + - update + - apiGroups: + - "" + resources: + - serviceaccounts + verbs: + - get + - list + - watch + - apiGroups: + - "" + resources: + - serviceaccounts/status + verbs: + - get + - apiGroups: + - "" + resources: + - services + verbs: + - create + - delete + - deletecollection + - get + - list + - patch + - update + - watch + - apiGroups: + - "" + resources: + - services/finalizers + verbs: + - update + - apiGroups: + - "" + resources: + - services/status + verbs: + - get + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - actionsets + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - actionsets/finalizers + verbs: + - update + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - actionsets/status + verbs: + - get + - patch + - update + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - backuppolicies + verbs: + - create + - delete + - deletecollection + - get + - list + - patch + - update + - watch + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - backuppolicies/finalizers + verbs: + - update + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - backuppolicies/status + verbs: + - get + - patch + - update + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - backuprepos + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - backuprepos/finalizers + verbs: + - update + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - backuprepos/status + verbs: + - get + - patch + - update + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - backups + verbs: + - create + - delete + - deletecollection + - get + - list + - patch + - update + - watch + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - backups/finalizers + verbs: + - update + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - backups/status + verbs: + - get + - patch + - update + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - backupschedules + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - backupschedules/finalizers + verbs: + - update + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - backupschedules/status + verbs: + - get + - patch + - update + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - restores + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - restores/finalizers + verbs: + - update + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - restores/status + verbs: + - get + - patch + - update + - apiGroups: + - extensions.kubeblocks.io + resources: + - addons + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - extensions.kubeblocks.io + resources: + - addons/finalizers + verbs: + - update + - apiGroups: + - extensions.kubeblocks.io + resources: + - addons/status + verbs: + - get + - patch + - update + - apiGroups: + - policy + resources: + - poddisruptionbudgets + verbs: + - create + - delete + - deletecollection + - get + - list + - patch + - update + - watch + - apiGroups: + - policy + resources: + - poddisruptionbudgets/finalizers + verbs: + - update + - apiGroups: + - rbac.authorization.k8s.io + resources: + - clusterrolebindings + verbs: + - get + - list + - watch + - apiGroups: + - rbac.authorization.k8s.io + resources: + - clusterrolebindings/status + verbs: + - get + - apiGroups: + - rbac.authorization.k8s.io + resources: + - rolebindings + verbs: + - get + - list + - watch + - apiGroups: + - rbac.authorization.k8s.io + resources: + - rolebindings/status + verbs: + - get + - apiGroups: + - snapshot.storage.k8s.io + resources: + - volumesnapshotclasses + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - snapshot.storage.k8s.io + resources: + - volumesnapshotclasses/finalizers + verbs: + - patch + - update + - apiGroups: + - snapshot.storage.k8s.io + resources: + - volumesnapshots + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - snapshot.storage.k8s.io + resources: + - volumesnapshots/finalizers + verbs: + - patch + - update + - apiGroups: + - storage.k8s.io + resources: + - csidrivers + verbs: + - get + - list + - watch + - apiGroups: + - storage.k8s.io + resources: + - storageclasses + verbs: + - create + - delete + - get + - list + - watch + - apiGroups: + - storage.kubeblocks.io + resources: + - storageproviders + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - storage.kubeblocks.io + resources: + - storageproviders/finalizers + verbs: + - update + - apiGroups: + - storage.kubeblocks.io + resources: + - storageproviders/status + verbs: + - get + - patch + - update + - apiGroups: + - workloads.kubeblocks.io + resources: + - replicatedstatemachines + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - workloads.kubeblocks.io + resources: + - replicatedstatemachines/finalizers + verbs: + - update + - apiGroups: + - workloads.kubeblocks.io + resources: + - replicatedstatemachines/status + verbs: + - get + - patch + - update +--- +# Source: kubeblocks/templates/rbac/dataprotection_backup_editor_role.yaml +# permissions for end users to edit backups. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-backup-editor-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - dataprotection.kubeblocks.io + resources: + - backups + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - dataprotection.kubeblocks.io + resources: + - backups/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/dataprotection_backup_viewer_role.yaml +# permissions for end users to view backups. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-backup-viewer-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - dataprotection.kubeblocks.io + resources: + - backups + verbs: + - get + - list + - watch +- apiGroups: + - dataprotection.kubeblocks.io + resources: + - backups/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/dataprotection_backuppolicy_editor_role.yaml +# permissions for end users to edit backuppolicies. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-backuppolicy-editor-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - dataprotection.kubeblocks.io + resources: + - backuppolicies + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - dataprotection.kubeblocks.io + resources: + - backuppolicies/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/dataprotection_backuppolicy_viewer_role.yaml +# permissions for end users to view backuppolicies. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-backuppolicy-viewer-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - dataprotection.kubeblocks.io + resources: + - backuppolicies + verbs: + - get + - list + - watch +- apiGroups: + - dataprotection.kubeblocks.io + resources: + - backuppolicies/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/dataprotection_backuptool_editor_role.yaml +# permissions for end users to edit backuptools. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-backuptool-editor-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - dataprotection.kubeblocks.io + resources: + - backuptools + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - dataprotection.kubeblocks.io + resources: + - backuptools/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/dataprotection_backuptool_viewer_role.yaml +# permissions for end users to view backuptools. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-backuptool-viewer-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - dataprotection.kubeblocks.io + resources: + - backuptools + verbs: + - get + - list + - watch +- apiGroups: + - dataprotection.kubeblocks.io + resources: + - backuptools/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/dataprotection_restore_editor_role.yaml +# permissions for end users to edit restores. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-restore-editor-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - dataprotection.kubeblocks.io + resources: + - restores + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - dataprotection.kubeblocks.io + resources: + - restores/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/dataprotection_restore_viewer_role.yaml +# permissions for end users to view restores. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-restore-viewer-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - dataprotection.kubeblocks.io + resources: + - restores + verbs: + - get + - list + - watch +- apiGroups: + - dataprotection.kubeblocks.io + resources: + - restores/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/extensions_addon_editor_role.yaml +# permissions for end users to edit addons. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-editor-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - extensions.kubeblocks.io + resources: + - addons + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - extensions.kubeblocks.io + resources: + - addons/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/extensions_addon_viewer_role.yaml +# permissions for end users to view addons. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-viewer-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - extensions.kubeblocks.io + resources: + - addons + verbs: + - get + - list + - watch +- apiGroups: + - extensions.kubeblocks.io + resources: + - addons/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/opsrequest_editor_role.yaml +# permissions for end users to edit opsrequests. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-opsrequest-editor-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - apps.kubeblocks.io + resources: + - opsrequests + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - apps.kubeblocks.io + resources: + - opsrequests/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/opsrequest_viewer_role.yaml +# permissions for end users to view opsrequests. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-opsrequest-viewer-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - apps.kubeblocks.io + resources: + - opsrequests + verbs: + - get + - list + - watch +- apiGroups: + - apps.kubeblocks.io + resources: + - opsrequests/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/rbac_manager_role.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-rbac-manager-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - "" + resources: + - serviceaccounts + verbs: + - create + - delete + - get + - list + - patch + - update +- apiGroups: + - "" + resources: + - serviceaccounts/finalizers + verbs: + - update +- apiGroups: + - "" + resources: + - serviceaccounts/status + verbs: + - get + - patch + - update +- apiGroups: + - rbac.authorization.k8s.io + resources: + - rolebindings + verbs: + - create + - delete + - get + - list + - patch + - update +- apiGroups: + - rbac.authorization.k8s.io + resources: + - rolebindings/finalizers + verbs: + - update +- apiGroups: + - rbac.authorization.k8s.io + resources: + - rolebindings/status + verbs: + - get + - patch + - update +- apiGroups: + - rbac.authorization.k8s.io + resources: + - clusterrolebindings + verbs: + - create + - delete + - get + - list + - patch + - update +- apiGroups: + - rbac.authorization.k8s.io + resources: + - clusterrolebindings/finalizers + verbs: + - update +- apiGroups: + - rbac.authorization.k8s.io + resources: + - clusterrolebindings/status + verbs: + - get + - patch + - update +--- +# Source: kubeblocks/templates/rbac/workloads_replicatedstatemachine_editor_role.yaml +# permissions for end users to edit replicatedstatemachines. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/name: clusterrole + app.kubernetes.io/instance: replicatedstatemachine-editor-role + app.kubernetes.io/component: rbac + app.kubernetes.io/created-by: kubeblocks + app.kubernetes.io/part-of: kubeblocks + app.kubernetes.io/managed-by: kustomize + name: replicatedstatemachine-editor-role +rules: +- apiGroups: + - workloads.kubeblocks.io + resources: + - replicatedstatemachines + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - workloads.kubeblocks.io + resources: + - replicatedstatemachines/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/workloads_replicatedstatemachine_viewer_role.yaml +# permissions for end users to view replicatedstatemachines. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/name: clusterrole + app.kubernetes.io/instance: replicatedstatemachine-viewer-role + app.kubernetes.io/component: rbac + app.kubernetes.io/created-by: kubeblocks + app.kubernetes.io/part-of: kubeblocks + app.kubernetes.io/managed-by: kustomize + name: replicatedstatemachines-viewer-role +rules: +- apiGroups: + - workloads.kubeblocks.io + resources: + - replicatedstatemachines + verbs: + - get + - list + - watch +- apiGroups: + - workloads.kubeblocks.io + resources: + - replicatedstatemachines/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/auth_proxy_role_binding.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: kubeblocks-proxy-rolebinding + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: kubeblocks-proxy-role +subjects: +- kind: ServiceAccount + name: kubeblocks + namespace: acto-namespace +--- +# Source: kubeblocks/templates/rbac/clusterrole_binding.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: kubeblocks + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: kubeblocks +subjects: +- kind: ServiceAccount + name: kubeblocks + namespace: acto-namespace +--- +# Source: kubeblocks/templates/rbac/clusterrole_binding.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: kubeblocks-cluster-admin + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: cluster-admin +subjects: + - kind: ServiceAccount + name: kubeblocks-addon-installer + namespace: acto-namespace +--- +# Source: kubeblocks/templates/rbac/leader_election_role.yaml +# permissions to do leader election. +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: kubeblocks-leader-election-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - coordination.k8s.io + resources: + - leases + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - "" + resources: + - events + verbs: + - create + - patch +--- +# Source: kubeblocks/templates/rbac/leader_election_role_binding.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: kubeblocks-leader-election-rolebinding + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: kubeblocks-leader-election-role +subjects: +- kind: ServiceAccount + name: kubeblocks-controller-manager + namespace: acto-namespace +--- +# Source: kubeblocks/templates/service.yaml +apiVersion: v1 +kind: Service +metadata: + name: kubeblocks + labels: + control-plane: controller-manager + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +spec: + type: ClusterIP + ports: + - port: 9443 + targetPort: webhook-server + protocol: TCP + name: webhook-server + selector: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks +--- +# Source: kubeblocks/templates/dataprotection.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: kubeblocks-dataprotection + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/component: "dataprotection" +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + strategy: + rollingUpdate: + maxSurge: 1 + maxUnavailable: 40% + type: RollingUpdate + template: + metadata: + labels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + spec: + priorityClassName: + serviceAccountName: kubeblocks + securityContext: + runAsNonRoot: true + initContainers: # only download tools image to local + - name: tools + image: "infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-tools:0.8.1" + imagePullPolicy: IfNotPresent + resources: + {} + command: + - /bin/true + containers: + - name: dataprotection + args: + - "--health-probe-bind-address=:8081" + - "--metrics-bind-address=:8080" + - "--leader-elect" + - "--leader-elect-id=abd03fda" + - "--zap-devel=false" + - "--zap-time-encoding=iso8601" + - "--zap-encoder=console" + env: + - name: CM_NAMESPACE + value: kb-system + - name: CM_AFFINITY + value: "{\"nodeAffinity\":{\"preferredDuringSchedulingIgnoredDuringExecution\":[{\"preference\":{\"matchExpressions\":[{\"key\":\"kb-controller\",\"operator\":\"In\",\"values\":[\"true\"]}]},\"weight\":100}]}}" + - name: CM_TOLERATIONS + value: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + - name: KUBEBLOCKS_IMAGE_PULL_POLICY + value: IfNotPresent + - name: KUBEBLOCKS_TOOLS_IMAGE + value: "infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-tools:0.8.1" + - name: KUBEBLOCKS_SERVICEACCOUNT_NAME + value: kubeblocks + - name: DP_ENCRYPTION_KEY + valueFrom: + secretKeyRef: + name: kubeblocks-secret + key: dataProtectionEncryptionKey + - name: DATASAFED_IMAGE + value: "infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/datasafed:0.1.0" + - name: GC_FREQUENCY_SECONDS + value: "3600" + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + image: "infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-dataprotection:0.8.1" + imagePullPolicy: IfNotPresent + ports: + - name: webhook-server + containerPort: 9443 + protocol: TCP + - name: health + containerPort: 8081 + protocol: TCP + - name: metrics + containerPort: 8080 + protocol: TCP + livenessProbe: + httpGet: + path: /healthz + port: health + initialDelaySeconds: 15 + periodSeconds: 20 + readinessProbe: + httpGet: + path: /readyz + port: health + initialDelaySeconds: 5 + periodSeconds: 10 + resources: + {} + volumeMounts: + - mountPath: /etc/kubeblocks + name: manager-config + dnsPolicy: ClusterFirst + affinity: + nodeAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - preference: + matchExpressions: + - key: kb-controller + operator: In + values: + - "true" + weight: 100 + tolerations: + - effect: NoSchedule + key: kb-controller + operator: Equal + value: "true" + terminationGracePeriodSeconds: 10 + volumes: + - name: manager-config + configMap: + name: kubeblocks-manager-config +--- +# Source: kubeblocks/templates/deployment.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: kubeblocks + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/component: "apps" +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + strategy: + rollingUpdate: + maxSurge: 1 + maxUnavailable: 40% + type: RollingUpdate + template: + metadata: + labels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + spec: + priorityClassName: + serviceAccountName: kubeblocks + securityContext: + runAsNonRoot: true + initContainers: # only download tools image to local + - name: tools + image: "infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-tools:0.8.1" + imagePullPolicy: IfNotPresent + resources: + {} + command: + - /bin/true + - name: datascript + image: "infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-datascript:0.8.1" + imagePullPolicy: IfNotPresent + resources: + {} + command: + - /bin/true + containers: + - name: manager + args: + - "--health-probe-bind-address=:8081" + - "--metrics-bind-address=:8080" + - "--leader-elect" + - "--zap-devel=false" + - "--zap-time-encoding=iso8601" + - "--zap-encoder=console" + - "--extensions=true" + - "--apps=true" + - "--workloads=true" + env: + - name: CM_NAMESPACE + value: kb-system + - name: CM_AFFINITY + value: "{\"nodeAffinity\":{\"preferredDuringSchedulingIgnoredDuringExecution\":[{\"preference\":{\"matchExpressions\":[{\"key\":\"kb-controller\",\"operator\":\"In\",\"values\":[\"true\"]}]},\"weight\":100}]}}" + - name: CM_TOLERATIONS + value: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + - name: KUBEBLOCKS_IMAGE_PULL_POLICY + value: IfNotPresent + - name: KUBEBLOCKS_TOOLS_IMAGE + value: "infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-tools:0.8.1" + - name: KUBEBLOCKS_DATASCRIPT_CLIENTS_IMAGE + value: "infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-datascript:0.8.1" + - name: KUBEBLOCKS_SERVICEACCOUNT_NAME + value: kubeblocks + - name: ENABLE_RBAC_MANAGER + value: "true" + - name: ADDON_JOB_TTL + value: + - name: ADDON_JOB_IMAGE_PULL_POLICY + value: IfNotPresent + - name: KUBEBLOCKS_ADDON_SA_NAME + value: kubeblocks-addon-installer + - name: KUBEBLOCKS_ADDON_HELM_INSTALL_OPTIONS + value: --atomic --cleanup-on-fail --wait --insecure-skip-tls-verify + - name: DP_ENCRYPTION_KEY + valueFrom: + secretKeyRef: + name: kubeblocks-secret + key: dataProtectionEncryptionKey + - name: KUBE_PROVIDER + value: "" + - name: HOST_PORT_INCLUDE_RANGES + value: '1025-65536' + - name: HOST_PORT_EXCLUDE_RANGES + value: '6443,10250,10257,10259,2379-2380,30000-32767' + - name: HOST_PORT_CM_NAME + value: kubeblocks-host-ports + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + image: "infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks:0.8.1" + imagePullPolicy: IfNotPresent + ports: + - name: webhook-server + containerPort: 9443 + protocol: TCP + - name: health + containerPort: 8081 + protocol: TCP + - name: metrics + containerPort: 8080 + protocol: TCP + livenessProbe: + httpGet: + path: /healthz + port: health + initialDelaySeconds: 15 + periodSeconds: 20 + readinessProbe: + httpGet: + path: /readyz + port: health + initialDelaySeconds: 5 + periodSeconds: 10 + resources: + {} + volumeMounts: + - mountPath: /etc/kubeblocks + name: manager-config + dnsPolicy: ClusterFirst + affinity: + nodeAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - preference: + matchExpressions: + - key: kb-controller + operator: In + values: + - "true" + weight: 100 + tolerations: + - effect: NoSchedule + key: kb-controller + operator: Equal + value: "true" + terminationGracePeriodSeconds: 10 + volumes: + - name: manager-config + configMap: + name: kubeblocks-manager-config +--- +# Source: kubeblocks/templates/class/componentclassconstraint.yaml +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: ComponentResourceConstraint +metadata: + name: kb-resource-constraint-general + labels: + resourceconstraint.kubeblocks.io/provider: kubeblocks + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +spec: + rules: + - name: general + cpu: + min: "0.5" + max: 64 + step: "0.5" + memory: + minPerCPU: 1Gi + maxPerCPU: 32Gi + storage: + min: 20Gi + max: 10Ti +--- +# Source: kubeblocks/templates/opsdefinition.yaml +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsDefinition +metadata: + name: switchover +spec: + varsRef: + podSelectionStrategy: Available + vars: + - name: TARGET_POD_IP + valueFrom: + envVarRef: + envName: KB_POD_IP + - name: LORRY_HTTP_PORT + valueFrom: + envVarRef: + envName: LORRY_HTTP_PORT + parametersSchema: + openAPIV3Schema: + properties: + primary: + description: "old primary instance name(pod Name)." + type: string + candidate: + description: | + candidate instance name(pod Name). if candidate is not empty, will promote it to primary. + otherwise promote a randomly selected pod to primary. + type: string + type: object + jobSpec: + backoffLimit: 0 + template: + spec: + containers: + - name: switchover + image: docker.io/apecloud/kubeblocks-tools:latest + imagePullPolicy: IfNotPresent + command: + - sh + - -c + - | + set -e + # do switchover + url="http://${TARGET_POD_IP}:${LORRY_HTTP_PORT}/v1.0/switchover" + params="{\"parameters\": {\"primary\":\"${primary}\",\"candidate\":\"${candidate}\"}}" + echo "curl ${url}, parameters: ${params}" + res=`curl -s -X POST -H 'Content-Type: application/json' "${url}" -d "${params}"` + echo "curl result: ${res}" + + # check if switchover successfully. + echo "INFO: start to check if switchover successfully, timeout is 60s" + executedUnix=$(date +%s) + while true; do + sleep 5 + if [ ! -z ${candidate} ]; then + # if candidate specified, only check it + role=$(kubectl get pod ${candidate} -ojson | jq -r '.metadata.labels["kubeblocks.io/role"]') + if [ "$role" == "primary" ] || [ "$role" == "leader" ] || [ "$role" == "master" ]; then + echo "INFO: switchover successfully, ${candidate} is ${role}" + exit 0 + fi + else + # check if the candidate instance has been promote to primary + pods=$(kubectl get pod -l apps.kubeblocks.io/component-name=${KB_COMP_NAME},app.kubernetes.io/instance=${KB_CLUSTER_NAME} | awk 'NR > 1 {print $1}') + for podName in ${pods}; do + if [ "${podName}" != "${primary}" ];then + role=$(kubectl get pod ${podName} -ojson | jq -r '.metadata.labels["kubeblocks.io/role"]') + if [ "$role" == "primary" ] || [ "$role" == "leader" ] || [ "$role" == "master" ]; then + echo "INFO: switchover successfully, ${podName} is ${role}" + exit 0 + fi + fi + done + fi + currentUnix=$(date +%s) + diff_time=$((${currentUnix}-${executedUnix})) + if [ ${diff_time} -ge 60 ]; then + echo "ERROR: switchover failed." + exit 1 + fi + done + preConditions: + - rule: + expression: '{{ eq .component.status.phase "Running" }}' + message: "Component is not in Running status." +--- +# Source: kubeblocks/templates/storageprovider/cos.yaml +# cos is a storage provider for [Tencent Cloud Object Storage](https://cloud.tencent.com/product/cos) +apiVersion: storage.kubeblocks.io/v1alpha1 +kind: StorageProvider +metadata: + name: cos + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +spec: + csiDriverName: ru.yandex.s3.csi + csiDriverSecretTemplate: | + accessKeyID: {{ index .Parameters "accessKeyId" }} + secretAccessKey: {{ index .Parameters "secretAccessKey" }} + {{- $region := index .Parameters "region" }} + {{- $endpoint := index .Parameters "endpoint" }} + {{- if not $endpoint }} + {{- $endpoint = (printf "https://cos.%s.myqcloud.com" $region) }} + {{- end }} + endpoint: {{ $endpoint }} + + storageClassTemplate: | + provisioner: ru.yandex.s3.csi + parameters: + mounter: geesefs + # you can set mount options here, for example limit memory cache size (recommended) + options: {{ printf "--memory-limit 64 --dir-mode 0777 --file-mode 0666 %s --subdomain" (index .Parameters "mountOptions") }} + bucket: {{ index .Parameters "bucket" }} + csi.storage.k8s.io/provisioner-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/provisioner-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/controller-publish-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/controller-publish-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/node-stage-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/node-stage-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/node-publish-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/node-publish-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + + datasafedConfigTemplate: | + [storage] + type = s3 + provider = TencentCOS + env_auth = false + access_key_id = {{ index .Parameters "accessKeyId" }} + secret_access_key = {{ index .Parameters "secretAccessKey" }} + endpoint = {{ printf "cos.%s.myqcloud.com" .Parameters.region }} + root = {{ index .Parameters "bucket" }} + chunk_size = 50Mi + + parametersSchema: + openAPIV3Schema: + type: "object" + properties: + region: + type: string + description: "COS region, e.g. cn-guangzhou" + bucket: + type: string + description: "COS bucket" + endpoint: + type: string + description: "COS endpoint (optional)" + mountOptions: + type: string + description: "mount options for geesefs" + accessKeyId: + type: string + description: "COS access key" + secretAccessKey: + type: string + description: "COS secret key" + + required: + - bucket + - region + - accessKeyId + - secretAccessKey + + credentialFields: + - accessKeyId + - secretAccessKey +--- +# Source: kubeblocks/templates/storageprovider/ftp.yaml +apiVersion: storage.kubeblocks.io/v1alpha1 +kind: StorageProvider +metadata: + name: ftp + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +spec: + datasafedConfigTemplate: | + [storage] + type = ftp + host = {{ .Parameters.ftpHost }} + port = {{ if ne .Parameters.ftpPort "0" }}{{ .Parameters.ftpPort }}{{ else }}21{{ end }} + user = {{ .Parameters.ftpUser }} + pass.need_obscure = {{ .Parameters.ftpPassword }} + tls = {{ .Parameters.ftpTls | default false }} + + parametersSchema: + openAPIV3Schema: + type: "object" + properties: + ftpHost: + type: string + description: "Host of the FTP server" + ftpPort: + type: integer + description: "Port of the FTP server (optional)" + default: 21 + ftpUser: + type: string + description: "the FTP user" + ftpPassword: + type: string + description: "the password of the user" + ftpTls: + type: boolean + description: "enable FTP over TLS (optional)" + default: false + + required: + - ftpHost + - ftpUser + - ftpPassword + + credentialFields: + - ftpUser + - ftpPassword +--- +# Source: kubeblocks/templates/storageprovider/gcs-s3comp.yaml +# gcs-s3comp is a storage provider for [Google Cloud Storage](https://cloud.google.com/storage/), by using its S3-compatible API. +apiVersion: storage.kubeblocks.io/v1alpha1 +kind: StorageProvider +metadata: + name: gcs-s3comp + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +spec: + csiDriverName: ru.yandex.s3.csi + csiDriverSecretTemplate: | + {{- $endpoint := index .Parameters "endpoint" }} + {{- if not $endpoint }} + {{- $endpoint = (printf "https://storage.googleapis.com") }} + {{- end }} + accessKeyID: {{ index .Parameters "accessKeyId" }} + secretAccessKey: {{ index .Parameters "secretAccessKey" }} + endpoint: {{ $endpoint }} + + storageClassTemplate: | + provisioner: ru.yandex.s3.csi + parameters: + mounter: geesefs + # you can set mount options here, for example limit memory cache size (recommended) + options: {{ printf "--memory-limit 64 --dir-mode 0777 --file-mode 0666 %s --subdomain" (index .Parameters "mountOptions") }} + bucket: {{ index .Parameters "bucket" }} + csi.storage.k8s.io/provisioner-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/provisioner-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/controller-publish-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/controller-publish-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/node-stage-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/node-stage-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/node-publish-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/node-publish-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + + datasafedConfigTemplate: | + [storage] + type = s3 + provider = GCS + env_auth = false + access_key_id = {{ index .Parameters "accessKeyId" }} + secret_access_key = {{ index .Parameters "secretAccessKey" }} + {{- $endpoint := index .Parameters "endpoint" }} + {{- if not $endpoint }} + {{- $endpoint = (printf "https://storage.googleapis.com") }} + {{- end }} + endpoint = {{ $endpoint }} + root = {{ index .Parameters "bucket" }} + chunk_size = 50Mi + + parametersSchema: + openAPIV3Schema: + type: "object" + properties: + region: + type: string + description: "GCS region, e.g. auto" + bucket: + type: string + description: "GCS bucket" + endpoint: + type: string + description: "GCS endpoint (optional)" + mountOptions: + type: string + description: "mount options for geesefs" + accessKeyId: + type: string + description: "GCS access key" + secretAccessKey: + type: string + description: "GCS secret key" + + required: + - bucket + - region + - accessKeyId + - secretAccessKey + + credentialFields: + - accessKeyId + - secretAccessKey +--- +# Source: kubeblocks/templates/storageprovider/minio.yaml +apiVersion: storage.kubeblocks.io/v1alpha1 +kind: StorageProvider +metadata: + name: minio + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +spec: + csiDriverName: ru.yandex.s3.csi + csiDriverSecretTemplate: | + accessKeyID: {{ index .Parameters "accessKeyId" }} + secretAccessKey: {{ index .Parameters "secretAccessKey" }} + endpoint: {{ index .Parameters "endpoint" }} + + storageClassTemplate: | + provisioner: ru.yandex.s3.csi + parameters: + mounter: geesefs + # you can set mount options here, for example limit memory cache size (recommended) + options: {{ printf "--memory-limit 64 --dir-mode 0777 --file-mode 0666 %s" (index .Parameters "mountOptions") }} + bucket: {{ index .Parameters "bucket" }} + csi.storage.k8s.io/provisioner-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/provisioner-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/controller-publish-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/controller-publish-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/node-stage-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/node-stage-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/node-publish-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/node-publish-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + + datasafedConfigTemplate: | + [storage] + type = s3 + provider = Minio + env_auth = false + access_key_id = {{ index .Parameters "accessKeyId" }} + secret_access_key = {{ index .Parameters "secretAccessKey" }} + endpoint = {{ index .Parameters "endpoint" }} + root = {{ index .Parameters "bucket" }} + chunk_size = 50Mi + + parametersSchema: + openAPIV3Schema: + type: "object" + properties: + bucket: + type: string + description: "MinIO bucket" + endpoint: + type: string + description: "MinIO endpoint" + mountOptions: + type: string + description: "mount options for geesefs" + accessKeyId: + type: string + description: "MinIO access key" + secretAccessKey: + type: string + description: "MinIO secret key" + + required: + - bucket + - endpoint + - accessKeyId + - secretAccessKey + + credentialFields: + - accessKeyId + - secretAccessKey +--- +# Source: kubeblocks/templates/storageprovider/nfs.yaml +apiVersion: storage.kubeblocks.io/v1alpha1 +kind: StorageProvider +metadata: + name: nfs + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +spec: + csiDriverName: nfs.csi.k8s.io + + storageClassTemplate: | + provisioner: nfs.csi.k8s.io + parameters: + server: {{ .Parameters.nfsServer }} + share: {{ .Parameters.nfsShare }} + subDir: {{ .Parameters.nfsSubDir }} + mountPermissions: "0777" + {{- if .Parameters.nfsMountOptions }} + {{- $options := splitList " " .Parameters.nfsMountOptions }} + mountOptions: {{ $options | toJson }} + {{- end }} + + parametersSchema: + openAPIV3Schema: + type: "object" + properties: + nfsServer: + type: string + description: "NFS Server address" + nfsShare: + type: string + description: "NFS share path" + default: "/" + nfsSubDir: + type: string + description: "sub directory under nfs share" + nfsMountOptions: + type: string + description: "extra mount options" + + required: + - nfsServer +--- +# Source: kubeblocks/templates/storageprovider/obs.yaml +# obs is a storage provider for [Huawei OBS](https://www.huaweicloud.com/product/obs.html) object storage. +apiVersion: storage.kubeblocks.io/v1alpha1 +kind: StorageProvider +metadata: + name: obs + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +spec: + csiDriverName: ru.yandex.s3.csi + csiDriverSecretTemplate: | + accessKeyID: {{ index .Parameters "accessKeyId" }} + secretAccessKey: {{ index .Parameters "secretAccessKey" }} + {{- $region := index .Parameters "region" }} + {{- $endpoint := index .Parameters "endpoint" }} + {{- if not $endpoint }} + {{- $endpoint = (printf "https://obs.%s.myhuaweicloud.com" $region) }} + {{- end }} + endpoint: {{ $endpoint }} + + storageClassTemplate: | + provisioner: ru.yandex.s3.csi + parameters: + mounter: geesefs + # you can set mount options here, for example limit memory cache size (recommended) + options: {{ printf "--memory-limit 64 --dir-mode 0777 --file-mode 0666 %s --subdomain" (index .Parameters "mountOptions") }} + bucket: {{ index .Parameters "bucket" }} + csi.storage.k8s.io/provisioner-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/provisioner-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/controller-publish-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/controller-publish-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/node-stage-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/node-stage-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/node-publish-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/node-publish-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + + datasafedConfigTemplate: | + [storage] + type = s3 + provider = HuaweiOBS + env_auth = false + access_key_id = {{ index .Parameters "accessKeyId" }} + secret_access_key = {{ index .Parameters "secretAccessKey" }} + region = {{ index .Parameters "region" }} + endpoint = {{ printf "obs.%s.myhuaweicloud.com" .Parameters.region }} + root = {{ index .Parameters "bucket" }} + chunk_size = 50Mi + + parametersSchema: + openAPIV3Schema: + type: "object" + properties: + region: + type: string + description: "OBS region, e.g. cn-north-4" + bucket: + type: string + description: "OBS bucket" + endpoint: + type: string + description: "OBS endpoint (optional)" + mountOptions: + type: string + description: "mount options for geesefs" + accessKeyId: + type: string + description: "OBS access key" + secretAccessKey: + type: string + description: "OBS secret key" + + required: + - bucket + - region + - accessKeyId + - secretAccessKey + + credentialFields: + - accessKeyId + - secretAccessKey +--- +# Source: kubeblocks/templates/storageprovider/oss.yaml +apiVersion: storage.kubeblocks.io/v1alpha1 +kind: StorageProvider +metadata: + name: oss + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +spec: + csiDriverName: ru.yandex.s3.csi + csiDriverSecretTemplate: | + accessKeyID: {{ index .Parameters "accessKeyId" }} + secretAccessKey: {{ index .Parameters "secretAccessKey" }} + {{- $region := index .Parameters "region" }} + {{- $endpoint := index .Parameters "endpoint" }} + {{- if not $endpoint }} + {{- $endpoint = (printf "https://oss-%s.aliyuncs.com" $region) }} + {{- end }} + endpoint: {{ $endpoint }} + + storageClassTemplate: | + provisioner: ru.yandex.s3.csi + parameters: + mounter: geesefs + # you can set mount options here, for example limit memory cache size (recommended) + options: {{ printf "--memory-limit 64 --dir-mode 0777 --file-mode 0666 %s --subdomain" (index .Parameters "mountOptions") }} + bucket: {{ index .Parameters "bucket" }} + csi.storage.k8s.io/provisioner-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/provisioner-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/controller-publish-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/controller-publish-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/node-stage-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/node-stage-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/node-publish-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/node-publish-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + + datasafedConfigTemplate: | + [storage] + type = s3 + provider = Alibaba + env_auth = false + access_key_id = {{ index .Parameters "accessKeyId" }} + secret_access_key = {{ index .Parameters "secretAccessKey" }} + endpoint = {{- printf "oss-%s.aliyuncs.com" .Parameters.region }} + root = {{ index .Parameters "bucket" }} + chunk_size = 50Mi + + parametersSchema: + openAPIV3Schema: + type: "object" + properties: + region: + type: string + description: "OSS region, e.g. cn-hangzhou" + bucket: + type: string + description: "OSS bucket" + endpoint: + type: string + description: "OSS endpoint (optional)" + mountOptions: + type: string + description: "mount options for geesefs" + accessKeyId: + type: string + description: "OSS access key" + secretAccessKey: + type: string + description: "OSS secret key" + + required: + - bucket + - region + - accessKeyId + - secretAccessKey + + credentialFields: + - accessKeyId + - secretAccessKey +--- +# Source: kubeblocks/templates/storageprovider/pvc.yaml +apiVersion: storage.kubeblocks.io/v1alpha1 +kind: StorageProvider +metadata: + name: pvc + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +spec: + persistentVolumeClaimTemplate: | + spec: + storageClassName: {{ .Parameters.storageClassName | default "" }} + accessModes: + - {{ .Parameters.accessMode | default "ReadWriteOnce" }} + volumeMode: {{ .Parameters.volumeMode | default "Filesystem" }} + + parametersSchema: + openAPIV3Schema: + type: "object" + properties: + storageClassName: + type: string + description: "the name of the StorageClass used to create the PVC" + accessMode: + type: string + description: "the access mode used to create the PVC" + default: "ReadWriteOnce" + enum: ["ReadWriteOnce", "ReadWriteMany", "ReadWriteOncePod"] + volumeMode: + type: string + description: "the volume mode used to create the PVC" + default: "Filesystem" + enum: ["Filesystem", "Block"] +--- +# Source: kubeblocks/templates/storageprovider/s3.yaml +apiVersion: storage.kubeblocks.io/v1alpha1 +kind: StorageProvider +metadata: + name: s3 + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +spec: + csiDriverName: ru.yandex.s3.csi + csiDriverSecretTemplate: | + accessKeyID: {{ index .Parameters "accessKeyId" }} + secretAccessKey: {{ index .Parameters "secretAccessKey" }} + {{- $region := index .Parameters "region" }} + {{- $endpoint := index .Parameters "endpoint" }} + {{- if not $endpoint }} + {{- if hasPrefix "cn-" $region }} + {{- $endpoint = (printf "https://s3.%s.amazonaws.com.cn" $region) }} + {{- else }} + {{- $endpoint = (printf "https://s3.%s.amazonaws.com" $region) }} + {{- end }} + {{- end }} + endpoint: {{ $endpoint }} + + storageClassTemplate: | + provisioner: ru.yandex.s3.csi + parameters: + mounter: geesefs + # you can set mount options here, for example limit memory cache size (recommended) + options: {{ printf "--memory-limit 64 --dir-mode 0777 --file-mode 0666 %s --region %s" (index .Parameters "mountOptions") (index .Parameters "region") }} + bucket: {{ index .Parameters "bucket" }} + csi.storage.k8s.io/provisioner-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/provisioner-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/controller-publish-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/controller-publish-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/node-stage-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/node-stage-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/node-publish-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/node-publish-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + + datasafedConfigTemplate: | + [storage] + type = s3 + provider = AWS + env_auth = false + access_key_id = {{ index .Parameters "accessKeyId" }} + secret_access_key = {{ index .Parameters "secretAccessKey" }} + region = {{ index .Parameters "region" }} + endpoint = {{ index .Parameters "endpoint" }} + root = {{ index .Parameters "bucket" }} + chunk_size = 50Mi + + parametersSchema: + openAPIV3Schema: + type: "object" + properties: + region: + type: string + description: "AWS region, e.g. us-west-1" + bucket: + type: string + description: "S3 bucket" + endpoint: + type: string + description: "S3 endpoint (optional)" + mountOptions: + type: string + description: "mount options for geesefs" + accessKeyId: + type: string + description: "AWS access key" + secretAccessKey: + type: string + description: "AWS secret key" + + required: + - bucket + - region + - accessKeyId + - secretAccessKey + + credentialFields: + - accessKeyId + - secretAccessKey + diff --git a/data/kubeblocks-postgresql-operator/kubeblocks_crds.yaml b/data/kubeblocks-postgresql-operator/kubeblocks_crds.yaml new file mode 100644 index 0000000000..da2f28ca5c --- /dev/null +++ b/data/kubeblocks-postgresql-operator/kubeblocks_crds.yaml @@ -0,0 +1,56690 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.12.1 + labels: + app.kubernetes.io/name: kubeblocks + name: backuppolicytemplates.apps.kubeblocks.io +spec: + group: apps.kubeblocks.io + names: + categories: + - kubeblocks + kind: BackupPolicyTemplate + listKind: BackupPolicyTemplateList + plural: backuppolicytemplates + shortNames: + - bpt + singular: backuppolicytemplate + scope: Cluster + versions: + - additionalPrinterColumns: + - description: ClusterDefinition referenced by cluster. + jsonPath: .spec.clusterDefinitionRef + name: CLUSTER-DEFINITION + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: BackupPolicyTemplate is the Schema for the BackupPolicyTemplates + API (defined by provider) + 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: + type: object + spec: + description: BackupPolicyTemplateSpec defines the desired state of BackupPolicyTemplate + properties: + backupPolicies: + description: backupPolicies is a list of backup policy template for + the specified componentDefinition. + items: + properties: + backoffLimit: + description: Specifies the number of retries before marking + the backup failed. + format: int32 + maximum: 10 + minimum: 0 + type: integer + backupMethods: + description: backupMethods defines the backup methods. + items: + properties: + actionSetName: + description: actionSetName refers to the ActionSet object + that defines the backup actions. For volume snapshot + backup, the actionSet is not required, the controller + will use the CSI volume snapshotter to create the snapshot. + type: string + env: + description: env specifies the environment variables for + the backup workload. + 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 previously 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. + Double $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" + will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + envMapping: + description: envMapping defines the variables of cluster + mapped to env values' keys. + items: + properties: + key: + description: env key which needs to mapping. + type: string + valueFrom: + description: valueFrom defines source of the env + value. + properties: + clusterVersionRef: + description: mapped ClusterVersionRef to env + value. + items: + properties: + mappingValue: + description: mapping value for the specified + ClusterVersion names. + type: string + names: + description: the array of ClusterVersion + name which can be mapped to the env + value. + items: + type: string + type: array + required: + - mappingValue + - names + type: object + type: array + componentDef: + description: mapped ComponentDefinition to env + value. + items: + properties: + mappingValue: + description: mapping value for the specified + ClusterVersion names. + type: string + names: + description: the array of ClusterVersion + name which can be mapped to the env + value. + items: + type: string + type: array + required: + - mappingValue + - names + type: object + type: array + type: object + required: + - key + - valueFrom + type: object + type: array + name: + description: the name of backup method. + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + runtimeSettings: + description: runtimeSettings specifies runtime settings + for the backup workload container. + properties: + resources: + description: 'resources specifies the resource required + by container. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + properties: + claims: + description: "Claims lists the names of resources, + defined in spec.resourceClaims, that are used + by this container. \n This is an alpha field + and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It + can only be set for containers." + items: + description: ResourceClaim references one entry + in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of + one entry in pod.spec.resourceClaims of + the Pod where this field is used. It makes + that resource available inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + 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-resources-containers/' + 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. Requests cannot + exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + type: object + snapshotVolumes: + default: false + description: snapshotVolumes specifies whether to take + snapshots of persistent volumes. if true, the BackupScript + is not required, the controller will use the CSI volume + snapshotter to create the snapshot. + type: boolean + target: + description: target specifies the target information to + back up, it will override the global target policy. + properties: + account: + description: refer to spec.componentDef.systemAccounts.accounts[*].name + in ClusterDefinition. the secret created by this + account will be used to connect the database. if + not set, the secret created by spec.ConnectionCredential + of the ClusterDefinition will be used. it will be + transformed to a secret for BackupPolicy's target + secret. + type: string + connectionCredential: + description: connectionCredential specifies the connection + credential to connect to the target database cluster. + properties: + hostKey: + description: hostKey specifies the map key of + the host in the connection credential secret. + type: string + passwordKey: + default: password + description: passwordKey specifies the map key + of the password in the connection credential + secret. This password will be saved in the backup + annotation for full backup. You can use the + environment variable DP_ENCRYPTION_KEY to specify + encryption key. + type: string + portKey: + description: portKey specifies the map key of + the port in the connection credential secret. + type: string + secretName: + description: secretName refers to the Secret object + that contains the connection credential. + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + usernameKey: + default: username + description: usernameKey specifies the map key + of the user in the connection credential secret. + type: string + required: + - secretName + type: object + connectionCredentialKey: + description: connectionCredentialKey defines connection + credential key in secret which created by spec.ConnectionCredential + of the ClusterDefinition. it will be ignored when + "account" is set. + properties: + hostKey: + description: hostKey specifies the map key of + the host in the connection credential secret. + type: string + passwordKey: + description: the key of password in the ConnectionCredential + secret. if not set, the default key is "password". + type: string + portKey: + description: portKey specifies the map key of + the port in the connection credential secret. + type: string + usernameKey: + description: the key of username in the ConnectionCredential + secret. if not set, the default key is "username". + type: string + type: object + podSelector: + description: podSelector is used to find the target + pod. The volumes of the target pod will be backed + up. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is "In", + and the values array contains only "value". + The requirements are ANDed. + type: object + strategy: + default: Any + description: 'strategy specifies the strategy + to select the target pod when multiple pods + are selected. Valid values are: - Any: select + any one pod that match the labelsSelector. - + All: select all pods that match the labelsSelector.' + enum: + - Any + - All + type: string + type: object + x-kubernetes-map-type: atomic + resources: + description: resources specifies the kubernetes resources + to back up. + properties: + excluded: + description: excluded is a slice of namespaced-scoped + resource type names to exclude in the kubernetes + resources. The default value is empty. + items: + type: string + type: array + included: + default: + - '*' + description: included is a slice of namespaced-scoped + resource type names to include in the kubernetes + resources. The default value is "*", which means + all resource types will be included. + items: + type: string + type: array + selector: + description: selector is a metav1.LabelSelector + to filter the target kubernetes resources that + need to be backed up. If not set, will do not + back up any kubernetes resources. + properties: + matchExpressions: + description: matchExpressions is a list of + label selector requirements. The requirements + are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only + "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + role: + description: 'select instance of corresponding role + for backup, role are: - the name of Leader/Follower/Leaner + for Consensus component. - primary or secondary + for Replication component. finally, invalid role + of the component will be ignored. such as if workload + type is Replication and component''s replicas is + 1, the secondary role is invalid. and it also will + be ignored when component is Stateful/Stateless. + the role will be transformed to a role LabelSelector + for BackupPolicy''s target attribute.' + type: string + serviceAccountName: + description: serviceAccountName specifies the service + account to run the backup workload. + type: string + strategy: + description: 'PodSelectionStrategy specifies the strategy + to select when multiple pods are selected for backup + target. Valid values are: - Any: select any one + pod that match the labelsSelector. - All: select + all pods that match the labelsSelector.' + enum: + - Any + - All + type: string + required: + - role + type: object + targetVolumes: + description: targetVolumes specifies which volumes from + the target should be mounted in the backup workload. + properties: + volumeMounts: + description: volumeMounts specifies the mount for + the volumes specified in `Volumes` section. + 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 + volumes: + description: Volumes indicates the list of volumes + of targeted application that should be mounted on + the backup job. + items: + type: string + type: array + type: object + required: + - name + type: object + type: array + componentDefRef: + description: componentDefRef references componentDef defined + in ClusterDefinition spec. Need to comply with IANA Service + Naming rule. + maxLength: 22 + pattern: ^[a-z]([a-z0-9\-]*[a-z0-9])?$ + type: string + componentDefs: + description: componentDef references componentDefinition. Need + to comply with IANA Service Naming rule. + items: + type: string + type: array + schedules: + description: schedule policy for backup. + items: + properties: + backupMethod: + description: backupMethod specifies the backup method + name that is defined in backupPolicy. + type: string + cronExpression: + description: the cron expression for schedule, the timezone + is in UTC. see https://en.wikipedia.org/wiki/Cron. + type: string + enabled: + description: enabled specifies whether the backup schedule + is enabled or not. + type: boolean + retentionPeriod: + default: 7d + description: "retentionPeriod determines a duration up + to which the backup should be kept. controller will + remove all backups that are older than the RetentionPeriod. + For example, RetentionPeriod of `30d` will keep only + the backups of last 30 days. Sample duration format: + - years: \t2y - months: \t6mo - days: \t\t30d - hours: + \t12h - minutes: \t30m You can also combine the above + durations. For example: 30d12h30m" + type: string + required: + - backupMethod + - cronExpression + type: object + type: array + target: + description: target instance for backup. + properties: + account: + description: refer to spec.componentDef.systemAccounts.accounts[*].name + in ClusterDefinition. the secret created by this account + will be used to connect the database. if not set, the + secret created by spec.ConnectionCredential of the ClusterDefinition + will be used. it will be transformed to a secret for BackupPolicy's + target secret. + type: string + connectionCredentialKey: + description: connectionCredentialKey defines connection + credential key in secret which created by spec.ConnectionCredential + of the ClusterDefinition. it will be ignored when "account" + is set. + properties: + hostKey: + description: hostKey specifies the map key of the host + in the connection credential secret. + type: string + passwordKey: + description: the key of password in the ConnectionCredential + secret. if not set, the default key is "password". + type: string + portKey: + description: portKey specifies the map key of the port + in the connection credential secret. + type: string + usernameKey: + description: the key of username in the ConnectionCredential + secret. if not set, the default key is "username". + type: string + type: object + role: + description: 'select instance of corresponding role for + backup, role are: - the name of Leader/Follower/Leaner + for Consensus component. - primary or secondary for Replication + component. finally, invalid role of the component will + be ignored. such as if workload type is Replication and + component''s replicas is 1, the secondary role is invalid. + and it also will be ignored when component is Stateful/Stateless. + the role will be transformed to a role LabelSelector for + BackupPolicy''s target attribute.' + type: string + strategy: + description: 'PodSelectionStrategy specifies the strategy + to select when multiple pods are selected for backup target. + Valid values are: - Any: select any one pod that match + the labelsSelector. - All: select all pods that match + the labelsSelector.' + enum: + - Any + - All + type: string + required: + - role + type: object + required: + - backupMethods + type: object + minItems: 1 + type: array + clusterDefinitionRef: + description: clusterDefinitionRef references ClusterDefinition name, + this is an immutable attribute. + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + x-kubernetes-validations: + - message: clusterDefinitionRef is immutable + rule: self == oldSelf + identifier: + description: Identifier is a unique identifier for this BackupPolicyTemplate. + this identifier will be the suffix of the automatically generated + backupPolicy name. and must be added when multiple BackupPolicyTemplates + exist, otherwise the generated backupPolicy override will occur. + maxLength: 20 + type: string + required: + - backupPolicies + - clusterDefinitionRef + type: object + status: + description: BackupPolicyTemplateStatus defines the observed state of + BackupPolicyTemplate + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.12.1 + labels: + app.kubernetes.io/name: kubeblocks + name: clusterdefinitions.apps.kubeblocks.io +spec: + group: apps.kubeblocks.io + names: + categories: + - kubeblocks + kind: ClusterDefinition + listKind: ClusterDefinitionList + plural: clusterdefinitions + shortNames: + - cd + singular: clusterdefinition + scope: Cluster + versions: + - additionalPrinterColumns: + - description: main component names + jsonPath: .spec.componentDefs[0].name + name: MAIN-COMPONENT-NAME + type: string + - description: status phase + jsonPath: .status.phase + name: STATUS + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: ClusterDefinition is the Schema for the clusterdefinitions 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: + type: object + spec: + description: ClusterDefinitionSpec defines the desired state of ClusterDefinition + properties: + componentDefs: + description: componentDefs provides cluster components definitions. + items: + description: ClusterComponentDefinition provides a workload component + specification template, with attributes that strongly work with + stateful workloads and day-2 operations behaviors. + properties: + characterType: + description: "characterType defines well-known database component + name, such as mongos(mongodb), proxy(redis), mariadb(mysql) + KubeBlocks will generate proper monitor configs for well-known + characterType when builtIn is true. \n CharacterType will + also be used in role probe to decide which probe engine to + use. current available candidates are: mysql, postgres, mongodb, + redis, etcd, kafka." + type: string + componentDefRef: + description: componentDefRef is used to inject values from other + components into the current component. values will be saved + and updated in a configmap and mounted to the current component. + items: + description: ComponentDefRef is used to select the component + and its fields to be referenced. + properties: + componentDefName: + description: componentDefName is the name of the componentDef + to select. + type: string + componentRefEnv: + description: componentRefEnv specifies a list of values + to be injected as env variables to each component. + items: + description: ComponentRefEnv specifies name and value + of an env. + properties: + name: + description: name is the name of the env to be injected, + and it must be a C identifier. + pattern: ^[A-Za-z_][A-Za-z0-9_]*$ + type: string + value: + description: value is the value of the env to be + injected. + type: string + valueFrom: + description: valueFrom specifies the source of the + env to be injected. + properties: + fieldPath: + description: 'fieldRef is the jsonpath of the + source to select when type is `FieldRef`. + there are two objects registered in the jsonpath: + `componentDef` and `components`. componentDef + is the component definition object specified + in `componentRef.componentDefName`. components + is the component list objects referring to + the component definition object.' + type: string + format: + default: ="$POD_FQDN" + description: 'format is the format of each headless + service address. there are three builtin variables + can be used as placeholder: $POD_ORDINAL, + $POD_FQDN, $POD_NAME $POD_ORDINAL is the ordinal + of the pod. $POD_FQDN is the fully qualified + domain name of the pod. $POD_NAME is the name + of the pod' + type: string + joinWith: + default: ',' + description: joinWith is the string to join + the values of headless service addresses. + type: string + type: + allOf: + - enum: + - FieldRef + - ServiceRef + - HeadlessServiceRef + - enum: + - FieldRef + - ServiceRef + - HeadlessServiceRef + description: 'type is the type of the source + to select. There are three types: `FieldRef`, + `ServiceRef`, `HeadlessServiceRef`.' + type: string + required: + - type + type: object + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + failurePolicy: + allOf: + - enum: + - Ignore + - Fail + - enum: + - Ignore + - Fail + description: failurePolicy is the failure policy of the + component. If failed to find the component, the failure + policy will be used. + type: string + required: + - componentDefName + type: object + type: array + x-kubernetes-list-map-keys: + - componentDefName + x-kubernetes-list-type: map + configSpecs: + description: The configSpec field provided by provider, and + finally this configTemplateRefs will be rendered into the + user's own configuration file according to the user's cluster. + items: + properties: + asEnvFrom: + description: 'asEnvFrom is optional: the list of containers + will be injected into EnvFrom.' + items: + type: string + type: array + x-kubernetes-list-type: set + constraintRef: + description: Specify the name of the referenced the configuration + constraints object. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + defaultMode: + description: 'defaultMode is optional: mode bits used + to set permissions on created files by default. Must + be an octal value between 0000 and 0777 or a decimal + value between 0 and 511. YAML accepts both octal and + decimal values, JSON requires decimal values for mode + bits. 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 + keys: + description: Specify a list of keys. If empty, ConfigConstraint + takes effect for all keys in configmap. + items: + type: string + type: array + x-kubernetes-list-type: set + legacyRenderedConfigSpec: + description: 'lazyRenderedConfigSpec is optional: specify + the secondary rendered config spec.' + properties: + namespace: + default: default + description: Specify the namespace of the referenced + the configuration template ConfigMap object. An + empty namespace is equivalent to the "default" namespace. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$ + type: string + policy: + default: none + description: policy defines how to merge external + imported templates into component templates. + enum: + - patch + - replace + - none + type: string + templateRef: + description: Specify the name of the referenced the + configuration template ConfigMap object. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + required: + - templateRef + type: object + name: + description: Specify the name of configuration template. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + namespace: + default: default + description: Specify the namespace of the referenced the + configuration template ConfigMap object. An empty namespace + is equivalent to the "default" namespace. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$ + type: string + templateRef: + description: Specify the name of the referenced the configuration + template ConfigMap object. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + volumeName: + description: volumeName is the volume name of PodTemplate, + which the configuration file produced through the configuration + template will be mounted to the corresponding volume. + Must be a DNS_LABEL name. The volume name must be defined + in podSpec.containers[*].volumeMounts. + maxLength: 63 + pattern: ^[a-z]([a-z0-9\-]*[a-z0-9])?$ + type: string + required: + - name + - templateRef + - volumeName + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + consensusSpec: + description: consensusSpec defines consensus related spec if + workloadType is Consensus, required if workloadType is Consensus. + properties: + followers: + description: followers, has voting right but not Leader. + items: + properties: + accessMode: + default: ReadWrite + description: accessMode, what service this member + capable. + enum: + - None + - Readonly + - ReadWrite + type: string + name: + default: leader + description: name, role name. + type: string + replicas: + default: 0 + description: replicas, number of Pods of this role. + default 1 for Leader default 0 for Learner default + Cluster.spec.componentSpec[*].Replicas - Leader.Replicas + - Learner.Replicas for Followers + format: int32 + minimum: 0 + type: integer + required: + - accessMode + - name + type: object + type: array + leader: + description: leader, one single leader. + properties: + accessMode: + default: ReadWrite + description: accessMode, what service this member capable. + enum: + - None + - Readonly + - ReadWrite + type: string + name: + default: leader + description: name, role name. + type: string + replicas: + default: 0 + description: replicas, number of Pods of this role. + default 1 for Leader default 0 for Learner default + Cluster.spec.componentSpec[*].Replicas - Leader.Replicas + - Learner.Replicas for Followers + format: int32 + minimum: 0 + type: integer + required: + - accessMode + - name + type: object + learner: + description: learner, no voting right. + properties: + accessMode: + default: ReadWrite + description: accessMode, what service this member capable. + enum: + - None + - Readonly + - ReadWrite + type: string + name: + default: leader + description: name, role name. + type: string + replicas: + default: 0 + description: replicas, number of Pods of this role. + default 1 for Leader default 0 for Learner default + Cluster.spec.componentSpec[*].Replicas - Leader.Replicas + - Learner.Replicas for Followers + format: int32 + minimum: 0 + type: integer + required: + - accessMode + - name + type: object + llPodManagementPolicy: + description: llPodManagementPolicy is the low-level controls + how pods are created during initial scale up, when replacing + pods on nodes, or when scaling down. `OrderedReady` policy + specify where pods are created in increasing order (pod-0, + then pod-1, etc) and the controller will wait until each + pod is ready before continuing. When scaling down, the + pods are removed in the opposite order. `Parallel` policy + specify create pods in parallel to match the desired scale + without waiting, and on scale down will delete all pods + at once. + type: string + llUpdateStrategy: + description: llUpdateStrategy indicates the low-level StatefulSetUpdateStrategy + that will be employed to update Pods in the StatefulSet + when a revision is made to Template. Will ignore `updateStrategy` + attribute if provided. + properties: + rollingUpdate: + description: RollingUpdate is used to communicate parameters + when Type is RollingUpdateStatefulSetStrategyType. + properties: + maxUnavailable: + anyOf: + - type: integer + - type: string + description: 'The maximum number of pods that can + be unavailable during the update. Value can be + an absolute number (ex: 5) or a percentage of + desired pods (ex: 10%). Absolute number is calculated + from percentage by rounding up. This can not be + 0. Defaults to 1. This field is alpha-level and + is only honored by servers that enable the MaxUnavailableStatefulSet + feature. The field applies to all pods in the + range 0 to Replicas-1. That means if there is + any unavailable pod in the range 0 to Replicas-1, + it will be counted towards MaxUnavailable.' + x-kubernetes-int-or-string: true + partition: + description: Partition indicates the ordinal at + which the StatefulSet should be partitioned for + updates. During a rolling update, all pods from + ordinal Replicas-1 to Partition are updated. All + pods from ordinal Partition-1 to 0 remain untouched. + This is helpful in being able to do a canary based + deployment. The default value is 0. + format: int32 + type: integer + type: object + type: + description: Type indicates the type of the StatefulSetUpdateStrategy. + Default is RollingUpdate. + type: string + type: object + updateStrategy: + default: Serial + description: "updateStrategy, Pods update strategy. In case + of workloadType=Consensus the update strategy will be + following: \n serial: update Pods one by one that guarantee + minimum component unavailable time. Learner -> Follower(with + AccessMode=none) -> Follower(with AccessMode=readonly) + -> Follower(with AccessMode=readWrite) -> Leader bestEffortParallel: + update Pods in parallel that guarantee minimum component + un-writable time. Learner, Follower(minority) in parallel + -> Follower(majority) -> Leader, keep majority online + all the time. parallel: force parallel" + enum: + - Serial + - BestEffortParallel + - Parallel + type: string + required: + - leader + type: object + customLabelSpecs: + description: customLabelSpecs is used for custom label tags + which you want to add to the component resources. + items: + properties: + key: + description: key name of label + type: string + resources: + description: resources defines the resources to be labeled. + items: + properties: + gvk: + description: gvk is Group/Version/Kind, for example + "v1/Pod", "apps/v1/StatefulSet", etc. when the + gvk resource filtered by the selector already + exists, if there is no corresponding custom label, + it will be added, and if label already exists, + it will be updated. + type: string + selector: + additionalProperties: + type: string + description: selector is a label query over a set + of resources. + type: object + required: + - gvk + type: object + type: array + value: + description: value of label + type: string + required: + - key + - value + type: object + type: array + x-kubernetes-list-map-keys: + - key + x-kubernetes-list-type: map + description: + description: The description of component definition. + type: string + horizontalScalePolicy: + description: horizontalScalePolicy controls the behavior of + horizontal scale. + properties: + backupPolicyTemplateName: + description: BackupPolicyTemplateName reference the backup + policy template. + type: string + type: + default: None + description: 'type controls what kind of data synchronization + do when component scale out. Policy is in enum of {None, + CloneVolume}. The default policy is `None`. None: Default + policy, create empty volume and no data clone. CloneVolume: + Do data clone to newly scaled pods. Prefer to use volume + snapshot first, and will try backup tool if volume snapshot + is not enabled, finally report error if both above cannot + work. Snapshot: Deprecated, alias for CloneVolume.' + enum: + - None + - CloneVolume + - Snapshot + type: string + volumeMountsName: + description: volumeMountsName defines which volumeMount + of the container to do backup, only work if Type is not + None if not specified, the 1st volumeMount will be chosen + type: string + type: object + logConfigs: + description: logConfigs is detail log file config which provided + by provider. + items: + properties: + filePathPattern: + description: filePathPattern log file path pattern which + indicate how to find this file corresponding to variable + (log path) in database kernel. please don't set this + casually. + maxLength: 4096 + type: string + name: + description: name log type name, such as slow for MySQL + slow log file. + maxLength: 128 + type: string + required: + - filePathPattern + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + monitor: + description: monitor is monitoring config which provided by + provider. + properties: + builtIn: + default: false + description: builtIn is a switch to enable KubeBlocks builtIn + monitoring. If BuiltIn is set to true, monitor metrics + will be scraped automatically. If BuiltIn is set to false, + the provider should set ExporterConfig and Sidecar container + own. + type: boolean + exporterConfig: + description: exporterConfig provided by provider, which + specify necessary information to Time Series Database. + exporterConfig is valid when builtIn is false. + properties: + scrapePath: + default: /metrics + description: scrapePath is exporter url path for Time + Series Database to scrape metrics. + maxLength: 128 + type: string + scrapePort: + anyOf: + - type: integer + - type: string + description: scrapePort is exporter port for Time Series + Database to scrape metrics. + x-kubernetes-int-or-string: true + required: + - scrapePort + type: object + type: object + name: + description: A component definition name, this name could be + used as default name of `Cluster.spec.componentSpecs.name`, + and so this name is need to conform with same validation rules + as `Cluster.spec.componentSpecs.name`, that is currently comply + with IANA Service Naming rule. This name will apply to "apps.kubeblocks.io/component-name" + object label value. + maxLength: 22 + pattern: ^[a-z]([a-z0-9\-]*[a-z0-9])?$ + type: string + podSpec: + description: podSpec define pod spec template of the cluster + component. + properties: + activeDeadlineSeconds: + description: Optional duration in seconds the pod may be + active on the node relative to StartTime before the system + will actively try to mark it failed and kill associated + containers. Value must be a positive integer. + format: int64 + type: integer + affinity: + description: If specified, the pod's scheduling constraints + properties: + nodeAffinity: + description: Describes node affinity scheduling rules + for the pod. + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule + pods to nodes that satisfy the affinity expressions + specified by this field, but it may choose a node + that violates one or more of the expressions. + The node that is most preferred is the one with + the greatest sum of weights, i.e. for each node + that meets all of the scheduling requirements + (resource request, requiredDuringScheduling affinity + expressions, etc.), compute a sum by iterating + through the elements of this field and adding + "weight" to the sum if the node matches the corresponding + matchExpressions; the node(s) with the highest + sum are the most preferred. + items: + description: An empty preferred scheduling term + matches all objects with implicit weight 0 (i.e. + it's a no-op). A null preferred scheduling term + matches no objects (i.e. is also a no-op). + properties: + preference: + description: A node selector term, associated + with the corresponding weight. + properties: + matchExpressions: + description: A list of node selector requirements + by node's labels. + items: + description: A node selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: The label key that + the selector applies to. + type: string + operator: + description: Represents a key's + relationship to a set of values. + Valid operators are In, NotIn, + Exists, DoesNotExist. Gt, and + Lt. + type: string + values: + description: 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. If + the operator is Gt or Lt, the + values array must have a single + element, which will be interpreted + as an integer. This array is replaced + during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + description: A list of node selector requirements + by node's fields. + items: + description: A node selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: The label key that + the selector applies to. + type: string + operator: + description: Represents a key's + relationship to a set of values. + Valid operators are In, NotIn, + Exists, DoesNotExist. Gt, and + Lt. + type: string + values: + description: 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. If + the operator is Gt or Lt, the + values array must have a single + element, which will be interpreted + as an integer. This array is replaced + during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + x-kubernetes-map-type: atomic + weight: + description: Weight associated with matching + the corresponding nodeSelectorTerm, in the + range 1-100. + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the affinity requirements specified + by this field are not met at scheduling time, + the pod will not be scheduled onto the node. If + the affinity requirements specified by this field + cease to be met at some point during pod execution + (e.g. due to an update), the system may or may + not try to eventually evict the pod from its node. + properties: + nodeSelectorTerms: + description: Required. A list of node selector + terms. The terms are ORed. + items: + description: A null or empty node selector + term matches no objects. The requirements + of them are ANDed. The TopologySelectorTerm + type implements a subset of the NodeSelectorTerm. + properties: + matchExpressions: + description: A list of node selector requirements + by node's labels. + items: + description: A node selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: The label key that + the selector applies to. + type: string + operator: + description: Represents a key's + relationship to a set of values. + Valid operators are In, NotIn, + Exists, DoesNotExist. Gt, and + Lt. + type: string + values: + description: 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. If + the operator is Gt or Lt, the + values array must have a single + element, which will be interpreted + as an integer. This array is replaced + during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + description: A list of node selector requirements + by node's fields. + items: + description: A node selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: The label key that + the selector applies to. + type: string + operator: + description: Represents a key's + relationship to a set of values. + Valid operators are In, NotIn, + Exists, DoesNotExist. Gt, and + Lt. + type: string + values: + description: 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. If + the operator is Gt or Lt, the + values array must have a single + element, which will be interpreted + as an integer. This array is replaced + during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + x-kubernetes-map-type: atomic + type: array + required: + - nodeSelectorTerms + type: object + x-kubernetes-map-type: atomic + type: object + podAffinity: + description: Describes pod affinity scheduling rules + (e.g. co-locate this pod in the same node, zone, etc. + as some other pod(s)). + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule + pods to nodes that satisfy the affinity expressions + specified by this field, but it may choose a node + that violates one or more of the expressions. + The node that is most preferred is the one with + the greatest sum of weights, i.e. for each node + that meets all of the scheduling requirements + (resource request, requiredDuringScheduling affinity + expressions, etc.), compute a sum by iterating + through the elements of this field and adding + "weight" to the sum if the node has pods which + matches the corresponding podAffinityTerm; the + node(s) with the highest sum are the most preferred. + items: + description: The weights of all of the matched + WeightedPodAffinityTerm fields are added per-node + to find the most preferred node(s) + properties: + podAffinityTerm: + description: Required. A pod affinity term, + associated with the corresponding weight. + properties: + labelSelector: + description: A label query over a set + of resources, in this case pods. + properties: + matchExpressions: + description: matchExpressions is a + list of label selector requirements. + The requirements are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map + of {key,value} pairs. A single {key,value} + in the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are + ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaceSelector: + description: A label query over the set + of namespaces that the term applies + to. The term is applied to the union + of the namespaces selected by this field + and the ones listed in the namespaces + field. null selector and null or empty + namespaces list means "this pod's namespace". + An empty selector ({}) matches all namespaces. + properties: + matchExpressions: + description: matchExpressions is a + list of label selector requirements. + The requirements are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map + of {key,value} pairs. A single {key,value} + in the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are + ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static + list of namespace names that the term + applies to. The term is applied to the + union of the namespaces listed in this + field and the ones selected by namespaceSelector. + null or empty namespaces list and null + namespaceSelector means "this pod's + namespace". + items: + type: string + type: array + topologyKey: + description: This pod should be co-located + (affinity) or not co-located (anti-affinity) + with the pods matching the labelSelector + in the specified namespaces, where co-located + is defined as running on a node whose + value of the label with key topologyKey + matches that of any node on which any + of the selected pods is running. Empty + topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + weight: + description: weight associated with matching + the corresponding podAffinityTerm, in the + range 1-100. + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the affinity requirements specified + by this field are not met at scheduling time, + the pod will not be scheduled onto the node. If + the affinity requirements specified by this field + cease to be met at some point during pod execution + (e.g. due to a pod label update), the system may + or may not try to eventually evict the pod from + its node. When there are multiple elements, the + lists of nodes corresponding to each podAffinityTerm + are intersected, i.e. all terms must be satisfied. + items: + description: Defines a set of pods (namely those + matching the labelSelector relative to the given + namespace(s)) that this pod should be co-located + (affinity) or not co-located (anti-affinity) + with, where co-located is defined as running + on a node whose value of the label with key + matches that of any node on which + a pod of the set of pods is running + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaceSelector: + description: A label query over the set of + namespaces that the term applies to. The + term is applied to the union of the namespaces + selected by this field and the ones listed + in the namespaces field. null selector and + null or empty namespaces list means "this + pod's namespace". An empty selector ({}) + matches all namespaces. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static + list of namespace names that the term applies + to. The term is applied to the union of + the namespaces listed in this field and + the ones selected by namespaceSelector. + null or empty namespaces list and null namespaceSelector + means "this pod's namespace". + items: + type: string + type: array + topologyKey: + description: This pod should be co-located + (affinity) or not co-located (anti-affinity) + with the pods matching the labelSelector + in the specified namespaces, where co-located + is defined as running on a node whose value + of the label with key topologyKey matches + that of any node on which any of the selected + pods is running. Empty topologyKey is not + allowed. + type: string + required: + - topologyKey + type: object + type: array + type: object + podAntiAffinity: + description: Describes pod anti-affinity scheduling + rules (e.g. avoid putting this pod in the same node, + zone, etc. as some other pod(s)). + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule + pods to nodes that satisfy the anti-affinity expressions + specified by this field, but it may choose a node + that violates one or more of the expressions. + The node that is most preferred is the one with + the greatest sum of weights, i.e. for each node + that meets all of the scheduling requirements + (resource request, requiredDuringScheduling anti-affinity + expressions, etc.), compute a sum by iterating + through the elements of this field and adding + "weight" to the sum if the node has pods which + matches the corresponding podAffinityTerm; the + node(s) with the highest sum are the most preferred. + items: + description: The weights of all of the matched + WeightedPodAffinityTerm fields are added per-node + to find the most preferred node(s) + properties: + podAffinityTerm: + description: Required. A pod affinity term, + associated with the corresponding weight. + properties: + labelSelector: + description: A label query over a set + of resources, in this case pods. + properties: + matchExpressions: + description: matchExpressions is a + list of label selector requirements. + The requirements are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map + of {key,value} pairs. A single {key,value} + in the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are + ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaceSelector: + description: A label query over the set + of namespaces that the term applies + to. The term is applied to the union + of the namespaces selected by this field + and the ones listed in the namespaces + field. null selector and null or empty + namespaces list means "this pod's namespace". + An empty selector ({}) matches all namespaces. + properties: + matchExpressions: + description: matchExpressions is a + list of label selector requirements. + The requirements are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map + of {key,value} pairs. A single {key,value} + in the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are + ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static + list of namespace names that the term + applies to. The term is applied to the + union of the namespaces listed in this + field and the ones selected by namespaceSelector. + null or empty namespaces list and null + namespaceSelector means "this pod's + namespace". + items: + type: string + type: array + topologyKey: + description: This pod should be co-located + (affinity) or not co-located (anti-affinity) + with the pods matching the labelSelector + in the specified namespaces, where co-located + is defined as running on a node whose + value of the label with key topologyKey + matches that of any node on which any + of the selected pods is running. Empty + topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + weight: + description: weight associated with matching + the corresponding podAffinityTerm, in the + range 1-100. + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the anti-affinity requirements specified + by this field are not met at scheduling time, + the pod will not be scheduled onto the node. If + the anti-affinity requirements specified by this + field cease to be met at some point during pod + execution (e.g. due to a pod label update), the + system may or may not try to eventually evict + the pod from its node. When there are multiple + elements, the lists of nodes corresponding to + each podAffinityTerm are intersected, i.e. all + terms must be satisfied. + items: + description: Defines a set of pods (namely those + matching the labelSelector relative to the given + namespace(s)) that this pod should be co-located + (affinity) or not co-located (anti-affinity) + with, where co-located is defined as running + on a node whose value of the label with key + matches that of any node on which + a pod of the set of pods is running + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaceSelector: + description: A label query over the set of + namespaces that the term applies to. The + term is applied to the union of the namespaces + selected by this field and the ones listed + in the namespaces field. null selector and + null or empty namespaces list means "this + pod's namespace". An empty selector ({}) + matches all namespaces. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static + list of namespace names that the term applies + to. The term is applied to the union of + the namespaces listed in this field and + the ones selected by namespaceSelector. + null or empty namespaces list and null namespaceSelector + means "this pod's namespace". + items: + type: string + type: array + topologyKey: + description: This pod should be co-located + (affinity) or not co-located (anti-affinity) + with the pods matching the labelSelector + in the specified namespaces, where co-located + is defined as running on a node whose value + of the label with key topologyKey matches + that of any node on which any of the selected + pods is running. Empty topologyKey is not + allowed. + type: string + required: + - topologyKey + type: object + type: array + type: object + type: object + automountServiceAccountToken: + description: AutomountServiceAccountToken indicates whether + a service account token should be automatically mounted. + type: boolean + containers: + description: List of containers belonging to the pod. Containers + cannot currently be added or removed. There must be at + least one container in a Pod. Cannot be updated. + items: + description: A single application container that you want + to run within a pod. + properties: + args: + description: 'Arguments to the entrypoint. The container + image''s CMD is used if this is not provided. Variable + references $(VAR_NAME) are expanded using the container''s + environment. If a variable cannot be resolved, the + reference in the input string will be unchanged. + Double $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" + will produce the string literal "$(VAR_NAME)". Escaped + references will never be expanded, regardless of + whether the variable exists or not. Cannot be updated. + More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + command: + description: 'Entrypoint array. Not executed within + a shell. The container image''s ENTRYPOINT is used + if this is not provided. Variable references $(VAR_NAME) + are expanded using the container''s environment. + If a variable cannot be resolved, the reference + in the input string will be unchanged. Double $$ + are reduced to a single $, which allows for escaping + the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will + produce the string literal "$(VAR_NAME)". Escaped + references will never be expanded, regardless of + whether the variable exists or not. Cannot be updated. + More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + 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 previously 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. Double $$ are reduced + to a single $, which allows for escaping the + $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will + produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, + regardless of whether the variable exists + or not. 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + type: object + type: array + image: + description: 'Container 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: 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. + This will be canonicalized upon + output, so case-variant names + will be understood as the same + header. + 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: Deprecated. TCPSocket is NOT + supported as a LifecycleHandler and kept + for the backward compatibility. There are + no validation of this field and lifecycle + hooks will fail in runtime when tcp handler + is specified. + 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 Pod''s termination grace + period countdown begins before the PreStop hook + is executed. Regardless of the outcome of the + handler, the container will eventually terminate + within the Pod''s termination grace period (unless + delayed by finalizers). 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: 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. + This will be canonicalized upon + output, so case-variant names + will be understood as the same + header. + 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: Deprecated. TCPSocket is NOT + supported as a LifecycleHandler and kept + for the backward compatibility. There are + no validation of this field and lifecycle + hooks will fail in runtime when tcp handler + is specified. + 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: 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 + grpc: + description: GRPC specifies an action involving + a GRPC port. + properties: + port: + description: Port number of the gRPC service. + Number must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service + to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default + behavior is defined by gRPC." + type: string + required: + - port + 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. + This will be canonicalized upon output, + so case-variant names will be understood + as the same header. + 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. + 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 + terminationGracePeriodSeconds: + description: Optional duration in seconds the + pod needs to terminate gracefully upon probe + failure. The grace period is the duration in + seconds after the processes running in the pod + are sent a termination signal and the time when + the processes are forcibly halted with a kill + signal. Set this value longer than the expected + cleanup time for your process. If this value + is nil, the pod's terminationGracePeriodSeconds + will be used. Otherwise, this value overrides + the value provided by the pod spec. Value must + be non-negative integer. The value zero indicates + stop immediately via the kill signal (no opportunity + to shut down). This is a beta field and requires + enabling ProbeTerminationGracePeriod feature + gate. Minimum value is 1. spec.terminationGracePeriodSeconds + is used if unset. + format: int64 + type: integer + 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. + 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. Modifying this + array with strategic merge patch may corrupt the + data. For more information See https://github.com/kubernetes/kubernetes/issues/108255. + 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: 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 + grpc: + description: GRPC specifies an action involving + a GRPC port. + properties: + port: + description: Port number of the gRPC service. + Number must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service + to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default + behavior is defined by gRPC." + type: string + required: + - port + 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. + This will be canonicalized upon output, + so case-variant names will be understood + as the same header. + 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. + 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 + terminationGracePeriodSeconds: + description: Optional duration in seconds the + pod needs to terminate gracefully upon probe + failure. The grace period is the duration in + seconds after the processes running in the pod + are sent a termination signal and the time when + the processes are forcibly halted with a kill + signal. Set this value longer than the expected + cleanup time for your process. If this value + is nil, the pod's terminationGracePeriodSeconds + will be used. Otherwise, this value overrides + the value provided by the pod spec. Value must + be non-negative integer. The value zero indicates + stop immediately via the kill signal (no opportunity + to shut down). This is a beta field and requires + enabling ProbeTerminationGracePeriod feature + gate. Minimum value is 1. spec.terminationGracePeriodSeconds + is used if unset. + format: int64 + type: integer + 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 + resizePolicy: + description: Resources resize policy for the container. + items: + description: ContainerResizePolicy represents resource + resize policy for the container. + properties: + resourceName: + description: 'Name of the resource to which + this resource resize policy applies. Supported + values: cpu, memory.' + type: string + restartPolicy: + description: Restart policy to apply when specified + resource is resized. If not specified, it + defaults to NotRequired. + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + description: 'Compute Resources required by this container. + Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + properties: + claims: + description: "Claims lists the names of resources, + defined in spec.resourceClaims, that are used + by this container. \n This is an alpha field + and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It + can only be set for containers." + items: + description: ResourceClaim references one entry + in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of + one entry in pod.spec.resourceClaims of + the Pod where this field is used. It makes + that resource available inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + 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-resources-containers/' + 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. Requests cannot + exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + restartPolicy: + description: 'RestartPolicy defines the restart behavior + of individual containers in a pod. This field may + only be set for init containers, and the only allowed + value is "Always". For non-init containers or when + this field is not specified, the restart behavior + is defined by the Pod''s restart policy and the + container type. Setting the RestartPolicy as "Always" + for the init container will have the following effect: + this init container will be continually restarted + on exit until all regular containers have terminated. + Once all regular containers have completed, all + init containers with restartPolicy "Always" will + be shut down. This lifecycle differs from normal + init containers and is often referred to as a "sidecar" + container. Although this init container still starts + in the init container sequence, it does not wait + for the container to complete before proceeding + to the next init container. Instead, the next init + container starts immediately after this init container + is started, or after any startupProbe has successfully + completed.' + type: string + securityContext: + description: 'SecurityContext defines the security + options the container should be run with. If set, + the fields of SecurityContext override the equivalent + fields of PodSecurityContext. 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 Note that + this field cannot be set when spec.os.name is + windows.' + type: boolean + capabilities: + description: The capabilities to add/drop when + running containers. Defaults to the default + set of capabilities granted by the container + runtime. Note that this field cannot be set + when spec.os.name is windows. + 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. Note that this field cannot be set when + spec.os.name is windows. + 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. Note that this field cannot + be set when spec.os.name is windows. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only + root filesystem. Default is false. Note that + this field cannot be set when spec.os.name is + windows. + 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. Note that this field cannot be set + when spec.os.name is windows. + 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. Note that + this field cannot be set when spec.os.name is + windows. + 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. Note that this field cannot be set + when spec.os.name is windows. + 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 + seccompProfile: + description: The seccomp options to use by this + container. If seccomp options are provided at + both the pod & container level, the container + options override the pod options. Note that + this field cannot be set when spec.os.name is + windows. + properties: + localhostProfile: + description: localhostProfile indicates a + profile defined in a file on the node should + be used. The profile must be preconfigured + on the node to work. Must be a descending + path, relative to the kubelet's configured + seccomp profile location. Must be set if + type is "Localhost". Must NOT be set for + any other type. + type: string + type: + description: "type indicates which kind of + seccomp profile will be applied. Valid options + are: \n Localhost - a profile defined in + a file on the node should be used. RuntimeDefault + - the container runtime default profile + should be used. Unconfined - no profile + should be applied." + type: string + required: + - type + 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. Note that this field cannot be set + when spec.os.name is linux. + 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. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the + name of the GMSA credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container + should be run as a 'Host Process' container. + All of a Pod's containers must have the + same effective HostProcess value (it is + not allowed to have a mix of HostProcess + containers and non-HostProcess containers). + In addition, if HostProcess is true then + HostNetwork must also be set to true. + type: boolean + 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. + 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. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: 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 + grpc: + description: GRPC specifies an action involving + a GRPC port. + properties: + port: + description: Port number of the gRPC service. + Number must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service + to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default + behavior is defined by gRPC." + type: string + required: + - port + 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. + This will be canonicalized upon output, + so case-variant names will be understood + as the same header. + 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. + 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 + terminationGracePeriodSeconds: + description: Optional duration in seconds the + pod needs to terminate gracefully upon probe + failure. The grace period is the duration in + seconds after the processes running in the pod + are sent a termination signal and the time when + the processes are forcibly halted with a kill + signal. Set this value longer than the expected + cleanup time for your process. If this value + is nil, the pod's terminationGracePeriodSeconds + will be used. Otherwise, this value overrides + the value provided by the pod spec. Value must + be non-negative integer. The value zero indicates + stop immediately via the kill signal (no opportunity + to shut down). This is a beta field and requires + enabling ProbeTerminationGracePeriod feature + gate. Minimum value is 1. spec.terminationGracePeriodSeconds + is used if unset. + format: int64 + type: integer + 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. + 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 + type: array + dnsConfig: + description: Specifies the DNS parameters of a pod. Parameters + specified here will be merged to the generated DNS configuration + based on DNSPolicy. + properties: + nameservers: + description: A list of DNS name server IP addresses. + This will be appended to the base nameservers generated + from DNSPolicy. Duplicated nameservers will be removed. + items: + type: string + type: array + options: + description: A list of DNS resolver options. This will + be merged with the base options generated from DNSPolicy. + Duplicated entries will be removed. Resolution options + given in Options will override those that appear in + the base DNSPolicy. + items: + description: PodDNSConfigOption defines DNS resolver + options of a pod. + properties: + name: + description: Required. + type: string + value: + type: string + type: object + type: array + searches: + description: A list of DNS search domains for host-name + lookup. This will be appended to the base search paths + generated from DNSPolicy. Duplicated search paths + will be removed. + items: + type: string + type: array + type: object + dnsPolicy: + description: Set DNS policy for the pod. Defaults to "ClusterFirst". + Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', + 'Default' or 'None'. DNS parameters given in DNSConfig + will be merged with the policy selected with DNSPolicy. + To have DNS options set along with hostNetwork, you have + to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. + type: string + enableServiceLinks: + description: 'EnableServiceLinks indicates whether information + about services should be injected into pod''s environment + variables, matching the syntax of Docker links. Optional: + Defaults to true.' + type: boolean + ephemeralContainers: + description: List of ephemeral containers run in this pod. + Ephemeral containers may be run in an existing pod to + perform user-initiated actions such as debugging. This + list cannot be specified when creating a pod, and it cannot + be modified by updating the pod spec. In order to add + an ephemeral container to an existing pod, use the pod's + ephemeralcontainers subresource. + items: + description: "An EphemeralContainer is a temporary container + that you may add to an existing Pod for user-initiated + activities such as debugging. Ephemeral containers have + no resource or scheduling guarantees, and they will + not be restarted when they exit or when a Pod is removed + or restarted. The kubelet may evict a Pod if an ephemeral + container causes the Pod to exceed its resource allocation. + \n To add an ephemeral container, use the ephemeralcontainers + subresource of an existing Pod. Ephemeral containers + may not be removed or restarted." + properties: + args: + description: 'Arguments to the entrypoint. The image''s + CMD is used if this is not provided. Variable references + $(VAR_NAME) are expanded using the container''s + environment. If a variable cannot be resolved, the + reference in the input string will be unchanged. + Double $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" + will produce the string literal "$(VAR_NAME)". Escaped + references will never be expanded, regardless of + whether the variable exists or not. Cannot be updated. + More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + command: + description: 'Entrypoint array. Not executed within + a shell. The image''s ENTRYPOINT is used if this + is not provided. Variable references $(VAR_NAME) + are expanded using the container''s environment. + If a variable cannot be resolved, the reference + in the input string will be unchanged. Double $$ + are reduced to a single $, which allows for escaping + the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will + produce the string literal "$(VAR_NAME)". Escaped + references will never be expanded, regardless of + whether the variable exists or not. Cannot be updated. + More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + 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 previously 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. Double $$ are reduced + to a single $, which allows for escaping the + $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will + produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, + regardless of whether the variable exists + or not. 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + type: object + type: array + image: + description: 'Container image name. More info: https://kubernetes.io/docs/concepts/containers/images' + 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: Lifecycle is not allowed for ephemeral + containers. + 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: 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. + This will be canonicalized upon + output, so case-variant names + will be understood as the same + header. + 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: Deprecated. TCPSocket is NOT + supported as a LifecycleHandler and kept + for the backward compatibility. There are + no validation of this field and lifecycle + hooks will fail in runtime when tcp handler + is specified. + 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 Pod''s termination grace + period countdown begins before the PreStop hook + is executed. Regardless of the outcome of the + handler, the container will eventually terminate + within the Pod''s termination grace period (unless + delayed by finalizers). 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: 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. + This will be canonicalized upon + output, so case-variant names + will be understood as the same + header. + 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: Deprecated. TCPSocket is NOT + supported as a LifecycleHandler and kept + for the backward compatibility. There are + no validation of this field and lifecycle + hooks will fail in runtime when tcp handler + is specified. + 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: Probes are not allowed for ephemeral + containers. + properties: + exec: + description: 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 + grpc: + description: GRPC specifies an action involving + a GRPC port. + properties: + port: + description: Port number of the gRPC service. + Number must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service + to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default + behavior is defined by gRPC." + type: string + required: + - port + 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. + This will be canonicalized upon output, + so case-variant names will be understood + as the same header. + 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. + 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 + terminationGracePeriodSeconds: + description: Optional duration in seconds the + pod needs to terminate gracefully upon probe + failure. The grace period is the duration in + seconds after the processes running in the pod + are sent a termination signal and the time when + the processes are forcibly halted with a kill + signal. Set this value longer than the expected + cleanup time for your process. If this value + is nil, the pod's terminationGracePeriodSeconds + will be used. Otherwise, this value overrides + the value provided by the pod spec. Value must + be non-negative integer. The value zero indicates + stop immediately via the kill signal (no opportunity + to shut down). This is a beta field and requires + enabling ProbeTerminationGracePeriod feature + gate. Minimum value is 1. spec.terminationGracePeriodSeconds + is used if unset. + format: int64 + type: integer + 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 ephemeral container specified + as a DNS_LABEL. This name must be unique among all + containers, init containers and ephemeral containers. + type: string + ports: + description: Ports are not allowed for ephemeral containers. + 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: Probes are not allowed for ephemeral + containers. + properties: + exec: + description: 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 + grpc: + description: GRPC specifies an action involving + a GRPC port. + properties: + port: + description: Port number of the gRPC service. + Number must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service + to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default + behavior is defined by gRPC." + type: string + required: + - port + 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. + This will be canonicalized upon output, + so case-variant names will be understood + as the same header. + 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. + 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 + terminationGracePeriodSeconds: + description: Optional duration in seconds the + pod needs to terminate gracefully upon probe + failure. The grace period is the duration in + seconds after the processes running in the pod + are sent a termination signal and the time when + the processes are forcibly halted with a kill + signal. Set this value longer than the expected + cleanup time for your process. If this value + is nil, the pod's terminationGracePeriodSeconds + will be used. Otherwise, this value overrides + the value provided by the pod spec. Value must + be non-negative integer. The value zero indicates + stop immediately via the kill signal (no opportunity + to shut down). This is a beta field and requires + enabling ProbeTerminationGracePeriod feature + gate. Minimum value is 1. spec.terminationGracePeriodSeconds + is used if unset. + format: int64 + type: integer + 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 + resizePolicy: + description: Resources resize policy for the container. + items: + description: ContainerResizePolicy represents resource + resize policy for the container. + properties: + resourceName: + description: 'Name of the resource to which + this resource resize policy applies. Supported + values: cpu, memory.' + type: string + restartPolicy: + description: Restart policy to apply when specified + resource is resized. If not specified, it + defaults to NotRequired. + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + description: Resources are not allowed for ephemeral + containers. Ephemeral containers use spare resources + already allocated to the pod. + properties: + claims: + description: "Claims lists the names of resources, + defined in spec.resourceClaims, that are used + by this container. \n This is an alpha field + and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It + can only be set for containers." + items: + description: ResourceClaim references one entry + in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of + one entry in pod.spec.resourceClaims of + the Pod where this field is used. It makes + that resource available inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + 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-resources-containers/' + 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. Requests cannot + exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + restartPolicy: + description: Restart policy for the container to manage + the restart behavior of each container within a + pod. This may only be set for init containers. You + cannot set this field on ephemeral containers. + type: string + securityContext: + description: 'Optional: SecurityContext defines the + security options the ephemeral container should + be run with. If set, the fields of SecurityContext + override the equivalent fields of PodSecurityContext.' + 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 Note that + this field cannot be set when spec.os.name is + windows.' + type: boolean + capabilities: + description: The capabilities to add/drop when + running containers. Defaults to the default + set of capabilities granted by the container + runtime. Note that this field cannot be set + when spec.os.name is windows. + 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. Note that this field cannot be set when + spec.os.name is windows. + 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. Note that this field cannot + be set when spec.os.name is windows. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only + root filesystem. Default is false. Note that + this field cannot be set when spec.os.name is + windows. + 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. Note that this field cannot be set + when spec.os.name is windows. + 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. Note that + this field cannot be set when spec.os.name is + windows. + 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. Note that this field cannot be set + when spec.os.name is windows. + 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 + seccompProfile: + description: The seccomp options to use by this + container. If seccomp options are provided at + both the pod & container level, the container + options override the pod options. Note that + this field cannot be set when spec.os.name is + windows. + properties: + localhostProfile: + description: localhostProfile indicates a + profile defined in a file on the node should + be used. The profile must be preconfigured + on the node to work. Must be a descending + path, relative to the kubelet's configured + seccomp profile location. Must be set if + type is "Localhost". Must NOT be set for + any other type. + type: string + type: + description: "type indicates which kind of + seccomp profile will be applied. Valid options + are: \n Localhost - a profile defined in + a file on the node should be used. RuntimeDefault + - the container runtime default profile + should be used. Unconfined - no profile + should be applied." + type: string + required: + - type + 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. Note that this field cannot be set + when spec.os.name is linux. + 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. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the + name of the GMSA credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container + should be run as a 'Host Process' container. + All of a Pod's containers must have the + same effective HostProcess value (it is + not allowed to have a mix of HostProcess + containers and non-HostProcess containers). + In addition, if HostProcess is true then + HostNetwork must also be set to true. + type: boolean + 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. + type: string + type: object + type: object + startupProbe: + description: Probes are not allowed for ephemeral + containers. + properties: + exec: + description: 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 + grpc: + description: GRPC specifies an action involving + a GRPC port. + properties: + port: + description: Port number of the gRPC service. + Number must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service + to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default + behavior is defined by gRPC." + type: string + required: + - port + 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. + This will be canonicalized upon output, + so case-variant names will be understood + as the same header. + 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. + 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 + terminationGracePeriodSeconds: + description: Optional duration in seconds the + pod needs to terminate gracefully upon probe + failure. The grace period is the duration in + seconds after the processes running in the pod + are sent a termination signal and the time when + the processes are forcibly halted with a kill + signal. Set this value longer than the expected + cleanup time for your process. If this value + is nil, the pod's terminationGracePeriodSeconds + will be used. Otherwise, this value overrides + the value provided by the pod spec. Value must + be non-negative integer. The value zero indicates + stop immediately via the kill signal (no opportunity + to shut down). This is a beta field and requires + enabling ProbeTerminationGracePeriod feature + gate. Minimum value is 1. spec.terminationGracePeriodSeconds + is used if unset. + format: int64 + type: integer + 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 + targetContainerName: + description: "If set, the name of the container from + PodSpec that this ephemeral container targets. The + ephemeral container will be run in the namespaces + (IPC, PID, etc) of this container. If not set then + the ephemeral container uses the namespaces configured + in the Pod spec. \n The container runtime must implement + support for this feature. If the runtime does not + support namespace targeting then the result of setting + this field is undefined." + type: string + 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. + 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. Subpath mounts are not allowed for ephemeral + containers. 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 + type: array + hostAliases: + description: HostAliases is an optional list of hosts and + IPs that will be injected into the pod's hosts file if + specified. This is only valid for non-hostNetwork pods. + items: + description: HostAlias holds the mapping between IP and + hostnames that will be injected as an entry in the pod's + hosts file. + properties: + hostnames: + description: Hostnames for the above IP address. + items: + type: string + type: array + ip: + description: IP address of the host file entry. + type: string + type: object + type: array + hostIPC: + description: 'Use the host''s ipc namespace. Optional: Default + to false.' + type: boolean + hostNetwork: + description: Host networking requested for this pod. Use + the host's network namespace. If this option is set, the + ports that will be used must be specified. Default to + false. + type: boolean + hostPID: + description: 'Use the host''s pid namespace. Optional: Default + to false.' + type: boolean + hostUsers: + description: 'Use the host''s user namespace. Optional: + Default to true. If set to true or not present, the pod + will be run in the host user namespace, useful for when + the pod needs a feature only available to the host user + namespace, such as loading a kernel module with CAP_SYS_MODULE. + When set to false, a new userns is created for the pod. + Setting false is useful for mitigating container breakout + vulnerabilities even allowing users to run their containers + as root without actually having root privileges on the + host. This field is alpha-level and is only honored by + servers that enable the UserNamespacesSupport feature.' + type: boolean + hostname: + description: Specifies the hostname of the Pod If not specified, + the pod's hostname will be set to a system-defined value. + type: string + imagePullSecrets: + description: 'ImagePullSecrets is an optional list of references + to secrets in the same namespace to use for pulling any + of the images used by this PodSpec. If specified, these + secrets will be passed to individual puller implementations + for them to use. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod' + items: + description: LocalObjectReference contains enough information + to let you locate the referenced object inside the same + namespace. + 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 + x-kubernetes-map-type: atomic + type: array + initContainers: + description: 'List of initialization containers belonging + to the pod. Init containers are executed in order prior + to containers being started. If any init container fails, + the pod is considered to have failed and is handled according + to its restartPolicy. The name for an init container or + normal container must be unique among all containers. + Init containers may not have Lifecycle actions, Readiness + probes, Liveness probes, or Startup probes. The resourceRequirements + of an init container are taken into account during scheduling + by finding the highest request/limit for each resource + type, and then using the max of of that value or the sum + of the normal containers. Limits are applied to init containers + in a similar fashion. Init containers cannot currently + be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/' + items: + description: A single application container that you want + to run within a pod. + properties: + args: + description: 'Arguments to the entrypoint. The container + image''s CMD is used if this is not provided. Variable + references $(VAR_NAME) are expanded using the container''s + environment. If a variable cannot be resolved, the + reference in the input string will be unchanged. + Double $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" + will produce the string literal "$(VAR_NAME)". Escaped + references will never be expanded, regardless of + whether the variable exists or not. Cannot be updated. + More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + command: + description: 'Entrypoint array. Not executed within + a shell. The container image''s ENTRYPOINT is used + if this is not provided. Variable references $(VAR_NAME) + are expanded using the container''s environment. + If a variable cannot be resolved, the reference + in the input string will be unchanged. Double $$ + are reduced to a single $, which allows for escaping + the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will + produce the string literal "$(VAR_NAME)". Escaped + references will never be expanded, regardless of + whether the variable exists or not. Cannot be updated. + More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + 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 previously 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. Double $$ are reduced + to a single $, which allows for escaping the + $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will + produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, + regardless of whether the variable exists + or not. 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + type: object + type: array + image: + description: 'Container 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: 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. + This will be canonicalized upon + output, so case-variant names + will be understood as the same + header. + 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: Deprecated. TCPSocket is NOT + supported as a LifecycleHandler and kept + for the backward compatibility. There are + no validation of this field and lifecycle + hooks will fail in runtime when tcp handler + is specified. + 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 Pod''s termination grace + period countdown begins before the PreStop hook + is executed. Regardless of the outcome of the + handler, the container will eventually terminate + within the Pod''s termination grace period (unless + delayed by finalizers). 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: 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. + This will be canonicalized upon + output, so case-variant names + will be understood as the same + header. + 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: Deprecated. TCPSocket is NOT + supported as a LifecycleHandler and kept + for the backward compatibility. There are + no validation of this field and lifecycle + hooks will fail in runtime when tcp handler + is specified. + 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: 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 + grpc: + description: GRPC specifies an action involving + a GRPC port. + properties: + port: + description: Port number of the gRPC service. + Number must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service + to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default + behavior is defined by gRPC." + type: string + required: + - port + 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. + This will be canonicalized upon output, + so case-variant names will be understood + as the same header. + 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. + 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 + terminationGracePeriodSeconds: + description: Optional duration in seconds the + pod needs to terminate gracefully upon probe + failure. The grace period is the duration in + seconds after the processes running in the pod + are sent a termination signal and the time when + the processes are forcibly halted with a kill + signal. Set this value longer than the expected + cleanup time for your process. If this value + is nil, the pod's terminationGracePeriodSeconds + will be used. Otherwise, this value overrides + the value provided by the pod spec. Value must + be non-negative integer. The value zero indicates + stop immediately via the kill signal (no opportunity + to shut down). This is a beta field and requires + enabling ProbeTerminationGracePeriod feature + gate. Minimum value is 1. spec.terminationGracePeriodSeconds + is used if unset. + format: int64 + type: integer + 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. + 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. Modifying this + array with strategic merge patch may corrupt the + data. For more information See https://github.com/kubernetes/kubernetes/issues/108255. + 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: 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 + grpc: + description: GRPC specifies an action involving + a GRPC port. + properties: + port: + description: Port number of the gRPC service. + Number must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service + to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default + behavior is defined by gRPC." + type: string + required: + - port + 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. + This will be canonicalized upon output, + so case-variant names will be understood + as the same header. + 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. + 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 + terminationGracePeriodSeconds: + description: Optional duration in seconds the + pod needs to terminate gracefully upon probe + failure. The grace period is the duration in + seconds after the processes running in the pod + are sent a termination signal and the time when + the processes are forcibly halted with a kill + signal. Set this value longer than the expected + cleanup time for your process. If this value + is nil, the pod's terminationGracePeriodSeconds + will be used. Otherwise, this value overrides + the value provided by the pod spec. Value must + be non-negative integer. The value zero indicates + stop immediately via the kill signal (no opportunity + to shut down). This is a beta field and requires + enabling ProbeTerminationGracePeriod feature + gate. Minimum value is 1. spec.terminationGracePeriodSeconds + is used if unset. + format: int64 + type: integer + 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 + resizePolicy: + description: Resources resize policy for the container. + items: + description: ContainerResizePolicy represents resource + resize policy for the container. + properties: + resourceName: + description: 'Name of the resource to which + this resource resize policy applies. Supported + values: cpu, memory.' + type: string + restartPolicy: + description: Restart policy to apply when specified + resource is resized. If not specified, it + defaults to NotRequired. + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + description: 'Compute Resources required by this container. + Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + properties: + claims: + description: "Claims lists the names of resources, + defined in spec.resourceClaims, that are used + by this container. \n This is an alpha field + and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It + can only be set for containers." + items: + description: ResourceClaim references one entry + in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of + one entry in pod.spec.resourceClaims of + the Pod where this field is used. It makes + that resource available inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + 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-resources-containers/' + 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. Requests cannot + exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + restartPolicy: + description: 'RestartPolicy defines the restart behavior + of individual containers in a pod. This field may + only be set for init containers, and the only allowed + value is "Always". For non-init containers or when + this field is not specified, the restart behavior + is defined by the Pod''s restart policy and the + container type. Setting the RestartPolicy as "Always" + for the init container will have the following effect: + this init container will be continually restarted + on exit until all regular containers have terminated. + Once all regular containers have completed, all + init containers with restartPolicy "Always" will + be shut down. This lifecycle differs from normal + init containers and is often referred to as a "sidecar" + container. Although this init container still starts + in the init container sequence, it does not wait + for the container to complete before proceeding + to the next init container. Instead, the next init + container starts immediately after this init container + is started, or after any startupProbe has successfully + completed.' + type: string + securityContext: + description: 'SecurityContext defines the security + options the container should be run with. If set, + the fields of SecurityContext override the equivalent + fields of PodSecurityContext. 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 Note that + this field cannot be set when spec.os.name is + windows.' + type: boolean + capabilities: + description: The capabilities to add/drop when + running containers. Defaults to the default + set of capabilities granted by the container + runtime. Note that this field cannot be set + when spec.os.name is windows. + 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. Note that this field cannot be set when + spec.os.name is windows. + 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. Note that this field cannot + be set when spec.os.name is windows. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only + root filesystem. Default is false. Note that + this field cannot be set when spec.os.name is + windows. + 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. Note that this field cannot be set + when spec.os.name is windows. + 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. Note that + this field cannot be set when spec.os.name is + windows. + 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. Note that this field cannot be set + when spec.os.name is windows. + 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 + seccompProfile: + description: The seccomp options to use by this + container. If seccomp options are provided at + both the pod & container level, the container + options override the pod options. Note that + this field cannot be set when spec.os.name is + windows. + properties: + localhostProfile: + description: localhostProfile indicates a + profile defined in a file on the node should + be used. The profile must be preconfigured + on the node to work. Must be a descending + path, relative to the kubelet's configured + seccomp profile location. Must be set if + type is "Localhost". Must NOT be set for + any other type. + type: string + type: + description: "type indicates which kind of + seccomp profile will be applied. Valid options + are: \n Localhost - a profile defined in + a file on the node should be used. RuntimeDefault + - the container runtime default profile + should be used. Unconfined - no profile + should be applied." + type: string + required: + - type + 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. Note that this field cannot be set + when spec.os.name is linux. + 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. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the + name of the GMSA credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container + should be run as a 'Host Process' container. + All of a Pod's containers must have the + same effective HostProcess value (it is + not allowed to have a mix of HostProcess + containers and non-HostProcess containers). + In addition, if HostProcess is true then + HostNetwork must also be set to true. + type: boolean + 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. + 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. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: 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 + grpc: + description: GRPC specifies an action involving + a GRPC port. + properties: + port: + description: Port number of the gRPC service. + Number must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service + to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default + behavior is defined by gRPC." + type: string + required: + - port + 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. + This will be canonicalized upon output, + so case-variant names will be understood + as the same header. + 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. + 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 + terminationGracePeriodSeconds: + description: Optional duration in seconds the + pod needs to terminate gracefully upon probe + failure. The grace period is the duration in + seconds after the processes running in the pod + are sent a termination signal and the time when + the processes are forcibly halted with a kill + signal. Set this value longer than the expected + cleanup time for your process. If this value + is nil, the pod's terminationGracePeriodSeconds + will be used. Otherwise, this value overrides + the value provided by the pod spec. Value must + be non-negative integer. The value zero indicates + stop immediately via the kill signal (no opportunity + to shut down). This is a beta field and requires + enabling ProbeTerminationGracePeriod feature + gate. Minimum value is 1. spec.terminationGracePeriodSeconds + is used if unset. + format: int64 + type: integer + 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. + 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 + type: array + nodeName: + description: NodeName is a request to schedule this pod + onto a specific node. If it is non-empty, the scheduler + simply schedules this pod onto that node, assuming that + it fits resource requirements. + type: string + nodeSelector: + additionalProperties: + type: string + description: 'NodeSelector is a selector which must be true + for the pod to fit on a node. Selector which must match + a node''s labels for the pod to be scheduled on that node. + More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/' + type: object + x-kubernetes-map-type: atomic + os: + description: "Specifies the OS of the containers in the + pod. Some pod and container fields are restricted if this + is set. \n If the OS field is set to linux, the following + fields must be unset: -securityContext.windowsOptions + \n If the OS field is set to windows, following fields + must be unset: - spec.hostPID - spec.hostIPC - spec.hostUsers + - spec.securityContext.seLinuxOptions - spec.securityContext.seccompProfile + - spec.securityContext.fsGroup - spec.securityContext.fsGroupChangePolicy + - spec.securityContext.sysctls - spec.shareProcessNamespace + - spec.securityContext.runAsUser - spec.securityContext.runAsGroup + - spec.securityContext.supplementalGroups - spec.containers[*].securityContext.seLinuxOptions + - spec.containers[*].securityContext.seccompProfile - + spec.containers[*].securityContext.capabilities - spec.containers[*].securityContext.readOnlyRootFilesystem + - spec.containers[*].securityContext.privileged - spec.containers[*].securityContext.allowPrivilegeEscalation + - spec.containers[*].securityContext.procMount - spec.containers[*].securityContext.runAsUser + - spec.containers[*].securityContext.runAsGroup" + properties: + name: + description: 'Name is the name of the operating system. + The currently supported values are linux and windows. + Additional value may be defined in future and can + be one of: https://github.com/opencontainers/runtime-spec/blob/master/config.md#platform-specific-configuration + Clients should expect to handle additional values + and treat unrecognized values in this field as os: + null' + type: string + required: + - name + type: object + overhead: + 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: 'Overhead represents the resource overhead + associated with running a pod for a given RuntimeClass. + This field will be autopopulated at admission time by + the RuntimeClass admission controller. If the RuntimeClass + admission controller is enabled, overhead must not be + set in Pod create requests. The RuntimeClass admission + controller will reject Pod create requests which have + the overhead already set. If RuntimeClass is configured + and selected in the PodSpec, Overhead will be set to the + value defined in the corresponding RuntimeClass, otherwise + it will remain unset and treated as zero. More info: https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md' + type: object + preemptionPolicy: + description: PreemptionPolicy is the Policy for preempting + pods with lower priority. One of Never, PreemptLowerPriority. + Defaults to PreemptLowerPriority if unset. + type: string + priority: + description: The priority value. Various system components + use this field to find the priority of the pod. When Priority + Admission Controller is enabled, it prevents users from + setting this field. The admission controller populates + this field from PriorityClassName. The higher the value, + the higher the priority. + format: int32 + type: integer + priorityClassName: + description: If specified, indicates the pod's priority. + "system-node-critical" and "system-cluster-critical" are + two special keywords which indicate the highest priorities + with the former being the highest priority. Any other + name must be defined by creating a PriorityClass object + with that name. If not specified, the pod priority will + be default or zero if there is no default. + type: string + readinessGates: + description: 'If specified, all readiness gates will be + evaluated for pod readiness. A pod is ready when all its + containers are ready AND all conditions specified in the + readiness gates have status equal to "True" More info: + https://git.k8s.io/enhancements/keps/sig-network/580-pod-readiness-gates' + items: + description: PodReadinessGate contains the reference to + a pod condition + properties: + conditionType: + description: ConditionType refers to a condition in + the pod's condition list with matching type. + type: string + required: + - conditionType + type: object + type: array + resourceClaims: + description: "ResourceClaims defines which ResourceClaims + must be allocated and reserved before the Pod is allowed + to start. The resources will be made available to those + containers which consume them by name. \n This is an alpha + field and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable." + items: + description: PodResourceClaim references exactly one ResourceClaim + through a ClaimSource. It adds a name to it that uniquely + identifies the ResourceClaim inside the Pod. Containers + that need access to the ResourceClaim reference it with + this name. + properties: + name: + description: Name uniquely identifies this resource + claim inside the pod. This must be a DNS_LABEL. + type: string + source: + description: Source describes where to find the ResourceClaim. + properties: + resourceClaimName: + description: ResourceClaimName is the name of + a ResourceClaim object in the same namespace + as this pod. + type: string + resourceClaimTemplateName: + description: "ResourceClaimTemplateName is the + name of a ResourceClaimTemplate object in the + same namespace as this pod. \n The template + will be used to create a new ResourceClaim, + which will be bound to this pod. When this pod + is deleted, the ResourceClaim will also be deleted. + The pod name and resource name, along with a + generated component, will be used to form a + unique name for the ResourceClaim, which will + be recorded in pod.status.resourceClaimStatuses. + \n This field is immutable and no changes will + be made to the corresponding ResourceClaim by + the control plane after creating the ResourceClaim." + type: string + type: object + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + restartPolicy: + description: 'Restart policy for all containers within the + pod. One of Always, OnFailure, Never. In some contexts, + only a subset of those values may be permitted. Default + to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy' + type: string + runtimeClassName: + description: 'RuntimeClassName refers to a RuntimeClass + object in the node.k8s.io group, which should be used + to run this pod. If no RuntimeClass resource matches + the named class, the pod will not be run. If unset or + empty, the "legacy" RuntimeClass will be used, which is + an implicit class with an empty definition that uses the + default runtime handler. More info: https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class' + type: string + schedulerName: + description: If specified, the pod will be dispatched by + specified scheduler. If not specified, the pod will be + dispatched by default scheduler. + type: string + schedulingGates: + description: "SchedulingGates is an opaque list of values + that if specified will block scheduling the pod. If schedulingGates + is not empty, the pod will stay in the SchedulingGated + state and the scheduler will not attempt to schedule the + pod. \n SchedulingGates can only be set at pod creation + time, and be removed only afterwards. \n This is a beta + feature enabled by the PodSchedulingReadiness feature + gate." + items: + description: PodSchedulingGate is associated to a Pod + to guard its scheduling. + properties: + name: + description: Name of the scheduling gate. Each scheduling + gate must have a unique name field. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + securityContext: + description: 'SecurityContext holds pod-level security attributes + and common container settings. Optional: Defaults to empty. See + type description for default values of each field.' + properties: + fsGroup: + description: "A special supplemental group that applies + to all containers in a pod. Some volume types allow + the Kubelet to change the ownership of that volume + to be owned by the pod: \n 1. The owning GID will + be the FSGroup 2. The setgid bit is set (new files + created in the volume will be owned by FSGroup) 3. + The permission bits are OR'd with rw-rw---- \n If + unset, the Kubelet will not modify the ownership and + permissions of any volume. Note that this field cannot + be set when spec.os.name is windows." + format: int64 + type: integer + fsGroupChangePolicy: + description: 'fsGroupChangePolicy defines behavior of + changing ownership and permission of the volume before + being exposed inside Pod. This field will only apply + to volume types which support fsGroup based ownership(and + permissions). It will have no effect on ephemeral + volume types such as: secret, configmaps and emptydir. + Valid values are "OnRootMismatch" and "Always". If + not specified, "Always" is used. Note that this field + cannot be set when spec.os.name is windows.' + type: string + runAsGroup: + description: The GID to run the entrypoint of the container + process. Uses runtime default if unset. May also be + set in SecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence for that container. Note that this + field cannot be set when spec.os.name is windows. + 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 SecurityContext. 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 SecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence + for that container. Note that this field cannot be + set when spec.os.name is windows. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to all + containers. If unspecified, the container runtime + will allocate a random SELinux context for each container. May + also be set in SecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence for that container. Note that this + field cannot be set when spec.os.name is windows. + 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 + seccompProfile: + description: The seccomp options to use by the containers + in this pod. Note that this field cannot be set when + spec.os.name is windows. + properties: + localhostProfile: + description: localhostProfile indicates a profile + defined in a file on the node should be used. + The profile must be preconfigured on the node + to work. Must be a descending path, relative to + the kubelet's configured seccomp profile location. + Must be set if type is "Localhost". Must NOT be + set for any other type. + type: string + type: + description: "type indicates which kind of seccomp + profile will be applied. Valid options are: \n + Localhost - a profile defined in a file on the + node should be used. RuntimeDefault - the container + runtime default profile should be used. Unconfined + - no profile should be applied." + type: string + required: + - type + type: object + supplementalGroups: + description: A list of groups applied to the first process + run in each container, in addition to the container's + primary GID, the fsGroup (if specified), and group + memberships defined in the container image for the + uid of the container process. If unspecified, no additional + groups are added to any container. Note that group + memberships defined in the container image for the + uid of the container process are still effective, + even if they are not included in this list. Note that + this field cannot be set when spec.os.name is windows. + items: + format: int64 + type: integer + type: array + sysctls: + description: Sysctls hold a list of namespaced sysctls + used for the pod. Pods with unsupported sysctls (by + the container runtime) might fail to launch. Note + that this field cannot be set when spec.os.name is + windows. + items: + description: Sysctl defines a kernel parameter to + be set + properties: + name: + description: Name of a property to set + type: string + value: + description: Value of a property to set + type: string + required: + - name + - value + type: object + type: array + windowsOptions: + description: The Windows specific settings applied to + all containers. If unspecified, the options within + a container's SecurityContext will be used. If set + in both SecurityContext and PodSecurityContext, the + value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name + is linux. + 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. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name + of the GMSA credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container + should be run as a 'Host Process' container. All + of a Pod's containers must have the same effective + HostProcess value (it is not allowed to have a + mix of HostProcess containers and non-HostProcess + containers). In addition, if HostProcess is true + then HostNetwork must also be set to true. + type: boolean + 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. + type: string + type: object + type: object + serviceAccount: + description: 'DeprecatedServiceAccount is a depreciated + alias for ServiceAccountName. Deprecated: Use serviceAccountName + instead.' + type: string + serviceAccountName: + description: 'ServiceAccountName is the name of the ServiceAccount + to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/' + type: string + setHostnameAsFQDN: + description: If true the pod's hostname will be configured + as the pod's FQDN, rather than the leaf name (the default). + In Linux containers, this means setting the FQDN in the + hostname field of the kernel (the nodename field of struct + utsname). In Windows containers, this means setting the + registry value of hostname for the registry key HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters + to FQDN. If a pod does not have FQDN, this has no effect. + Default to false. + type: boolean + shareProcessNamespace: + description: 'Share a single process namespace between all + of the containers in a pod. When this is set containers + will be able to view and signal processes from other containers + in the same pod, and the first process in each container + will not be assigned PID 1. HostPID and ShareProcessNamespace + cannot both be set. Optional: Default to false.' + type: boolean + subdomain: + description: If specified, the fully qualified Pod hostname + will be "...svc.". If not specified, the pod will not have a domainname + at all. + type: string + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs + to terminate gracefully. May be decreased in delete request. + Value must be non-negative integer. The value zero indicates + stop immediately via the kill signal (no opportunity to + shut down). If this value is nil, the default grace period + will be used instead. The grace period is the duration + in seconds after the processes running in the pod are + sent a termination signal and the time when the processes + are forcibly halted with a kill signal. Set this value + longer than the expected cleanup time for your process. + Defaults to 30 seconds. + format: int64 + type: integer + tolerations: + description: If specified, the pod's tolerations. + items: + description: The pod this Toleration is attached to tolerates + any taint that matches the triple + using the matching operator . + properties: + effect: + description: Effect indicates the taint effect to + match. Empty means match all taint effects. When + specified, allowed values are NoSchedule, PreferNoSchedule + and NoExecute. + type: string + key: + description: Key is the taint key that the toleration + applies to. Empty means match all taint keys. If + the key is empty, operator must be Exists; this + combination means to match all values and all keys. + type: string + operator: + description: Operator represents a key's relationship + to the value. Valid operators are Exists and Equal. + Defaults to Equal. Exists is equivalent to wildcard + for value, so that a pod can tolerate all taints + of a particular category. + type: string + tolerationSeconds: + description: TolerationSeconds represents the period + of time the toleration (which must be of effect + NoExecute, otherwise this field is ignored) tolerates + the taint. By default, it is not set, which means + tolerate the taint forever (do not evict). Zero + and negative values will be treated as 0 (evict + immediately) by the system. + format: int64 + type: integer + value: + description: Value is the taint value the toleration + matches to. If the operator is Exists, the value + should be empty, otherwise just a regular string. + type: string + type: object + type: array + topologySpreadConstraints: + description: TopologySpreadConstraints describes how a group + of pods ought to spread across topology domains. Scheduler + will schedule pods in a way which abides by the constraints. + All topologySpreadConstraints are ANDed. + items: + description: TopologySpreadConstraint specifies how to + spread matching pods among the given topology. + properties: + labelSelector: + description: LabelSelector is used to find matching + pods. Pods that match this label selector are counted + to determine the number of pods in their corresponding + topology domain. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is "In", + and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + description: "MatchLabelKeys is a set of pod label + keys to select the pods over which spreading will + be calculated. The keys are used to lookup values + from the incoming pod labels, those key-value labels + are ANDed with labelSelector to select the group + of existing pods over which spreading will be calculated + for the incoming pod. The same key is forbidden + to exist in both MatchLabelKeys and LabelSelector. + MatchLabelKeys cannot be set when LabelSelector + isn't set. Keys that don't exist in the incoming + pod labels will be ignored. A null or empty list + means only match against labelSelector. \n This + is a beta field and requires the MatchLabelKeysInPodTopologySpread + feature gate to be enabled (enabled by default)." + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + description: 'MaxSkew describes the degree to which + pods may be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`, + it is the maximum permitted difference between the + number of matching pods in the target topology and + the global minimum. The global minimum is the minimum + number of matching pods in an eligible domain or + zero if the number of eligible domains is less than + MinDomains. For example, in a 3-zone cluster, MaxSkew + is set to 1, and pods with the same labelSelector + spread as 2/2/1: In this case, the global minimum + is 1. | zone1 | zone2 | zone3 | | P P | P P | P | + - if MaxSkew is 1, incoming pod can only be scheduled + to zone3 to become 2/2/2; scheduling it onto zone1(zone2) + would make the ActualSkew(3-1) on zone1(zone2) violate + MaxSkew(1). - if MaxSkew is 2, incoming pod can + be scheduled onto any zone. When `whenUnsatisfiable=ScheduleAnyway`, + it is used to give higher precedence to topologies + that satisfy it. It''s a required field. Default + value is 1 and 0 is not allowed.' + format: int32 + type: integer + minDomains: + description: "MinDomains indicates a minimum number + of eligible domains. When the number of eligible + domains with matching topology keys is less than + minDomains, Pod Topology Spread treats \"global + minimum\" as 0, and then the calculation of Skew + is performed. And when the number of eligible domains + with matching topology keys equals or greater than + minDomains, this value has no effect on scheduling. + As a result, when the number of eligible domains + is less than minDomains, scheduler won't schedule + more than maxSkew Pods to those domains. If value + is nil, the constraint behaves as if MinDomains + is equal to 1. Valid values are integers greater + than 0. When value is not nil, WhenUnsatisfiable + must be DoNotSchedule. \n For example, in a 3-zone + cluster, MaxSkew is set to 2, MinDomains is set + to 5 and pods with the same labelSelector spread + as 2/2/2: | zone1 | zone2 | zone3 | | P P | P + P | P P | The number of domains is less than + 5(MinDomains), so \"global minimum\" is treated + as 0. In this situation, new pod with the same labelSelector + cannot be scheduled, because computed skew will + be 3(3 - 0) if new Pod is scheduled to any of the + three zones, it will violate MaxSkew. \n This is + a beta field and requires the MinDomainsInPodTopologySpread + feature gate to be enabled (enabled by default)." + format: int32 + type: integer + nodeAffinityPolicy: + description: "NodeAffinityPolicy indicates how we + will treat Pod's nodeAffinity/nodeSelector when + calculating pod topology spread skew. Options are: + - Honor: only nodes matching nodeAffinity/nodeSelector + are included in the calculations. - Ignore: nodeAffinity/nodeSelector + are ignored. All nodes are included in the calculations. + \n If this value is nil, the behavior is equivalent + to the Honor policy. This is a beta-level feature + default enabled by the NodeInclusionPolicyInPodTopologySpread + feature flag." + type: string + nodeTaintsPolicy: + description: "NodeTaintsPolicy indicates how we will + treat node taints when calculating pod topology + spread skew. Options are: - Honor: nodes without + taints, along with tainted nodes for which the incoming + pod has a toleration, are included. - Ignore: node + taints are ignored. All nodes are included. \n If + this value is nil, the behavior is equivalent to + the Ignore policy. This is a beta-level feature + default enabled by the NodeInclusionPolicyInPodTopologySpread + feature flag." + type: string + topologyKey: + description: TopologyKey is the key of node labels. + Nodes that have a label with this key and identical + values are considered to be in the same topology. + We consider each as a "bucket", and + try to put balanced number of pods into each bucket. + We define a domain as a particular instance of a + topology. Also, we define an eligible domain as + a domain whose nodes meet the requirements of nodeAffinityPolicy + and nodeTaintsPolicy. e.g. If TopologyKey is "kubernetes.io/hostname", + each Node is a domain of that topology. And, if + TopologyKey is "topology.kubernetes.io/zone", each + zone is a domain of that topology. It's a required + field. + type: string + whenUnsatisfiable: + description: 'WhenUnsatisfiable indicates how to deal + with a pod if it doesn''t satisfy the spread constraint. + - DoNotSchedule (default) tells the scheduler not + to schedule it. - ScheduleAnyway tells the scheduler + to schedule the pod in any location, but giving + higher precedence to topologies that would help + reduce the skew. A constraint is considered "Unsatisfiable" + for an incoming pod if and only if every possible + node assignment for that pod would violate "MaxSkew" + on some topology. For example, in a 3-zone cluster, + MaxSkew is set to 1, and pods with the same labelSelector + spread as 3/1/1: | zone1 | zone2 | zone3 | | P P + P | P | P | If WhenUnsatisfiable is set + to DoNotSchedule, incoming pod can only be scheduled + to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) + on zone2(zone3) satisfies MaxSkew(1). In other words, + the cluster can still be imbalanced, but scheduler + won''t make it *more* imbalanced. It''s a required + field.' + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array + x-kubernetes-list-map-keys: + - topologyKey + - whenUnsatisfiable + x-kubernetes-list-type: map + volumes: + description: 'List of volumes that can be mounted by containers + belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes' + 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: 'fsType is the 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: 'partition is 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: 'readOnly value true will force the + readOnly setting in VolumeMounts. More info: + https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: boolean + volumeID: + description: 'volumeID is 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: 'cachingMode is the Host Caching + mode: None, Read Only, Read Write.' + type: string + diskName: + description: diskName is the Name of the data + disk in the blob storage + type: string + diskURI: + description: diskURI is the URI of data disk in + the blob storage + type: string + fsType: + description: fsType is 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: 'kind expected values are 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: readOnly 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: readOnly defaults to false (read/write). + ReadOnly here will force the ReadOnly setting + in VolumeMounts. + type: boolean + secretName: + description: secretName is the name of secret + that contains Azure Storage Account Name and + Key + type: string + shareName: + description: shareName is the azure 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: 'monitors is 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: 'path is Optional: Used as the mounted + root, rather than the full Ceph tree, default + is /' + type: string + readOnly: + description: 'readOnly is 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: 'secretFile is 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: 'secretRef is 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 + x-kubernetes-map-type: atomic + user: + description: 'user is 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: 'fsType is the 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: 'readOnly 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: 'secretRef is 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 + x-kubernetes-map-type: atomic + volumeID: + description: 'volumeID 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: 'defaultMode is optional: mode bits + used to set permissions on created files by + default. Must be an octal value between 0000 + and 0777 or a decimal value between 0 and 511. + YAML accepts both octal and decimal values, + JSON requires decimal values for mode bits. + 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 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: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode bits + used to set permissions on this file. + Must be an octal value between 0000 and + 0777 or a decimal value between 0 and + 511. YAML accepts both octal and decimal + values, JSON requires decimal values for + mode bits. 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: path is 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: optional specify whether the ConfigMap + or its keys must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + csi: + description: csi (Container Storage Interface) represents + ephemeral storage that is handled by certain external + CSI drivers (Beta 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: fsType 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 + x-kubernetes-map-type: atomic + readOnly: + description: readOnly 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 Optional: mode bits + used to set permissions on created files by + default. Must be an octal value between 0000 + and 0777 or a decimal value between 0 and 511. + YAML accepts both octal and decimal values, + JSON requires decimal values for mode bits. + 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 + x-kubernetes-map-type: atomic + mode: + description: 'Optional: mode bits used to + set permissions on this file, must be + an octal value between 0000 and 0777 or + a decimal value between 0 and 511. YAML + accepts both octal and decimal values, + JSON requires decimal values for mode + bits. 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 + x-kubernetes-map-type: atomic + 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: 'medium represents 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: 'sizeLimit is the 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: https://kubernetes.io/docs/concepts/storage/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 + ephemeral: + description: "ephemeral represents a volume that is + handled by a cluster storage driver. The volume's + lifecycle is tied to the pod that defines it - it + will be created before the pod starts, and deleted + when the pod is removed. \n Use this if: a) the + volume is only needed while the pod runs, b) features + of normal volumes like restoring from snapshot or + capacity tracking are needed, c) the storage driver + is specified through a storage class, and d) the + storage driver supports dynamic volume provisioning + through a PersistentVolumeClaim (see EphemeralVolumeSource + for more information on the connection between this + volume type and PersistentVolumeClaim). \n Use PersistentVolumeClaim + or one of the vendor-specific APIs for volumes that + persist for longer than the lifecycle of an individual + pod. \n Use CSI for light-weight local ephemeral + volumes if the CSI driver is meant to be used that + way - see the documentation of the driver for more + information. \n A pod can use both types of ephemeral + volumes and persistent volumes at the same time." + properties: + volumeClaimTemplate: + description: "Will be used to create a stand-alone + PVC to provision the volume. The pod in which + this EphemeralVolumeSource is embedded will + be the owner of the PVC, i.e. the PVC will be + deleted together with the pod. The name of + the PVC will be `-` where + `` is the name from the `PodSpec.Volumes` + array entry. Pod validation will reject the + pod if the concatenated name is not valid for + a PVC (for example, too long). \n An existing + PVC with that name that is not owned by the + pod will *not* be used for the pod to avoid + using an unrelated volume by mistake. Starting + the pod is then blocked until the unrelated + PVC is removed. If such a pre-created PVC is + meant to be used by the pod, the PVC has to + updated with an owner reference to the pod once + the pod exists. Normally this should not be + necessary, but it may be useful when manually + reconstructing a broken cluster. \n This field + is read-only and no changes will be made by + Kubernetes to the PVC after it has been created. + \n Required, must not be nil." + properties: + metadata: + description: May contain labels and annotations + that will be copied into the PVC when creating + it. No other fields are allowed and will + be rejected during validation. + properties: + annotations: + additionalProperties: + type: string + type: object + finalizers: + items: + type: string + type: array + labels: + additionalProperties: + type: string + type: object + name: + type: string + namespace: + type: string + type: object + spec: + description: The specification for the PersistentVolumeClaim. + The entire content is copied unchanged into + the PVC that gets created from this template. + The same fields as in a PersistentVolumeClaim + are also valid here. + properties: + accessModes: + description: 'accessModes contains the + desired access modes the volume should + have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' + items: + type: string + type: array + dataSource: + description: 'dataSource field can be + used to specify either: * An existing + VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) + * An existing PVC (PersistentVolumeClaim) + If the provisioner or an external controller + can support the specified data source, + it will create a new volume based on + the contents of the specified data source. + When the AnyVolumeDataSource feature + gate is enabled, dataSource contents + will be copied to dataSourceRef, and + dataSourceRef contents will be copied + to dataSource when dataSourceRef.namespace + is not specified. If the namespace is + specified, then dataSourceRef will not + be copied to dataSource.' + properties: + apiGroup: + description: APIGroup is the group + for the resource being referenced. + If APIGroup is not specified, the + specified Kind must be in the core + API group. For any other third-party + types, APIGroup is required. + type: string + kind: + description: Kind is the type of resource + being referenced + type: string + name: + description: Name is the name of resource + being referenced + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + dataSourceRef: + description: 'dataSourceRef specifies + the object from which to populate the + volume with data, if a non-empty volume + is desired. This may be any object from + a non-empty API group (non core object) + or a PersistentVolumeClaim object. When + this field is specified, volume binding + will only succeed if the type of the + specified object matches some installed + volume populator or dynamic provisioner. + This field will replace the functionality + of the dataSource field and as such + if both fields are non-empty, they must + have the same value. For backwards compatibility, + when namespace isn''t specified in dataSourceRef, + both fields (dataSource and dataSourceRef) + will be set to the same value automatically + if one of them is empty and the other + is non-empty. When namespace is specified + in dataSourceRef, dataSource isn''t + set to the same value and must be empty. + There are three important differences + between dataSource and dataSourceRef: + * While dataSource only allows two specific + types of objects, dataSourceRef allows + any non-core object, as well as PersistentVolumeClaim + objects. * While dataSource ignores + disallowed values (dropping them), dataSourceRef + preserves all values, and generates + an error if a disallowed value is specified. + * While dataSource only allows local + objects, dataSourceRef allows objects + in any namespaces. (Beta) Using this + field requires the AnyVolumeDataSource + feature gate to be enabled. (Alpha) + Using the namespace field of dataSourceRef + requires the CrossNamespaceVolumeDataSource + feature gate to be enabled.' + properties: + apiGroup: + description: APIGroup is the group + for the resource being referenced. + If APIGroup is not specified, the + specified Kind must be in the core + API group. For any other third-party + types, APIGroup is required. + type: string + kind: + description: Kind is the type of resource + being referenced + type: string + name: + description: Name is the name of resource + being referenced + type: string + namespace: + description: Namespace is the namespace + of resource being referenced Note + that when a namespace is specified, + a gateway.networking.k8s.io/ReferenceGrant + object is required in the referent + namespace to allow that namespace's + owner to accept the reference. See + the ReferenceGrant documentation + for details. (Alpha) This field + requires the CrossNamespaceVolumeDataSource + feature gate to be enabled. + type: string + required: + - kind + - name + type: object + resources: + description: 'resources represents the + minimum resources the volume should + have. If RecoverVolumeExpansionFailure + feature is enabled users are allowed + to specify resource requirements that + are lower than previous value but must + still be higher than capacity recorded + in the status field of the claim. More + info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' + properties: + claims: + description: "Claims lists the names + of resources, defined in spec.resourceClaims, + that are used by this container. + \n This is an alpha field and requires + enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. + It can only be set for containers." + items: + description: ResourceClaim references + one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match + the name of one entry in pod.spec.resourceClaims + of the Pod where this field + is used. It makes that resource + available inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + 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-resources-containers/' + 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. Requests cannot exceed Limits. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + selector: + description: selector is a label query + over volumes to consider for binding. + properties: + matchExpressions: + description: matchExpressions is a + list of label selector requirements. + The requirements are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map + of {key,value} pairs. A single {key,value} + in the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are + ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + storageClassName: + description: 'storageClassName is the + name of the StorageClass required by + the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' + type: string + volumeMode: + description: volumeMode defines what type + of volume is required by the claim. + Value of Filesystem is implied when + not included in claim spec. + type: string + volumeName: + description: volumeName is the binding + reference to the PersistentVolume backing + this claim. + type: string + type: object + required: + - spec + type: object + 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: 'fsType is the 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: 'lun is Optional: FC target lun number' + format: int32 + type: integer + readOnly: + description: 'readOnly is Optional: Defaults to + false (read/write). ReadOnly here will force + the ReadOnly setting in VolumeMounts.' + type: boolean + targetWWNs: + description: 'targetWWNs is Optional: FC target + worldwide names (WWNs)' + items: + type: string + type: array + wwids: + description: 'wwids 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: fsType is the 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: 'options is Optional: this field + holds extra command options if any.' + type: object + readOnly: + description: 'readOnly is Optional: defaults to + false (read/write). ReadOnly here will force + the ReadOnly setting in VolumeMounts.' + type: boolean + secretRef: + description: 'secretRef is 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 + x-kubernetes-map-type: atomic + 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: datasetName is Name of the dataset + stored as metadata -> name on the dataset for + Flocker should be considered as deprecated + type: string + datasetUUID: + description: datasetUUID is the 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: 'fsType is 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: 'partition is 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: 'pdName is 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: directory is the 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 is the URL + type: string + revision: + description: revision is the 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: 'endpoints 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: chapAuthDiscovery defines whether + support iSCSI Discovery CHAP authentication + type: boolean + chapAuthSession: + description: chapAuthSession defines whether support + iSCSI Session CHAP authentication + type: boolean + fsType: + description: 'fsType is the 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: initiatorName is the custom iSCSI + Initiator Name. If initiatorName is specified + with iscsiInterface simultaneously, new iSCSI + interface : will + be created for the connection. + type: string + iqn: + description: iqn is the target iSCSI Qualified + Name. + type: string + iscsiInterface: + description: iscsiInterface is the interface Name + that uses an iSCSI transport. Defaults to 'default' + (tcp). + type: string + lun: + description: lun represents iSCSI Target Lun number. + format: int32 + type: integer + portals: + description: portals is the 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: secretRef is the 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 + x-kubernetes-map-type: atomic + targetPortal: + description: targetPortal is 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: 'name of the volume. 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: readOnly 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: fsType is the 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: pdID is the 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: readOnly 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: projected items for all in one resources + secrets, configmaps, and downward API + properties: + defaultMode: + description: defaultMode are the mode bits used + to set permissions on created files by default. + Must be an octal value between 0000 and 0777 + or a decimal value between 0 and 511. YAML accepts + both octal and decimal values, JSON requires + decimal values for mode bits. 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: sources is the list of volume projections + items: + description: Projection that may be projected + along with other supported volume types + properties: + configMap: + description: configMap information about + the configMap data to project + properties: + items: + description: items 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: key is the key to + project. + type: string + mode: + description: 'mode is Optional: + mode bits used to set permissions + on this file. Must be an octal + value between 0000 and 0777 + or a decimal value between 0 + and 511. YAML accepts both octal + and decimal values, JSON requires + decimal values for mode bits. + 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: path is 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: optional specify whether + the ConfigMap or its keys must be + defined + type: boolean + type: object + x-kubernetes-map-type: atomic + downwardAPI: + description: downwardAPI 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 + x-kubernetes-map-type: atomic + mode: + description: 'Optional: mode bits + used to set permissions on this + file, must be an octal value + between 0000 and 0777 or a decimal + value between 0 and 511. YAML + accepts both octal and decimal + values, JSON requires decimal + values for mode bits. 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 + x-kubernetes-map-type: atomic + required: + - path + type: object + type: array + type: object + secret: + description: secret information about the + secret data to project + properties: + items: + description: items 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: key is the key to + project. + type: string + mode: + description: 'mode is Optional: + mode bits used to set permissions + on this file. Must be an octal + value between 0000 and 0777 + or a decimal value between 0 + and 511. YAML accepts both octal + and decimal values, JSON requires + decimal values for mode bits. + 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: path is 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: optional field specify + whether the Secret or its key must + be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + serviceAccountToken: + description: serviceAccountToken is 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 + 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: 'fsType is the 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: 'image is 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: 'monitors is 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: 'pool is 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 + x-kubernetes-map-type: atomic + user: + description: 'user is 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: fsType is the 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: gateway is the host address of the + ScaleIO API Gateway. + type: string + protectionDomain: + description: protectionDomain is the name of the + ScaleIO Protection Domain for the configured + storage. + type: string + readOnly: + description: readOnly 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 + x-kubernetes-map-type: atomic + sslEnabled: + description: sslEnabled Flag enable/disable SSL + communication with Gateway, default false + type: boolean + storageMode: + description: storageMode indicates whether the + storage for a volume should be ThickProvisioned + or ThinProvisioned. Default is ThinProvisioned. + type: string + storagePool: + description: storagePool is the ScaleIO Storage + Pool associated with the protection domain. + type: string + system: + description: system is the name of the storage + system as configured in ScaleIO. + type: string + volumeName: + description: volumeName is 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: 'defaultMode is Optional: mode bits + used to set permissions on created files by + default. Must be an octal value between 0000 + and 0777 or a decimal value between 0 and 511. + YAML accepts both octal and decimal values, + JSON requires decimal values for mode bits. + 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 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: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode bits + used to set permissions on this file. + Must be an octal value between 0000 and + 0777 or a decimal value between 0 and + 511. YAML accepts both octal and decimal + values, JSON requires decimal values for + mode bits. 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: path is 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: optional field specify whether the + Secret or its keys must be defined + type: boolean + secretName: + description: 'secretName is the 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: fsType is the 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: readOnly 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 + x-kubernetes-map-type: atomic + 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: fsType is 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: storagePolicyID is the storage Policy + Based Management (SPBM) profile ID associated + with the StoragePolicyName. + type: string + storagePolicyName: + description: storagePolicyName is the storage + Policy Based Management (SPBM) profile name. + type: string + volumePath: + description: volumePath is the path that identifies + vSphere volume vmdk + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + required: + - containers + type: object + x-kubernetes-preserve-unknown-fields: true + postStartSpec: + description: postStartSpec defines the command to be executed + when the component is ready, and the command will only be + executed once after the component becomes ready. + properties: + cmdExecutorConfig: + description: cmdExecutorConfig is the executor configuration + of the post-start command. + properties: + args: + description: args is used to perform statements. + items: + type: string + type: array + command: + description: command to perform statements. + items: + type: string + minItems: 1 + type: array + env: + description: envs is a list of environment variables. + 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 previously 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. + Double $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" + will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + x-kubernetes-preserve-unknown-fields: true + image: + description: image for Connector when executing the + command. + type: string + required: + - command + - image + type: object + scriptSpecSelectors: + description: scriptSpecSelectors defines the selector of + the scriptSpecs that need to be referenced. Once ScriptSpecSelectors + is defined, the scripts defined in scriptSpecs can be + referenced in the PostStartAction.CmdExecutorConfig. + items: + properties: + name: + description: ScriptSpec name of the referent, refer + to componentDefs[x].scriptSpecs[y].Name. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + required: + - name + type: object + type: array + required: + - cmdExecutorConfig + type: object + probes: + description: probes setting for healthy checks. + properties: + roleProbe: + description: Probe for DB role changed check. + properties: + commands: + description: commands used to execute for probe. + properties: + queries: + description: Read check executed on probe sidecar, + used to check workload's readonly access. + items: + type: string + type: array + writes: + description: Write check executed on probe sidecar, + used to check workload's allow write access. + items: + type: string + type: array + type: object + failureThreshold: + default: 3 + description: Minimum consecutive failures for the probe + to be considered failed after having succeeded. + format: int32 + minimum: 2 + type: integer + periodSeconds: + default: 1 + description: How often (in seconds) to perform the probe. + format: int32 + minimum: 1 + type: integer + timeoutSeconds: + default: 1 + description: Number of seconds after which the probe + times out. Defaults to 1 second. + format: int32 + minimum: 1 + type: integer + type: object + roleProbeTimeoutAfterPodsReady: + description: roleProbeTimeoutAfterPodsReady(in seconds), + when all pods of the component are ready, it will detect + whether the application is available in the pod. if pods + exceed the InitializationTimeoutSeconds time without a + role label, this component will enter the Failed/Abnormal + phase. Note that this configuration will only take effect + if the component supports RoleProbe and will not affect + the life cycle of the pod. default values are 60 seconds. + format: int32 + minimum: 30 + type: integer + runningProbe: + description: Probe for DB running check. + properties: + commands: + description: commands used to execute for probe. + properties: + queries: + description: Read check executed on probe sidecar, + used to check workload's readonly access. + items: + type: string + type: array + writes: + description: Write check executed on probe sidecar, + used to check workload's allow write access. + items: + type: string + type: array + type: object + failureThreshold: + default: 3 + description: Minimum consecutive failures for the probe + to be considered failed after having succeeded. + format: int32 + minimum: 2 + type: integer + periodSeconds: + default: 1 + description: How often (in seconds) to perform the probe. + format: int32 + minimum: 1 + type: integer + timeoutSeconds: + default: 1 + description: Number of seconds after which the probe + times out. Defaults to 1 second. + format: int32 + minimum: 1 + type: integer + type: object + statusProbe: + description: Probe for DB status check. + properties: + commands: + description: commands used to execute for probe. + properties: + queries: + description: Read check executed on probe sidecar, + used to check workload's readonly access. + items: + type: string + type: array + writes: + description: Write check executed on probe sidecar, + used to check workload's allow write access. + items: + type: string + type: array + type: object + failureThreshold: + default: 3 + description: Minimum consecutive failures for the probe + to be considered failed after having succeeded. + format: int32 + minimum: 2 + type: integer + periodSeconds: + default: 1 + description: How often (in seconds) to perform the probe. + format: int32 + minimum: 1 + type: integer + timeoutSeconds: + default: 1 + description: Number of seconds after which the probe + times out. Defaults to 1 second. + format: int32 + minimum: 1 + type: integer + type: object + type: object + replicationSpec: + description: replicationSpec defines replication related spec + if workloadType is Replication. + properties: + llPodManagementPolicy: + description: llPodManagementPolicy is the low-level controls + how pods are created during initial scale up, when replacing + pods on nodes, or when scaling down. `OrderedReady` policy + specify where pods are created in increasing order (pod-0, + then pod-1, etc) and the controller will wait until each + pod is ready before continuing. When scaling down, the + pods are removed in the opposite order. `Parallel` policy + specify create pods in parallel to match the desired scale + without waiting, and on scale down will delete all pods + at once. + type: string + llUpdateStrategy: + description: llUpdateStrategy indicates the low-level StatefulSetUpdateStrategy + that will be employed to update Pods in the StatefulSet + when a revision is made to Template. Will ignore `updateStrategy` + attribute if provided. + properties: + rollingUpdate: + description: RollingUpdate is used to communicate parameters + when Type is RollingUpdateStatefulSetStrategyType. + properties: + maxUnavailable: + anyOf: + - type: integer + - type: string + description: 'The maximum number of pods that can + be unavailable during the update. Value can be + an absolute number (ex: 5) or a percentage of + desired pods (ex: 10%). Absolute number is calculated + from percentage by rounding up. This can not be + 0. Defaults to 1. This field is alpha-level and + is only honored by servers that enable the MaxUnavailableStatefulSet + feature. The field applies to all pods in the + range 0 to Replicas-1. That means if there is + any unavailable pod in the range 0 to Replicas-1, + it will be counted towards MaxUnavailable.' + x-kubernetes-int-or-string: true + partition: + description: Partition indicates the ordinal at + which the StatefulSet should be partitioned for + updates. During a rolling update, all pods from + ordinal Replicas-1 to Partition are updated. All + pods from ordinal Partition-1 to 0 remain untouched. + This is helpful in being able to do a canary based + deployment. The default value is 0. + format: int32 + type: integer + type: object + type: + description: Type indicates the type of the StatefulSetUpdateStrategy. + Default is RollingUpdate. + type: string + type: object + updateStrategy: + default: Serial + description: "updateStrategy, Pods update strategy. In case + of workloadType=Consensus the update strategy will be + following: \n serial: update Pods one by one that guarantee + minimum component unavailable time. Learner -> Follower(with + AccessMode=none) -> Follower(with AccessMode=readonly) + -> Follower(with AccessMode=readWrite) -> Leader bestEffortParallel: + update Pods in parallel that guarantee minimum component + un-writable time. Learner, Follower(minority) in parallel + -> Follower(majority) -> Leader, keep majority online + all the time. parallel: force parallel" + enum: + - Serial + - BestEffortParallel + - Parallel + type: string + type: object + rsmSpec: + description: RSMSpec defines workload related spec of this component. + start from KB 0.7.0, RSM(ReplicatedStateMachineSpec) will + be the underlying CR which powers all kinds of workload in + KB. RSM is an enhanced stateful workload extension dedicated + for heavy-state workloads like databases. + properties: + memberUpdateStrategy: + description: 'MemberUpdateStrategy, Members(Pods) update + strategy. serial: update Members one by one that guarantee + minimum component unavailable time. Learner -> Follower(with + AccessMode=none) -> Follower(with AccessMode=readonly) + -> Follower(with AccessMode=readWrite) -> Leader bestEffortParallel: + update Members in parallel that guarantee minimum component + un-writable time. Learner, Follower(minority) in parallel + -> Follower(majority) -> Leader, keep majority online + all the time. parallel: force parallel' + enum: + - Serial + - BestEffortParallel + - Parallel + type: string + membershipReconfiguration: + description: MembershipReconfiguration provides actions + to do membership dynamic reconfiguration. + properties: + logSyncAction: + description: LogSyncAction specifies how to trigger + the new member to start log syncing previous none-nil + action's Image will be used if not configured + properties: + command: + description: Command will be executed in Container + to retrieve or process role info + items: + type: string + type: array + image: + description: utility image contains command that + can be used to retrieve of process role info + type: string + required: + - command + type: object + memberJoinAction: + description: MemberJoinAction specifies how to add member + previous none-nil action's Image will be used if not + configured + properties: + command: + description: Command will be executed in Container + to retrieve or process role info + items: + type: string + type: array + image: + description: utility image contains command that + can be used to retrieve of process role info + type: string + required: + - command + type: object + memberLeaveAction: + description: MemberLeaveAction specifies how to remove + member previous none-nil action's Image will be used + if not configured + properties: + command: + description: Command will be executed in Container + to retrieve or process role info + items: + type: string + type: array + image: + description: utility image contains command that + can be used to retrieve of process role info + type: string + required: + - command + type: object + promoteAction: + description: PromoteAction specifies how to tell the + cluster that the new member can join voting now previous + none-nil action's Image will be used if not configured + properties: + command: + description: Command will be executed in Container + to retrieve or process role info + items: + type: string + type: array + image: + description: utility image contains command that + can be used to retrieve of process role info + type: string + required: + - command + type: object + switchoverAction: + description: SwitchoverAction specifies how to do switchover + latest [BusyBox](https://busybox.net/) image will + be used if Image not configured + properties: + command: + description: Command will be executed in Container + to retrieve or process role info + items: + type: string + type: array + image: + description: utility image contains command that + can be used to retrieve of process role info + type: string + required: + - command + type: object + type: object + roleProbe: + description: RoleProbe provides method to probe role. + properties: + builtinHandlerName: + description: 'BuiltinHandler specifies the builtin handler + name to use to probe the role of the main container. + current available handlers: mysql, postgres, mongodb, + redis, etcd, kafka. use CustomHandler to define your + own role probe function if none of them satisfies + the requirement.' + type: string + customHandler: + description: "CustomHandler defines the custom way to + do role probe. if the BuiltinHandler satisfies the + requirement, use it instead. \n how the actions defined + here works: \n Actions will be taken in serial. after + all actions done, the final output should be a single + string of the role name defined in spec.Roles latest + [BusyBox](https://busybox.net/) image will be used + if Image not configured Environment variables can + be used in Command: - v_KB_RSM_LAST_STDOUT stdout + from last action, watch 'v_' prefixed - KB_RSM_USERNAME + username part of credential - KB_RSM_PASSWORD password + part of credential" + items: + properties: + command: + description: Command will be executed in Container + to retrieve or process role info + items: + type: string + type: array + image: + description: utility image contains command that + can be used to retrieve of process role info + type: string + required: + - command + type: object + type: array + failureThreshold: + default: 3 + description: Minimum consecutive failures for the probe + to be considered failed after having succeeded. Defaults + to 3. Minimum value is 1. + format: int32 + minimum: 1 + type: integer + initialDelaySeconds: + default: 0 + description: Number of seconds after the container has + started before role probe has started. + format: int32 + minimum: 0 + type: integer + periodSeconds: + default: 2 + description: How often (in seconds) to perform the probe. + Default to 2 seconds. Minimum value is 1. + format: int32 + minimum: 1 + type: integer + roleUpdateMechanism: + default: ReadinessProbeEventUpdate + description: RoleUpdateMechanism specifies the way how + pod role label being updated. + enum: + - ReadinessProbeEventUpdate + - DirectAPIServerEventUpdate + type: string + successThreshold: + default: 1 + description: Minimum consecutive successes for the probe + to be considered successful after having failed. Defaults + to 1. Minimum value is 1. + format: int32 + minimum: 1 + type: integer + timeoutSeconds: + default: 1 + description: Number of seconds after which the probe + times out. Defaults to 1 second. Minimum value is + 1. + format: int32 + minimum: 1 + type: integer + type: object + roles: + description: Roles, a list of roles defined in the system. + items: + properties: + accessMode: + default: ReadWrite + description: AccessMode, what service this member + capable. + enum: + - None + - Readonly + - ReadWrite + type: string + canVote: + default: true + description: CanVote, whether this member has voting + rights + type: boolean + isLeader: + default: false + description: IsLeader, whether this member is the + leader + type: boolean + name: + default: leader + description: Name, role name. + type: string + required: + - accessMode + - name + type: object + type: array + type: object + scriptSpecs: + description: The scriptSpec field provided by provider, and + finally this configTemplateRefs will be rendered into the + user's own configuration file according to the user's cluster. + items: + properties: + defaultMode: + description: 'defaultMode is optional: mode bits used + to set permissions on created files by default. Must + be an octal value between 0000 and 0777 or a decimal + value between 0 and 511. YAML accepts both octal and + decimal values, JSON requires decimal values for mode + bits. 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 + name: + description: Specify the name of configuration template. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + namespace: + default: default + description: Specify the namespace of the referenced the + configuration template ConfigMap object. An empty namespace + is equivalent to the "default" namespace. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$ + type: string + templateRef: + description: Specify the name of the referenced the configuration + template ConfigMap object. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + volumeName: + description: volumeName is the volume name of PodTemplate, + which the configuration file produced through the configuration + template will be mounted to the corresponding volume. + Must be a DNS_LABEL name. The volume name must be defined + in podSpec.containers[*].volumeMounts. + maxLength: 63 + pattern: ^[a-z]([a-z0-9\-]*[a-z0-9])?$ + type: string + required: + - name + - templateRef + - volumeName + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + service: + description: service defines the behavior of a service spec. + provide read-write service when WorkloadType is Consensus. + properties: + ports: + description: 'The list of ports that are exposed by this + service. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies' + items: + properties: + appProtocol: + description: The application protocol for this port. + This field follows standard Kubernetes label syntax. + Un-prefixed names are reserved for IANA standard + service names (as per RFC-6335 and https://www.iana.org/assignments/service-names). + Non-standard protocols should use prefixed names + such as mycompany.com/my-custom-protocol. + type: string + name: + description: The name of this port within the service. + This must be a DNS_LABEL. All ports within a ServiceSpec + must have unique names. When considering the endpoints + for a Service, this must match the 'name' field + in the EndpointPort. + type: string + port: + description: The port that will be exposed by this + service. + format: int32 + type: integer + protocol: + default: TCP + description: The IP protocol for this port. Supports + "TCP", "UDP", and "SCTP". Default is TCP. + enum: + - TCP + - UDP + - SCTP + type: string + targetPort: + anyOf: + - type: integer + - type: string + description: 'Number or name of the port to access + on the pods targeted by the service. Number must + be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + If this is a string, it will be looked up as a named + port in the target Pod''s container ports. If this + is not specified, the value of the ''port'' field + is used (an identity map). This field is ignored + for services with clusterIP=None, and should be + omitted or set equal to the ''port'' field. More + info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service' + x-kubernetes-int-or-string: true + required: + - port + type: object + type: array + x-kubernetes-list-map-keys: + - port + - protocol + x-kubernetes-list-type: map + type: object + serviceRefDeclarations: + description: serviceRefDeclarations is used to declare the service + reference of the current component. + items: + properties: + name: + description: The name of the service reference declaration. + The service reference can come from an external service + that is not part of KubeBlocks, or services provided + by other KubeBlocks Cluster objects. The specific type + of service reference depends on the binding declaration + when creates a Cluster. + type: string + serviceRefDeclarationSpecs: + description: serviceRefDeclarationSpecs is a collection + of service descriptions for a service reference declaration. + Each ServiceRefDeclarationSpec defines a service Kind + and Version. When multiple ServiceRefDeclarationSpecs + are defined, it indicates that the ServiceRefDeclaration + can be any one of the specified ServiceRefDeclarationSpecs. + For example, when the ServiceRefDeclaration is declared + to require an OLTP database, which can be either MySQL + or PostgreSQL, you can define a ServiceRefDeclarationSpec + for MySQL and another ServiceRefDeclarationSpec for + PostgreSQL, when referencing the service within the + cluster, as long as the serviceKind and serviceVersion + match either MySQL or PostgreSQL, it can be used. + items: + properties: + serviceKind: + description: service kind, indicating the type or + nature of the service. It should be well-known + application cluster type, e.g. {mysql, redis, + mongodb}. The serviceKind is case-insensitive + and supports abbreviations for some well-known + databases. For example, both 'zk' and 'zookeeper' + will be considered as a ZooKeeper cluster, and + 'pg', 'postgres', 'postgresql' will all be considered + as a PostgreSQL cluster. + type: string + serviceVersion: + description: The service version of the service + reference. It is a regular expression that matches + a version number pattern. For example, `^8.0.8$`, + `8.0.\d{1,2}$`, `^[v\-]*?(\d{1,2}\.){0,3}\d{1,2}$` + type: string + required: + - serviceKind + - serviceVersion + type: object + type: array + required: + - name + - serviceRefDeclarationSpecs + type: object + type: array + statefulSpec: + description: statefulSpec defines stateful related spec if workloadType + is Stateful. + properties: + llPodManagementPolicy: + description: llPodManagementPolicy is the low-level controls + how pods are created during initial scale up, when replacing + pods on nodes, or when scaling down. `OrderedReady` policy + specify where pods are created in increasing order (pod-0, + then pod-1, etc) and the controller will wait until each + pod is ready before continuing. When scaling down, the + pods are removed in the opposite order. `Parallel` policy + specify create pods in parallel to match the desired scale + without waiting, and on scale down will delete all pods + at once. + type: string + llUpdateStrategy: + description: llUpdateStrategy indicates the low-level StatefulSetUpdateStrategy + that will be employed to update Pods in the StatefulSet + when a revision is made to Template. Will ignore `updateStrategy` + attribute if provided. + properties: + rollingUpdate: + description: RollingUpdate is used to communicate parameters + when Type is RollingUpdateStatefulSetStrategyType. + properties: + maxUnavailable: + anyOf: + - type: integer + - type: string + description: 'The maximum number of pods that can + be unavailable during the update. Value can be + an absolute number (ex: 5) or a percentage of + desired pods (ex: 10%). Absolute number is calculated + from percentage by rounding up. This can not be + 0. Defaults to 1. This field is alpha-level and + is only honored by servers that enable the MaxUnavailableStatefulSet + feature. The field applies to all pods in the + range 0 to Replicas-1. That means if there is + any unavailable pod in the range 0 to Replicas-1, + it will be counted towards MaxUnavailable.' + x-kubernetes-int-or-string: true + partition: + description: Partition indicates the ordinal at + which the StatefulSet should be partitioned for + updates. During a rolling update, all pods from + ordinal Replicas-1 to Partition are updated. All + pods from ordinal Partition-1 to 0 remain untouched. + This is helpful in being able to do a canary based + deployment. The default value is 0. + format: int32 + type: integer + type: object + type: + description: Type indicates the type of the StatefulSetUpdateStrategy. + Default is RollingUpdate. + type: string + type: object + updateStrategy: + default: Serial + description: "updateStrategy, Pods update strategy. In case + of workloadType=Consensus the update strategy will be + following: \n serial: update Pods one by one that guarantee + minimum component unavailable time. Learner -> Follower(with + AccessMode=none) -> Follower(with AccessMode=readonly) + -> Follower(with AccessMode=readWrite) -> Leader bestEffortParallel: + update Pods in parallel that guarantee minimum component + un-writable time. Learner, Follower(minority) in parallel + -> Follower(majority) -> Leader, keep majority online + all the time. parallel: force parallel" + enum: + - Serial + - BestEffortParallel + - Parallel + type: string + type: object + statelessSpec: + description: statelessSpec defines stateless related spec if + workloadType is Stateless. + properties: + updateStrategy: + description: updateStrategy defines the underlying deployment + strategy to use to replace existing pods with new ones. + properties: + rollingUpdate: + description: 'Rolling update config params. Present + only if DeploymentStrategyType = RollingUpdate. --- + TODO: Update this to follow our convention for oneOf, + whatever we decide it to be.' + properties: + maxSurge: + anyOf: + - type: integer + - type: string + description: 'The maximum number of pods that can + be scheduled above the desired number of pods. + Value can be an absolute number (ex: 5) or a percentage + of desired pods (ex: 10%). This can not be 0 if + MaxUnavailable is 0. Absolute number is calculated + from percentage by rounding up. Defaults to 25%. + Example: when this is set to 30%, the new ReplicaSet + can be scaled up immediately when the rolling + update starts, such that the total number of old + and new pods do not exceed 130% of desired pods. + Once old pods have been killed, new ReplicaSet + can be scaled up further, ensuring that total + number of pods running at any time during the + update is at most 130% of desired pods.' + x-kubernetes-int-or-string: true + maxUnavailable: + anyOf: + - type: integer + - type: string + description: 'The maximum number of pods that can + be unavailable during the update. Value can be + an absolute number (ex: 5) or a percentage of + desired pods (ex: 10%). Absolute number is calculated + from percentage by rounding down. This can not + be 0 if MaxSurge is 0. Defaults to 25%. Example: + when this is set to 30%, the old ReplicaSet can + be scaled down to 70% of desired pods immediately + when the rolling update starts. Once new pods + are ready, old ReplicaSet can be scaled down further, + followed by scaling up the new ReplicaSet, ensuring + that the total number of pods available at all + times during the update is at least 70% of desired + pods.' + x-kubernetes-int-or-string: true + type: object + type: + description: Type of deployment. Can be "Recreate" or + "RollingUpdate". Default is RollingUpdate. + type: string + type: object + type: object + switchoverSpec: + description: switchoverSpec defines command to do switchover. + in particular, when workloadType=Replication, the command + defined in switchoverSpec will only be executed under the + condition of cluster.componentSpecs[x].SwitchPolicy.type=Noop. + properties: + withCandidate: + description: withCandidate corresponds to the switchover + of the specified candidate primary or leader instance. + properties: + cmdExecutorConfig: + description: cmdExecutorConfig is the executor configuration + of the switchover command. + properties: + args: + description: args is used to perform statements. + items: + type: string + type: array + command: + description: command to perform statements. + items: + type: string + minItems: 1 + type: array + env: + description: envs is a list of environment variables. + 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 previously 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. Double + $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal + "$(VAR_NAME)". Escaped references will never + be expanded, regardless of whether the variable + exists or not. 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + x-kubernetes-preserve-unknown-fields: true + image: + description: image for Connector when executing + the command. + type: string + required: + - command + - image + type: object + scriptSpecSelectors: + description: scriptSpecSelectors defines the selector + of the scriptSpecs that need to be referenced. Once + ScriptSpecSelectors is defined, the scripts defined + in scriptSpecs can be referenced in the SwitchoverAction.CmdExecutorConfig. + items: + properties: + name: + description: ScriptSpec name of the referent, + refer to componentDefs[x].scriptSpecs[y].Name. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + required: + - name + type: object + type: array + required: + - cmdExecutorConfig + type: object + withoutCandidate: + description: withoutCandidate corresponds to a switchover + that does not specify a candidate primary or leader instance. + properties: + cmdExecutorConfig: + description: cmdExecutorConfig is the executor configuration + of the switchover command. + properties: + args: + description: args is used to perform statements. + items: + type: string + type: array + command: + description: command to perform statements. + items: + type: string + minItems: 1 + type: array + env: + description: envs is a list of environment variables. + 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 previously 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. Double + $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal + "$(VAR_NAME)". Escaped references will never + be expanded, regardless of whether the variable + exists or not. 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + x-kubernetes-preserve-unknown-fields: true + image: + description: image for Connector when executing + the command. + type: string + required: + - command + - image + type: object + scriptSpecSelectors: + description: scriptSpecSelectors defines the selector + of the scriptSpecs that need to be referenced. Once + ScriptSpecSelectors is defined, the scripts defined + in scriptSpecs can be referenced in the SwitchoverAction.CmdExecutorConfig. + items: + properties: + name: + description: ScriptSpec name of the referent, + refer to componentDefs[x].scriptSpecs[y].Name. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + required: + - name + type: object + type: array + required: + - cmdExecutorConfig + type: object + type: object + systemAccounts: + description: Statement to create system account. + properties: + accounts: + description: accounts defines system account config settings. + items: + description: SystemAccountConfig specifies how to create + and delete system accounts. + properties: + name: + description: name is the name of a system account. + enum: + - kbadmin + - kbdataprotection + - kbprobe + - kbmonitoring + - kbreplicator + type: string + provisionPolicy: + description: provisionPolicy defines how to create + account. + properties: + scope: + default: AnyPods + description: scope is the scope to provision account, + and the scope could be `AnyPods` or `AllPods`. + type: string + secretRef: + description: secretRef will be used when Type + is ReferToExisting. + properties: + name: + description: name refers to the name of the + secret. + type: string + namespace: + description: namespace refers to the namespace + of the secret. + type: string + required: + - name + - namespace + type: object + statements: + description: statements will be used when Type + is CreateByStmt. + properties: + creation: + description: creation specifies statement + how to create this account with required + privileges. + type: string + deletion: + description: 'deletion specifies statement + how to delete this account. Used in combination + with `CreateionStatement` to delete the + account before create it. For instance, + one usually uses `drop user if exists` statement + followed by `create user` statement to create + an account. Deprecated: this field is deprecated, + use `update` instead.' + type: string + update: + description: update specifies statement how + to update account's password. + type: string + required: + - creation + type: object + type: + description: type defines the way to provision + an account, either `CreateByStmt` or `ReferToExisting`. + type: string + required: + - scope + - type + type: object + required: + - name + - provisionPolicy + type: object + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + cmdExecutorConfig: + description: cmdExecutorConfig configs how to get client + SDK and perform statements. + properties: + args: + description: args is used to perform statements. + items: + type: string + type: array + command: + description: command to perform statements. + items: + type: string + minItems: 1 + type: array + env: + description: envs is a list of environment variables. + 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 previously 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. + Double $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" + will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + x-kubernetes-preserve-unknown-fields: true + image: + description: image for Connector when executing the + command. + type: string + required: + - command + - image + type: object + passwordConfig: + description: passwordConfig defines the pattern to generate + password. + properties: + length: + default: 16 + description: length defines the length of password. + format: int32 + maximum: 32 + minimum: 8 + type: integer + letterCase: + default: MixedCases + description: letterCase defines to use lower-cases, + upper-cases or mixed-cases of letters. + type: string + numDigits: + default: 4 + description: numDigits defines number of digits. + format: int32 + maximum: 8 + minimum: 0 + type: integer + numSymbols: + default: 0 + description: numSymbols defines number of symbols. + format: int32 + maximum: 8 + minimum: 0 + type: integer + type: object + required: + - accounts + - cmdExecutorConfig + - passwordConfig + type: object + volumeProtectionSpec: + properties: + highWatermark: + default: 90 + description: The high watermark threshold for volume space + usage. If there is any specified volumes who's space usage + is over the threshold, the pre-defined "LOCK" action will + be triggered to degrade the service to protect volume + from space exhaustion, such as to set the instance as + read-only. And after that, if all volumes' space usage + drops under the threshold later, the pre-defined "UNLOCK" + action will be performed to recover the service normally. + maximum: 100 + minimum: 0 + type: integer + volumes: + description: Volumes to protect. + items: + properties: + highWatermark: + description: Volume specified high watermark threshold, + it will override the component level threshold. + If the value is invalid, it will be ignored and + the component level threshold will be used. + maximum: 100 + minimum: 0 + type: integer + name: + description: Name of volume to protect. + type: string + type: object + type: array + type: object + volumeTypes: + description: "volumeTypes is used to describe the purpose of + the volumes mapping the name of the VolumeMounts in the PodSpec.Container + field, such as data volume, log volume, etc. When backing + up the volume, the volume can be correctly backed up according + to the volumeType. \n For example: `name: data, type: data` + means that the volume named `data` is used to store `data`. + `name: binlog, type: log` means that the volume named `binlog` + is used to store `log`. \n NOTE: When volumeTypes is not defined, + the backup function will not be supported, even if a persistent + volume has been specified." + items: + properties: + name: + description: name definition is the same as the name of + the VolumeMounts field in PodSpec.Container, similar + to the relations of Volumes[*].name and VolumesMounts[*].name + in Pod.Spec. + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + type: + description: 'type is in enum of {data, log}. VolumeTypeData: + the volume is for the persistent data storage. VolumeTypeLog: + the volume is for the persistent log storage.' + enum: + - data + - log + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + workloadType: + description: workloadType defines type of the workload. Stateless + is a stateless workload type used to describe stateless applications. + Stateful is a stateful workload type used to describe common + stateful applications. Consensus is a stateful workload type + used to describe applications based on consensus protocols, + common consensus protocols such as raft and paxos. Replication + is a stateful workload type used to describe applications + based on the primary-secondary data replication protocol. + enum: + - Stateless + - Stateful + - Consensus + - Replication + type: string + required: + - name + - workloadType + type: object + x-kubernetes-validations: + - message: componentDefs.consensusSpec(deprecated) or componentDefs.rsmSpec(recommended) + is required when componentDefs.workloadType is Consensus, and + forbidden otherwise + rule: 'has(self.workloadType) && self.workloadType == ''Consensus'' + ? (has(self.consensusSpec) || has(self.rsmSpec)) : !has(self.consensusSpec)' + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + connectionCredential: + additionalProperties: + type: string + description: "Connection credential template used for creating a connection + credential secret for cluster.apps.kubeblocks.io object. \n Built-in + objects are: - `$(RANDOM_PASSWD)` - random 8 characters. - `$(UUID)` + - generate a random UUID v4 string. - `$(UUID_B64)` - generate a + random UUID v4 BASE64 encoded string. - `$(UUID_STR_B64)` - generate + a random UUID v4 string then BASE64 encoded. - `$(UUID_HEX)` - generate + a random UUID v4 HEX representation. - `$(HEADLESS_SVC_FQDN)` - + headless service FQDN placeholder, value pattern - $(CLUSTER_NAME)-$(1ST_COMP_NAME)-headless.$(NAMESPACE).svc, + where 1ST_COMP_NAME is the 1st component that provide `ClusterDefinition.spec.componentDefs[].service` + attribute; - `$(SVC_FQDN)` - service FQDN placeholder, value pattern + - $(CLUSTER_NAME)-$(1ST_COMP_NAME).$(NAMESPACE).svc, where 1ST_COMP_NAME + is the 1st component that provide `ClusterDefinition.spec.componentDefs[].service` + attribute; - `$(SVC_PORT_{PORT-NAME})` - a ServicePort's port value + with specified port name, i.e, a servicePort JSON struct: `{\"name\": + \"mysql\", \"targetPort\": \"mysqlContainerPort\", \"port\": 3306}`, + and \"$(SVC_PORT_mysql)\" in the connection credential value is + 3306." + type: object + type: + description: Cluster definition type defines well known application + cluster type, e.g. mysql/redis/mongodb + maxLength: 24 + pattern: ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$ + type: string + required: + - componentDefs + type: object + status: + description: ClusterDefinitionStatus defines the observed state of ClusterDefinition + properties: + message: + description: Extra message in current phase + type: string + observedGeneration: + description: observedGeneration is the most recent generation observed + for this ClusterDefinition. It corresponds to the ClusterDefinition's + generation, which is updated on mutation by the API Server. + format: int64 + type: integer + phase: + description: ClusterDefinition phase, valid values are `empty`, `Available`, + 'Unavailable`. Available is ClusterDefinition become available, + and can be referenced for co-related objects. + enum: + - Available + - Unavailable + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.12.1 + labels: + app.kubernetes.io/name: kubeblocks + name: clusters.apps.kubeblocks.io +spec: + group: apps.kubeblocks.io + names: + categories: + - kubeblocks + - all + kind: Cluster + listKind: ClusterList + plural: clusters + singular: cluster + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: ClusterDefinition referenced by cluster. + jsonPath: .spec.clusterDefinitionRef + name: CLUSTER-DEFINITION + type: string + - description: Cluster Application Version. + jsonPath: .spec.clusterVersionRef + name: VERSION + type: string + - description: Cluster termination policy. + jsonPath: .spec.terminationPolicy + name: TERMINATION-POLICY + type: string + - description: Cluster Status. + jsonPath: .status.phase + name: STATUS + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: Cluster is the Schema for the clusters 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: + type: object + spec: + description: ClusterSpec defines the desired state of Cluster. + properties: + affinity: + description: affinity is a group of affinity scheduling rules. + properties: + nodeLabels: + additionalProperties: + type: string + description: nodeLabels describes that pods must be scheduled + to the nodes with the specified node labels. + type: object + podAntiAffinity: + default: Preferred + description: podAntiAffinity describes the anti-affinity level + of pods within a component. Preferred means try spread pods + by `TopologyKeys`. Required means must spread pods by `TopologyKeys`. + enum: + - Preferred + - Required + type: string + tenancy: + default: SharedNode + description: tenancy describes how pods are distributed across + node. SharedNode means multiple pods may share the same node. + DedicatedNode means each pod runs on their own dedicated node. + enum: + - SharedNode + - DedicatedNode + type: string + topologyKeys: + description: topologyKey is the key of node labels. Nodes that + have a label with this key and identical values are considered + to be in the same topology. It's used as the topology domain + for pod anti-affinity and pod spread constraint. Some well-known + label keys, such as "kubernetes.io/hostname" and "topology.kubernetes.io/zone" + are often used as TopologyKey, as well as any other custom label + key. + items: + type: string + type: array + x-kubernetes-list-type: set + type: object + availabilityPolicy: + description: availabilityPolicy describes the availability policy, + including zone, node, and none. + enum: + - zone + - node + - none + type: string + backup: + description: cluster backup configuration. + properties: + cronExpression: + description: the cron expression for schedule, the timezone is + in UTC. see https://en.wikipedia.org/wiki/Cron. + type: string + enabled: + default: false + description: enabled defines whether to enable automated backup. + type: boolean + method: + description: backup method name to use, that is defined in backupPolicy. + type: string + pitrEnabled: + default: false + description: pitrEnabled defines whether to enable point-in-time + recovery. + type: boolean + repoName: + description: repoName is the name of the backupRepo, if not set, + will use the default backupRepo. + type: string + retentionPeriod: + default: 7d + description: "retentionPeriod determines a duration up to which + the backup should be kept. controller will remove all backups + that are older than the RetentionPeriod. For example, RetentionPeriod + of `30d` will keep only the backups of last 30 days. Sample + duration format: - years: \t2y - months: \t6mo - days: \t\t30d + - hours: \t12h - minutes: \t30m You can also combine the above + durations. For example: 30d12h30m" + type: string + startingDeadlineMinutes: + description: startingDeadlineMinutes defines the deadline in minutes + for starting the backup job if it misses scheduled time for + any reason. + format: int64 + maximum: 1440 + minimum: 0 + type: integer + type: object + clusterDefinitionRef: + description: Cluster referencing ClusterDefinition name. This is an + immutable attribute. If ClusterDefRef is not specified, ComponentDef + must be specified for each Component in ComponentSpecs. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + x-kubernetes-validations: + - message: clusterDefinitionRef is immutable + rule: self == oldSelf + clusterVersionRef: + description: Cluster referencing ClusterVersion name. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + componentSpecs: + description: List of componentSpecs you want to replace in ClusterDefinition + and ClusterVersion. It will replace the field in ClusterDefinition's + and ClusterVersion's component if type is matching. + items: + description: ClusterComponentSpec defines the cluster component + spec. + properties: + affinity: + description: affinity describes affinities specified by users. + properties: + nodeLabels: + additionalProperties: + type: string + description: nodeLabels describes that pods must be scheduled + to the nodes with the specified node labels. + type: object + podAntiAffinity: + default: Preferred + description: podAntiAffinity describes the anti-affinity + level of pods within a component. Preferred means try + spread pods by `TopologyKeys`. Required means must spread + pods by `TopologyKeys`. + enum: + - Preferred + - Required + type: string + tenancy: + default: SharedNode + description: tenancy describes how pods are distributed + across node. SharedNode means multiple pods may share + the same node. DedicatedNode means each pod runs on their + own dedicated node. + enum: + - SharedNode + - DedicatedNode + type: string + topologyKeys: + description: topologyKey is the key of node labels. Nodes + that have a label with this key and identical values are + considered to be in the same topology. It's used as the + topology domain for pod anti-affinity and pod spread constraint. + Some well-known label keys, such as "kubernetes.io/hostname" + and "topology.kubernetes.io/zone" are often used as TopologyKey, + as well as any other custom label key. + items: + type: string + type: array + x-kubernetes-list-type: set + type: object + classDefRef: + description: classDefRef references the class defined in ComponentClassDefinition. + properties: + class: + description: Class refers to the name of the class that + is defined in the ComponentClassDefinition. + type: string + name: + description: Name refers to the name of the ComponentClassDefinition. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + required: + - class + type: object + componentDef: + description: componentDef references the name of the ComponentDefinition. + If both componentDefRef and componentDef are provided, the + componentDef will take precedence over componentDefRef. + maxLength: 22 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + x-kubernetes-validations: + - message: componentDef is immutable + rule: self == oldSelf + componentDefRef: + description: componentDefRef references componentDef defined + in ClusterDefinition spec. Need to comply with IANA Service + Naming rule. + maxLength: 22 + pattern: ^[a-z]([a-z0-9\-]*[a-z0-9])?$ + type: string + x-kubernetes-validations: + - message: componentDefRef is immutable + rule: self == oldSelf + enabledLogs: + description: enabledLogs indicates which log file takes effect + in the database cluster. element is the log type which is + defined in cluster definition logConfig.name, and will set + relative variables about this log type in database kernel. + items: + type: string + type: array + x-kubernetes-list-type: set + instances: + description: Instances defines the list of instance to be deleted + priorly If the RsmTransformPolicy is specified as ToPod,the + list of instances will be used. + items: + type: string + type: array + issuer: + description: issuer defines provider context for TLS certs. + required when TLS enabled + properties: + name: + default: KubeBlocks + description: 'Name of issuer. Options supported: - KubeBlocks + - Certificates signed by KubeBlocks Operator. - UserProvided + - User provided own CA-signed certificates.' + enum: + - KubeBlocks + - UserProvided + type: string + secretRef: + description: secretRef. TLS certs Secret reference required + when from is UserProvided + properties: + ca: + description: CA cert key in Secret + type: string + cert: + description: Cert key in Secret + type: string + key: + description: Key of TLS private key in Secret + type: string + name: + description: Name of the Secret + type: string + required: + - ca + - cert + - key + - name + type: object + required: + - name + type: object + monitor: + default: false + description: monitor is a switch to enable monitoring and is + set as false by default. KubeBlocks provides an extension + mechanism to support component level monitoring, which will + scrape metrics auto or manually from servers in component + and export metrics to Time Series Database. + type: boolean + name: + description: name defines cluster's component name, this name + is also part of Service DNS name, so this name will comply + with IANA Service Naming rule. + maxLength: 22 + pattern: ^[a-z]([a-z0-9\-]*[a-z0-9])?$ + type: string + x-kubernetes-validations: + - message: name is immutable + rule: self == oldSelf + noCreatePDB: + default: false + description: noCreatePDB defines the PodDisruptionBudget creation + behavior and is set to true if creation of PodDisruptionBudget + for this component is not needed. It defaults to false. + type: boolean + nodes: + description: Nodes defines the list of nodes that pods can schedule + If the RsmTransformPolicy is specified as ToPod,the list of + nodes will be used. If the list of nodes is empty, no specific + node will be assigned. However, if the list of node is filled, + all pods will be evenly scheduled across the nodes in the + list. + items: + description: "NodeName is a type that holds a api.Node's Name + identifier. Being a type captures intent and helps make + sure that the node name is not confused with similar concepts + (the hostname, the cloud provider id, the cloud provider + name etc) \n To clarify the various types: \n - Node.Name + is the Name field of the Node in the API. This should be + stored in a NodeName. Unfortunately, because Name is part + of ObjectMeta, we can't store it as a NodeName at the API + level. \n - Hostname is the hostname of the local machine + (from uname -n). However, some components allow the user + to pass in a --hostname-override flag, which will override + this in most places. In the absence of anything more meaningful, + kubelet will use Hostname as the Node.Name when it creates + the Node. \n * The cloudproviders have the own names: GCE + has InstanceName, AWS has InstanceId. \n For GCE, InstanceName + is the Name of an Instance object in the GCE API. On GCE, + Instance.Name becomes the Hostname, and thus it makes sense + also to use it as the Node.Name. But that is GCE specific, + and it is up to the cloudprovider how to do this mapping. + \n For AWS, the InstanceID is not yet suitable for use as + a Node.Name, so we actually use the PrivateDnsName for the + Node.Name. And this is _not_ always the same as the hostname: + if we are using a custom DHCP domain it won't be." + type: string + type: array + replicas: + default: 1 + description: Component replicas. + format: int32 + minimum: 0 + type: integer + resources: + description: Resources requests and limits of workload. + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It can only + be set for containers." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry + in pod.spec.resourceClaims of the Pod where this + field is used. It makes that resource available + inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + 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-resources-containers/' + 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. Requests + cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + x-kubernetes-preserve-unknown-fields: true + rsmTransformPolicy: + default: ToSts + description: 'RsmTransformPolicy defines the policy generate + sts using rsm. ToSts: rsm transforms to statefulSet ToPod: + rsm transforms to pods' + enum: + - ToPod + - ToSts + type: string + serviceAccountName: + description: serviceAccountName is the name of the ServiceAccount + that running component depends on. + type: string + serviceRefs: + description: 'serviceRefs define service references for the + current component. Based on the referenced services, they + can be categorized into two types: Service provided by external + sources: These services are provided by external sources and + are not managed by KubeBlocks. They can be Kubernetes-based + or non-Kubernetes services. For external services, you need + to provide an additional ServiceDescriptor object to establish + the service binding. Service provided by other KubeBlocks + clusters: These services are provided by other KubeBlocks + clusters. You can bind to these services by specifying the + name of the hosting cluster. Each type of service reference + requires specific configurations and bindings to establish + the connection and interaction with the respective services. + It should be noted that the ServiceRef has cluster-level semantic + consistency, meaning that within the same Cluster, service + references with the same ServiceRef.Name are considered to + be the same service. It is only allowed to bind to the same + Cluster or ServiceDescriptor.' + items: + properties: + cluster: + description: 'When referencing a service provided by other + KubeBlocks cluster, you need to provide the name of + the Cluster being referenced. By default, when other + KubeBlocks Cluster are referenced, the ClusterDefinition.spec.connectionCredential + secret corresponding to the referenced Cluster will + be used to bind to the current component. Currently, + if a KubeBlocks cluster is to be referenced, the connection + credential secret should include and correspond to the + following fields: endpoint, port, username, and password. + Under this referencing approach, the ServiceKind and + ServiceVersion of service reference declaration defined + in the ClusterDefinition will not be validated. If both + Cluster and ServiceDescriptor are specified, the Cluster + takes precedence.' + type: string + name: + description: name of the service reference declaration. + references the serviceRefDeclaration name defined in + clusterDefinition.componentDefs[*].serviceRefDeclarations[*].name + type: string + namespace: + description: namespace defines the namespace of the referenced + Cluster or the namespace of the referenced ServiceDescriptor + object. If not set, the referenced Cluster and ServiceDescriptor + will be searched in the namespace of the current cluster + by default. + type: string + serviceDescriptor: + description: serviceDescriptor defines the service descriptor + of the service provided by external sources. When referencing + a service provided by external sources, you need to + provide the ServiceDescriptor object name to establish + the service binding. And serviceDescriptor is the name + of the ServiceDescriptor object, furthermore, the ServiceDescriptor.spec.serviceKind + and ServiceDescriptor.spec.serviceVersion should match + clusterDefinition.componentDefs[*].serviceRefDeclarations[*].serviceRefDeclarationSpecs[*].serviceKind + and the regular expression defines in clusterDefinition.componentDefs[*].serviceRefDeclarations[*].serviceRefDeclarationSpecs[*].serviceVersion. + If both Cluster and ServiceDescriptor are specified, + the Cluster takes precedence. + type: string + required: + - name + type: object + type: array + services: + description: Services expose endpoints that can be accessed + by clients. + items: + properties: + annotations: + additionalProperties: + type: string + description: 'If ServiceType is LoadBalancer, cloud provider + related parameters can be put here More info: https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer.' + type: object + name: + description: Service name + maxLength: 15 + type: string + serviceType: + default: ClusterIP + description: 'serviceType determines how the Service is + exposed. Valid options are ClusterIP, NodePort, and + LoadBalancer. "ClusterIP" allocates a cluster-internal + IP address for load-balancing to endpoints. Endpoints + are determined by the selector or if that is not specified, + they are determined by manual construction of an Endpoints + object or EndpointSlice objects. If clusterIP is "None", + no virtual IP is allocated and the endpoints are published + as a set of endpoints rather than a virtual IP. "NodePort" + builds on ClusterIP and allocates a port on every node + which routes to the same endpoints as the clusterIP. + "LoadBalancer" builds on NodePort and creates an external + load-balancer (if supported in the current cloud) which + routes to the same endpoints as the clusterIP. More + info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types.' + enum: + - ClusterIP + - NodePort + - LoadBalancer + type: string + x-kubernetes-preserve-unknown-fields: true + required: + - name + type: object + type: array + switchPolicy: + description: switchPolicy defines the strategy for switchover + and failover when workloadType is Replication. + properties: + type: + default: Noop + description: 'clusterSwitchPolicy defines type of the switchPolicy + when workloadType is Replication. MaximumAvailability: + [WIP] when the primary is active, do switch if the synchronization + delay = 0 in the user-defined lagProbe data delay detection + logic, otherwise do not switch. The primary is down, switch + immediately. It will be available in future versions. + MaximumDataProtection: [WIP] when the primary is active, + do switch if synchronization delay = 0 in the user-defined + lagProbe data lag detection logic, otherwise do not switch. + If the primary is down, if it can be judged that the primary + and secondary data are consistent, then do the switch, + otherwise do not switch. It will be available in future + versions. Noop: KubeBlocks will not perform high-availability + switching on components. Users need to implement HA by + themselves or integrate open source HA solution.' + enum: + - Noop + type: string + type: object + tls: + description: Enables or disables TLS certs. + type: boolean + tolerations: + description: Component tolerations will override ClusterSpec.Tolerations + if specified. + items: + description: The pod this Toleration is attached to tolerates + any taint that matches the triple using + the matching operator . + properties: + effect: + description: Effect indicates the taint effect to match. + Empty means match all taint effects. When specified, + allowed values are NoSchedule, PreferNoSchedule and + NoExecute. + type: string + key: + description: Key is the taint key that the toleration + applies to. Empty means match all taint keys. If the + key is empty, operator must be Exists; this combination + means to match all values and all keys. + type: string + operator: + description: Operator represents a key's relationship + to the value. Valid operators are Exists and Equal. + Defaults to Equal. Exists is equivalent to wildcard + for value, so that a pod can tolerate all taints of + a particular category. + type: string + tolerationSeconds: + description: TolerationSeconds represents the period of + time the toleration (which must be of effect NoExecute, + otherwise this field is ignored) tolerates the taint. + By default, it is not set, which means tolerate the + taint forever (do not evict). Zero and negative values + will be treated as 0 (evict immediately) by the system. + format: int64 + type: integer + value: + description: Value is the taint value the toleration matches + to. If the operator is Exists, the value should be empty, + otherwise just a regular string. + type: string + type: object + type: array + x-kubernetes-preserve-unknown-fields: true + updateStrategy: + description: updateStrategy defines the update strategy for + the component. + enum: + - Serial + - BestEffortParallel + - Parallel + type: string + userResourceRefs: + description: userResourceRefs defines the user-defined volumes. + properties: + configMapRefs: + description: configMapRefs defines the user-defined configmaps. + items: + properties: + asVolumeFrom: + description: asVolumeFrom defines the list of containers + where volumeMounts will be injected into. + items: + type: string + type: array + x-kubernetes-list-type: set + configMap: + description: configMap defines the configmap volume + source. + properties: + defaultMode: + description: 'defaultMode is optional: mode bits + used to set permissions on created files by + default. Must be an octal value between 0000 + and 0777 or a decimal value between 0 and 511. + YAML accepts both octal and decimal values, + JSON requires decimal values for mode bits. + 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 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: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode bits + used to set permissions on this file. + Must be an octal value between 0000 and + 0777 or a decimal value between 0 and + 511. YAML accepts both octal and decimal + values, JSON requires decimal values for + mode bits. 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: path is 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: optional specify whether the ConfigMap + or its keys must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + mountPoint: + description: mountPath is the path at which to mount + the volume. + maxLength: 256 + pattern: ^/[a-z]([a-z0-9\-]*[a-z0-9])?$ + type: string + name: + description: name is the name of the referenced the + Configmap/Secret object. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + subPath: + description: subPath is a relative file path within + the volume to mount. + type: string + required: + - configMap + - mountPoint + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + secretRefs: + description: secretRefs defines the user-defined secrets. + items: + properties: + asVolumeFrom: + description: asVolumeFrom defines the list of containers + where volumeMounts will be injected into. + items: + type: string + type: array + x-kubernetes-list-type: set + mountPoint: + description: mountPath is the path at which to mount + the volume. + maxLength: 256 + pattern: ^/[a-z]([a-z0-9\-]*[a-z0-9])?$ + type: string + name: + description: name is the name of the referenced the + Configmap/Secret object. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + secret: + description: secret defines the secret volume source. + properties: + defaultMode: + description: 'defaultMode is Optional: mode bits + used to set permissions on created files by + default. Must be an octal value between 0000 + and 0777 or a decimal value between 0 and 511. + YAML accepts both octal and decimal values, + JSON requires decimal values for mode bits. + 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 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: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode bits + used to set permissions on this file. + Must be an octal value between 0000 and + 0777 or a decimal value between 0 and + 511. YAML accepts both octal and decimal + values, JSON requires decimal values for + mode bits. 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: path is 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: optional field specify whether the + Secret or its keys must be defined + type: boolean + secretName: + description: 'secretName is the 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 + subPath: + description: subPath is a relative file path within + the volume to mount. + type: string + required: + - mountPoint + - name + - secret + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + type: object + volumeClaimTemplates: + description: volumeClaimTemplates information for statefulset.spec.volumeClaimTemplates. + items: + properties: + name: + description: Reference `ClusterDefinition.spec.componentDefs.containers.volumeMounts.name`. + type: string + spec: + description: spec defines the desired characteristics + of a volume requested by a pod author. + properties: + accessModes: + description: 'accessModes contains the desired access + modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1.' + items: + type: string + type: array + x-kubernetes-preserve-unknown-fields: true + resources: + description: 'resources represents the minimum resources + the volume should have. If RecoverVolumeExpansionFailure + feature is enabled users are allowed to specify + resource requirements that are lower than previous + value but must still be higher than capacity recorded + in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources.' + properties: + claims: + description: "Claims lists the names of resources, + defined in spec.resourceClaims, that are used + by this container. \n This is an alpha field + and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It + can only be set for containers." + items: + description: ResourceClaim references one entry + in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of + one entry in pod.spec.resourceClaims of + the Pod where this field is used. It makes + that resource available inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + 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-resources-containers/' + 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. Requests cannot + exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + x-kubernetes-preserve-unknown-fields: true + storageClassName: + description: 'storageClassName is the name of the + StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1.' + type: string + volumeMode: + description: volumeMode defines what type of volume + is required by the claim. + type: string + type: object + required: + - name + type: object + type: array + required: + - name + - replicas + type: object + x-kubernetes-validations: + - message: either componentDefRef or componentDef should be provided + rule: has(self.componentDefRef) || has(self.componentDef) + - message: componentDefRef is required once set + rule: '!has(oldSelf.componentDefRef) || has(self.componentDefRef)' + - message: componentDef is required once set + rule: '!has(oldSelf.componentDef) || has(self.componentDef)' + maxItems: 128 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + x-kubernetes-validations: + - message: duplicated component + rule: self.all(x, size(self.filter(c, c.name == x.name)) == 1) + monitor: + description: monitor specifies the configuration of monitor + properties: + monitoringInterval: + anyOf: + - type: integer + - type: string + description: monitoringInterval specifies interval of monitoring, + no monitor if set to 0 + x-kubernetes-int-or-string: true + type: object + network: + description: network specifies the configuration of network + properties: + hostNetworkAccessible: + default: false + description: hostNetworkAccessible specifies whether host network + is accessible. It defaults to false + type: boolean + publiclyAccessible: + default: false + description: publiclyAccessible specifies whether it is publicly + accessible. It defaults to false + type: boolean + type: object + replicas: + description: replicas specifies the replicas of the first componentSpec, + if the replicas of the first componentSpec is specified, this value + will be ignored. + format: int32 + type: integer + resources: + description: resources specifies the resources of the first componentSpec, + if the resources of the first componentSpec is specified, this value + will be ignored. + properties: + cpu: + anyOf: + - type: integer + - type: string + description: 'cpu resource needed, more info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + memory: + anyOf: + - type: integer + - type: string + description: 'memory resource needed, more info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + 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 + services: + description: services defines the services to access a cluster. + items: + properties: + annotations: + additionalProperties: + type: string + description: 'If ServiceType is LoadBalancer, cloud provider + related parameters can be put here More info: https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer.' + type: object + componentSelector: + description: ComponentSelector extends the ServiceSpec.Selector + by allowing you to specify a component as selectors for the + service. + type: string + name: + description: Name defines the name of the service. otherwise, + it indicates the name of the service. Others can refer to + this service by its name. (e.g., connection credential) Cannot + be updated. + type: string + roleSelector: + description: RoleSelector extends the ServiceSpec.Selector by + allowing you to specify defined role as selector for the service. + if GeneratePodOrdinalService sets to true, RoleSelector will + be ignored. + type: string + serviceName: + description: 'ServiceName defines the name of the underlying + service object. If not specified, the default service name + with different patterns will be used: - : for + cluster-level services - -: + for component-level services Only one default service name + is allowed. Cannot be updated.' + type: string + spec: + description: Spec defines the behavior of a service. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + properties: + allocateLoadBalancerNodePorts: + description: allocateLoadBalancerNodePorts defines if NodePorts + will be automatically allocated for services with type + LoadBalancer. Default is "true". It may be set to "false" + if the cluster load-balancer does not rely on NodePorts. If + the caller requests specific NodePorts (by specifying + a value), those requests will be respected, regardless + of this field. This field may only be set for services + with type LoadBalancer and will be cleared if the type + is changed to any other type. + type: boolean + clusterIP: + description: 'clusterIP is the IP address of the service + and is usually assigned randomly. If an address is specified + manually, is in-range (as per system configuration), and + is not in use, it will be allocated to the service; otherwise + creation of the service will fail. This field may not + be changed through updates unless the type field is also + being changed to ExternalName (which requires this field + to be blank) or the type field is being changed from ExternalName + (in which case this field may optionally be specified, + as describe above). Valid values are "None", empty string + (""), or a valid IP address. Setting this to "None" makes + a "headless service" (no virtual IP), which is useful + when direct endpoint connections are preferred and proxying + is not required. Only applies to types ClusterIP, NodePort, + and LoadBalancer. If this field is specified when creating + a Service of type ExternalName, creation will fail. This + field will be wiped when updating a Service to type ExternalName. + More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies' + type: string + clusterIPs: + description: "ClusterIPs is a list of IP addresses assigned + to this service, and are usually assigned randomly. If + an address is specified manually, is in-range (as per + system configuration), and is not in use, it will be allocated + to the service; otherwise creation of the service will + fail. This field may not be changed through updates unless + the type field is also being changed to ExternalName (which + requires this field to be empty) or the type field is + being changed from ExternalName (in which case this field + may optionally be specified, as describe above). Valid + values are \"None\", empty string (\"\"), or a valid IP + address. Setting this to \"None\" makes a \"headless + service\" (no virtual IP), which is useful when direct + endpoint connections are preferred and proxying is not + required. Only applies to types ClusterIP, NodePort, + and LoadBalancer. If this field is specified when creating + a Service of type ExternalName, creation will fail. This + field will be wiped when updating a Service to type ExternalName. + \ If this field is not specified, it will be initialized + from the clusterIP field. If this field is specified, + clients must ensure that clusterIPs[0] and clusterIP have + the same value. \n This field may hold a maximum of two + entries (dual-stack IPs, in either order). These IPs must + correspond to the values of the ipFamilies field. Both + clusterIPs and ipFamilies are governed by the ipFamilyPolicy + field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies" + items: + type: string + type: array + x-kubernetes-list-type: atomic + externalIPs: + description: externalIPs is a list of IP addresses for which + nodes in the cluster will also accept traffic for this + service. These IPs are not managed by Kubernetes. The + user is responsible for ensuring that traffic arrives + at a node with this IP. A common example is external + load-balancers that are not part of the Kubernetes system. + items: + type: string + type: array + externalName: + description: externalName is the external reference that + discovery mechanisms will return as an alias for this + service (e.g. a DNS CNAME record). No proxying will be + involved. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) + and requires `type` to be "ExternalName". + type: string + externalTrafficPolicy: + description: externalTrafficPolicy describes how nodes distribute + service traffic they receive on one of the Service's "externally-facing" + addresses (NodePorts, ExternalIPs, and LoadBalancer IPs). + If set to "Local", the proxy will configure the service + in a way that assumes that external load balancers will + take care of balancing the service traffic between nodes, + and so each node will deliver traffic only to the node-local + endpoints of the service, without masquerading the client + source IP. (Traffic mistakenly sent to a node with no + endpoints will be dropped.) The default value, "Cluster", + uses the standard behavior of routing to all endpoints + evenly (possibly modified by topology and other features). + Note that traffic sent to an External IP or LoadBalancer + IP from within the cluster will always get "Cluster" semantics, + but clients sending to a NodePort from within the cluster + may need to take traffic policy into account when picking + a node. + type: string + healthCheckNodePort: + description: healthCheckNodePort specifies the healthcheck + nodePort for the service. This only applies when type + is set to LoadBalancer and externalTrafficPolicy is set + to Local. If a value is specified, is in-range, and is + not in use, it will be used. If not specified, a value + will be automatically allocated. External systems (e.g. + load-balancers) can use this port to determine if a given + node holds endpoints for this service or not. If this + field is specified when creating a Service which does + not need it, creation will fail. This field will be wiped + when updating a Service to no longer need it (e.g. changing + type). This field cannot be updated once set. + format: int32 + type: integer + internalTrafficPolicy: + description: InternalTrafficPolicy describes how nodes distribute + service traffic they receive on the ClusterIP. If set + to "Local", the proxy will assume that pods only want + to talk to endpoints of the service on the same node as + the pod, dropping the traffic if there are no local endpoints. + The default value, "Cluster", uses the standard behavior + of routing to all endpoints evenly (possibly modified + by topology and other features). + type: string + ipFamilies: + description: "IPFamilies is a list of IP families (e.g. + IPv4, IPv6) assigned to this service. This field is usually + assigned automatically based on cluster configuration + and the ipFamilyPolicy field. If this field is specified + manually, the requested family is available in the cluster, + and ipFamilyPolicy allows it, it will be used; otherwise + creation of the service will fail. This field is conditionally + mutable: it allows for adding or removing a secondary + IP family, but it does not allow changing the primary + IP family of the Service. Valid values are \"IPv4\" and + \"IPv6\". This field only applies to Services of types + ClusterIP, NodePort, and LoadBalancer, and does apply + to \"headless\" services. This field will be wiped when + updating a Service to type ExternalName. \n This field + may hold a maximum of two entries (dual-stack families, + in either order). These families must correspond to the + values of the clusterIPs field, if specified. Both clusterIPs + and ipFamilies are governed by the ipFamilyPolicy field." + items: + description: IPFamily represents the IP Family (IPv4 or + IPv6). This type is used to express the family of an + IP expressed by a type (e.g. service.spec.ipFamilies). + type: string + type: array + x-kubernetes-list-type: atomic + ipFamilyPolicy: + description: IPFamilyPolicy represents the dual-stack-ness + requested or required by this Service. If there is no + value provided, then this field will be set to SingleStack. + Services can be "SingleStack" (a single IP family), "PreferDualStack" + (two IP families on dual-stack configured clusters or + a single IP family on single-stack clusters), or "RequireDualStack" + (two IP families on dual-stack configured clusters, otherwise + fail). The ipFamilies and clusterIPs fields depend on + the value of this field. This field will be wiped when + updating a service to type ExternalName. + type: string + loadBalancerClass: + description: loadBalancerClass is the class of the load + balancer implementation this Service belongs to. If specified, + the value of this field must be a label-style identifier, + with an optional prefix, e.g. "internal-vip" or "example.com/internal-vip". + Unprefixed names are reserved for end-users. This field + can only be set when the Service type is 'LoadBalancer'. + If not set, the default load balancer implementation is + used, today this is typically done through the cloud provider + integration, but should apply for any default implementation. + If set, it is assumed that a load balancer implementation + is watching for Services with a matching class. Any default + load balancer implementation (e.g. cloud providers) should + ignore Services that set this field. This field can only + be set when creating or updating a Service to type 'LoadBalancer'. + Once set, it can not be changed. This field will be wiped + when a service is updated to a non 'LoadBalancer' type. + type: string + loadBalancerIP: + description: 'Only applies to Service Type: LoadBalancer. + This feature depends on whether the underlying cloud-provider + supports specifying the loadBalancerIP when a load balancer + is created. This field will be ignored if the cloud-provider + does not support the feature. Deprecated: This field was + under-specified and its meaning varies across implementations. + Using it is non-portable and it may not support dual-stack. + Users are encouraged to use implementation-specific annotations + when available.' + type: string + loadBalancerSourceRanges: + description: 'If specified and supported by the platform, + this will restrict traffic through the cloud-provider + load-balancer will be restricted to the specified client + IPs. This field will be ignored if the cloud-provider + does not support the feature." More info: https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/' + items: + type: string + type: array + ports: + description: 'The list of ports that are exposed by this + service. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies' + items: + description: ServicePort contains information on service's + port. + properties: + appProtocol: + description: "The application protocol for this port. + This is used as a hint for implementations to offer + richer behavior for protocols that they understand. + This field follows standard Kubernetes label syntax. + Valid values are either: \n * Un-prefixed protocol + names - reserved for IANA standard service names + (as per RFC-6335 and https://www.iana.org/assignments/service-names). + \n * Kubernetes-defined prefixed names: * 'kubernetes.io/h2c' + - HTTP/2 over cleartext as described in https://www.rfc-editor.org/rfc/rfc7540 + * 'kubernetes.io/ws' - WebSocket over cleartext + as described in https://www.rfc-editor.org/rfc/rfc6455 + * 'kubernetes.io/wss' - WebSocket over TLS as described + in https://www.rfc-editor.org/rfc/rfc6455 \n * Other + protocols should use implementation-defined prefixed + names such as mycompany.com/my-custom-protocol." + type: string + name: + description: The name of this port within the service. + This must be a DNS_LABEL. All ports within a ServiceSpec + must have unique names. When considering the endpoints + for a Service, this must match the 'name' field + in the EndpointPort. Optional if only one ServicePort + is defined on this service. + type: string + nodePort: + description: 'The port on each node on which this + service is exposed when type is NodePort or LoadBalancer. Usually + assigned by the system. If a value is specified, + in-range, and not in use it will be used, otherwise + the operation will fail. If not specified, a port + will be allocated if this Service requires one. If + this field is specified when creating a Service + which does not need it, creation will fail. This + field will be wiped when updating a Service to no + longer need it (e.g. changing type from NodePort + to ClusterIP). More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport' + format: int32 + type: integer + port: + description: The port that will be exposed by this + service. + format: int32 + type: integer + protocol: + default: TCP + description: The IP protocol for this port. Supports + "TCP", "UDP", and "SCTP". Default is TCP. + type: string + targetPort: + anyOf: + - type: integer + - type: string + description: 'Number or name of the port to access + on the pods targeted by the service. Number must + be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + If this is a string, it will be looked up as a named + port in the target Pod''s container ports. If this + is not specified, the value of the ''port'' field + is used (an identity map). This field is ignored + for services with clusterIP=None, and should be + omitted or set equal to the ''port'' field. More + info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service' + x-kubernetes-int-or-string: true + required: + - port + type: object + type: array + x-kubernetes-list-map-keys: + - port + - protocol + x-kubernetes-list-type: map + publishNotReadyAddresses: + description: publishNotReadyAddresses indicates that any + agent which deals with endpoints for this Service should + disregard any indications of ready/not-ready. The primary + use case for setting this field is for a StatefulSet's + Headless Service to propagate SRV DNS records for its + Pods for the purpose of peer discovery. The Kubernetes + controllers that generate Endpoints and EndpointSlice + resources for Services interpret this to mean that all + endpoints are considered "ready" even if the Pods themselves + are not. Agents which consume only Kubernetes generated + endpoints through the Endpoints or EndpointSlice resources + can safely assume this behavior. + type: boolean + selector: + additionalProperties: + type: string + description: 'Route service traffic to pods with label keys + and values matching this selector. If empty or not present, + the service is assumed to have an external process managing + its endpoints, which Kubernetes will not modify. Only + applies to types ClusterIP, NodePort, and LoadBalancer. + Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/' + type: object + x-kubernetes-map-type: atomic + sessionAffinity: + description: 'Supports "ClientIP" and "None". Used to maintain + session affinity. Enable client IP based session affinity. + Must be ClientIP or None. Defaults to None. More info: + https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies' + type: string + sessionAffinityConfig: + description: sessionAffinityConfig contains the configurations + of session affinity. + properties: + clientIP: + description: clientIP contains the configurations of + Client IP based session affinity. + properties: + timeoutSeconds: + description: timeoutSeconds specifies the seconds + of ClientIP type session sticky time. The value + must be >0 && <=86400(for 1 day) if ServiceAffinity + == "ClientIP". Default value is 10800(for 3 hours). + format: int32 + type: integer + type: object + type: object + type: + description: 'type determines how the Service is exposed. + Defaults to ClusterIP. Valid options are ExternalName, + ClusterIP, NodePort, and LoadBalancer. "ClusterIP" allocates + a cluster-internal IP address for load-balancing to endpoints. + Endpoints are determined by the selector or if that is + not specified, by manual construction of an Endpoints + object or EndpointSlice objects. If clusterIP is "None", + no virtual IP is allocated and the endpoints are published + as a set of endpoints rather than a virtual IP. "NodePort" + builds on ClusterIP and allocates a port on every node + which routes to the same endpoints as the clusterIP. "LoadBalancer" + builds on NodePort and creates an external load-balancer + (if supported in the current cloud) which routes to the + same endpoints as the clusterIP. "ExternalName" aliases + this service to the specified externalName. Several other + fields do not apply to ExternalName services. More info: + https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types' + type: string + type: object + required: + - name + type: object + type: array + x-kubernetes-preserve-unknown-fields: true + storage: + description: storage specifies the storage of the first componentSpec, + if the storage of the first componentSpec is specified, this value + will be ignored. + properties: + size: + anyOf: + - type: integer + - type: string + description: 'storage size needed, more info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + 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 + tenancy: + description: tenancy describes how pods are distributed across node. + SharedNode means multiple pods may share the same node. DedicatedNode + means each pod runs on their own dedicated node. + enum: + - SharedNode + - DedicatedNode + type: string + terminationPolicy: + description: Cluster termination policy. Valid values are DoNotTerminate, + Halt, Delete, WipeOut. DoNotTerminate will block delete operation. + Halt will delete workload resources such as statefulset, deployment + workloads but keep PVCs. Delete is based on Halt and deletes PVCs. + WipeOut is based on Delete and wipe out all volume snapshots and + snapshot data from backup storage location. + enum: + - DoNotTerminate + - Halt + - Delete + - WipeOut + type: string + tolerations: + description: tolerations are attached to tolerate any taint that matches + the triple `key,value,effect` using the matching operator `operator`. + items: + description: The pod this Toleration is attached to tolerates any + taint that matches the triple using the matching + operator . + properties: + effect: + description: Effect indicates the taint effect to match. Empty + means match all taint effects. When specified, allowed values + are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: Key is the taint key that the toleration applies + to. Empty means match all taint keys. If the key is empty, + operator must be Exists; this combination means to match all + values and all keys. + type: string + operator: + description: Operator represents a key's relationship to the + value. Valid operators are Exists and Equal. Defaults to Equal. + Exists is equivalent to wildcard for value, so that a pod + can tolerate all taints of a particular category. + type: string + tolerationSeconds: + description: TolerationSeconds represents the period of time + the toleration (which must be of effect NoExecute, otherwise + this field is ignored) tolerates the taint. By default, it + is not set, which means tolerate the taint forever (do not + evict). Zero and negative values will be treated as 0 (evict + immediately) by the system. + format: int64 + type: integer + value: + description: Value is the taint value the toleration matches + to. If the operator is Exists, the value should be empty, + otherwise just a regular string. + type: string + type: object + type: array + x-kubernetes-preserve-unknown-fields: true + required: + - terminationPolicy + type: object + status: + description: ClusterStatus defines the observed state of Cluster. + properties: + clusterDefGeneration: + description: clusterDefGeneration represents the generation number + of ClusterDefinition referenced. + format: int64 + type: integer + components: + additionalProperties: + description: ClusterComponentStatus records components status. + properties: + consensusSetStatus: + description: consensusSetStatus specifies the mapping of role + and pod name. + properties: + followers: + description: Followers status. + items: + properties: + accessMode: + default: ReadWrite + description: accessMode defines what service this + pod provides. + enum: + - None + - Readonly + - ReadWrite + type: string + name: + default: leader + description: Defines the role name. + type: string + pod: + default: Unknown + description: Pod name. + type: string + required: + - accessMode + - name + - pod + type: object + type: array + leader: + description: Leader status. + properties: + accessMode: + default: ReadWrite + description: accessMode defines what service this pod + provides. + enum: + - None + - Readonly + - ReadWrite + type: string + name: + default: leader + description: Defines the role name. + type: string + pod: + default: Unknown + description: Pod name. + type: string + required: + - accessMode + - name + - pod + type: object + learner: + description: Learner status. + properties: + accessMode: + default: ReadWrite + description: accessMode defines what service this pod + provides. + enum: + - None + - Readonly + - ReadWrite + type: string + name: + default: leader + description: Defines the role name. + type: string + pod: + default: Unknown + description: Pod name. + type: string + required: + - accessMode + - name + - pod + type: object + required: + - leader + type: object + membersStatus: + description: members' status. + items: + properties: + podName: + default: Unknown + description: PodName pod name. + type: string + readyWithoutPrimary: + description: Is it required for rsm to have at least one + primary pod to be ready. + type: boolean + role: + properties: + accessMode: + default: ReadWrite + description: AccessMode, what service this member + capable. + enum: + - None + - Readonly + - ReadWrite + type: string + canVote: + default: true + description: CanVote, whether this member has voting + rights + type: boolean + isLeader: + default: false + description: IsLeader, whether this member is the + leader + type: boolean + name: + default: leader + description: Name, role name. + type: string + required: + - accessMode + - name + type: object + required: + - podName + - role + type: object + type: array + message: + additionalProperties: + type: string + description: message records the component details message in + current phase. Keys are podName or deployName or statefulSetName. + The format is `ObjectKind/Name`. + type: object + phase: + description: 'phase describes the phase of the component and + the detail information of the phases are as following: Creating: + `Creating` is a special `Updating` with previous phase `empty`(means + "") or `Creating`. Running: component replicas > 0 and all + pod specs are latest with a Running state. Updating: component + replicas > 0 and has no failed pods. the component is being + updated. Abnormal: component replicas > 0 but having some + failed pods. the component basically works but in a fragile + state. Failed: component replicas > 0 but having some failed + pods. the component doesn''t work anymore. Stopping: component + replicas = 0 and has terminating pods. Stopped: component + replicas = 0 and all pods have been deleted. Deleting: the + component is being deleted.' + enum: + - Creating + - Running + - Updating + - Stopping + - Stopped + - Deleting + - Failed + - Abnormal + type: string + podsReady: + description: podsReady checks if all pods of the component are + ready. + type: boolean + podsReadyTime: + description: podsReadyTime what time point of all component + pods are ready, this time is the ready time of the last component + pod. + format: date-time + type: string + replicationSetStatus: + description: replicationSetStatus specifies the mapping of role + and pod name. + properties: + primary: + description: Primary status. + properties: + pod: + default: Unknown + description: Pod name. + type: string + required: + - pod + type: object + secondaries: + description: Secondaries status. + items: + properties: + pod: + default: Unknown + description: Pod name. + type: string + required: + - pod + type: object + type: array + required: + - primary + type: object + type: object + description: components record the current status information of all + components of the cluster. + type: object + conditions: + description: Describe current state of cluster API Resource, like + warning. + items: + description: "Condition contains details for one aspect of the current + state of this API Resource. --- This struct is intended for direct + use as an array at the field path .status.conditions. For example, + \n type FooStatus struct{ // Represents the observations of a + foo's current state. // Known .status.conditions.type are: \"Available\", + \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge + // +listType=map // +listMapKey=type Conditions []metav1.Condition + `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" + protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" + properties: + lastTransitionTime: + description: lastTransitionTime is the last time the condition + transitioned from one status to another. This should be when + the underlying condition changed. If that is not known, then + using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: message is a human readable message indicating + details about the transition. This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: observedGeneration represents the .metadata.generation + that the condition was set based upon. For instance, if .metadata.generation + is currently 12, but the .status.conditions[x].observedGeneration + is 9, the condition is out of date with respect to the current + state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: reason contains a programmatic identifier indicating + the reason for the condition's last transition. Producers + of specific condition types may define expected values and + meanings for this field, and whether the values are considered + a guaranteed API. The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + --- Many .condition.type values are consistent across resources + like Available, but because arbitrary conditions can be useful + (see .node.status.conditions), the ability to deconflict is + important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + message: + description: message describes cluster details message in current + phase. + type: string + observedGeneration: + description: observedGeneration is the most recent generation observed + for this Cluster. It corresponds to the Cluster's generation, which + is updated on mutation by the API Server. + format: int64 + type: integer + phase: + description: 'phase describes the phase of the Cluster, the detail + information of the phases are as following: Creating: all components + are in `Creating` phase. Running: all components are in `Running` + phase, means the cluster is working well. Updating: all components + are in `Creating`, `Running` or `Updating` phase, and at least one + component is in `Creating` or `Updating` phase, means the cluster + is doing an update. Stopping: at least one component is in `Stopping` + phase, means the cluster is in a stop progress. Stopped: all components + are in ''Stopped` phase, means the cluster has stopped and didn''t + provide any function anymore. Failed: all components are in `Failed` + phase, means the cluster is unavailable. Abnormal: some components + are in `Failed` or `Abnormal` phase, means the cluster in a fragile + state. troubleshoot need to be done. Deleting: the cluster is being + deleted.' + enum: + - Creating + - Running + - Updating + - Stopping + - Stopped + - Deleting + - Failed + - Abnormal + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.12.1 + labels: + app.kubernetes.io/name: kubeblocks + name: clusterversions.apps.kubeblocks.io +spec: + group: apps.kubeblocks.io + names: + categories: + - kubeblocks + kind: ClusterVersion + listKind: ClusterVersionList + plural: clusterversions + shortNames: + - cv + singular: clusterversion + scope: Cluster + versions: + - additionalPrinterColumns: + - description: ClusterDefinition referenced by cluster. + jsonPath: .spec.clusterDefinitionRef + name: CLUSTER-DEFINITION + type: string + - description: status phase + jsonPath: .status.phase + name: STATUS + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: ClusterVersion is the Schema for the ClusterVersions 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: + type: object + spec: + description: ClusterVersionSpec defines the desired state of ClusterVersion + properties: + clusterDefinitionRef: + description: ref ClusterDefinition. + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + componentVersions: + description: List of components' containers versioning context, i.e., + container image ID, container commands, args., and environments. + items: + description: ClusterComponentVersion is an application version component + spec. + properties: + componentDefRef: + description: componentDefRef reference one of the cluster component + definition names in ClusterDefinition API (spec.componentDefs.name). + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + configSpecs: + description: configSpecs defines a configuration extension mechanism + to handle configuration differences between versions, the + configTemplateRefs field, together with configTemplateRefs + in the ClusterDefinition, determines the final configuration + file. + items: + properties: + asEnvFrom: + description: 'asEnvFrom is optional: the list of containers + will be injected into EnvFrom.' + items: + type: string + type: array + x-kubernetes-list-type: set + constraintRef: + description: Specify the name of the referenced the configuration + constraints object. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + defaultMode: + description: 'defaultMode is optional: mode bits used + to set permissions on created files by default. Must + be an octal value between 0000 and 0777 or a decimal + value between 0 and 511. YAML accepts both octal and + decimal values, JSON requires decimal values for mode + bits. 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 + keys: + description: Specify a list of keys. If empty, ConfigConstraint + takes effect for all keys in configmap. + items: + type: string + type: array + x-kubernetes-list-type: set + legacyRenderedConfigSpec: + description: 'lazyRenderedConfigSpec is optional: specify + the secondary rendered config spec.' + properties: + namespace: + default: default + description: Specify the namespace of the referenced + the configuration template ConfigMap object. An + empty namespace is equivalent to the "default" namespace. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$ + type: string + policy: + default: none + description: policy defines how to merge external + imported templates into component templates. + enum: + - patch + - replace + - none + type: string + templateRef: + description: Specify the name of the referenced the + configuration template ConfigMap object. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + required: + - templateRef + type: object + name: + description: Specify the name of configuration template. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + namespace: + default: default + description: Specify the namespace of the referenced the + configuration template ConfigMap object. An empty namespace + is equivalent to the "default" namespace. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$ + type: string + templateRef: + description: Specify the name of the referenced the configuration + template ConfigMap object. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + volumeName: + description: volumeName is the volume name of PodTemplate, + which the configuration file produced through the configuration + template will be mounted to the corresponding volume. + Must be a DNS_LABEL name. The volume name must be defined + in podSpec.containers[*].volumeMounts. + maxLength: 63 + pattern: ^[a-z]([a-z0-9\-]*[a-z0-9])?$ + type: string + required: + - name + - templateRef + - volumeName + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + switchoverSpec: + description: switchoverSpec defines images for the component + to do switchover. It overrides `image` and `env` attributes + defined in ClusterDefinition.spec.componentDefs.SwitchoverSpec.CommandExecutorEnvItem. + properties: + cmdExecutorConfig: + description: CmdExecutorConfig is the command executor config. + properties: + env: + description: envs is a list of environment variables. + 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 previously 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. + Double $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" + will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + x-kubernetes-preserve-unknown-fields: true + image: + description: image for Connector when executing the + command. + type: string + required: + - image + type: object + required: + - cmdExecutorConfig + type: object + systemAccountSpec: + description: systemAccountSpec define image for the component + to connect database or engines. It overrides `image` and `env` + attributes defined in ClusterDefinition.spec.componentDefs.systemAccountSpec.cmdExecutorConfig. + To clean default envs settings, set `SystemAccountSpec.CmdExecutorConfig.Env` + to empty list. + properties: + cmdExecutorConfig: + description: cmdExecutorConfig configs how to get client + SDK and perform statements. + properties: + env: + description: envs is a list of environment variables. + 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 previously 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. + Double $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" + will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + x-kubernetes-preserve-unknown-fields: true + image: + description: image for Connector when executing the + command. + type: string + required: + - image + type: object + required: + - cmdExecutorConfig + type: object + versionsContext: + description: versionContext defines containers images' context + for component versions, this value replaces ClusterDefinition.spec.componentDefs.podSpec.[initContainers + | containers] + properties: + containers: + description: Provide ClusterDefinition.spec.componentDefs.podSpec.containers + override values, typical scenarios are application container + image updates. + items: + description: A single application container that you want + to run within a pod. + properties: + args: + description: 'Arguments to the entrypoint. The container + image''s CMD is used if this is not provided. Variable + references $(VAR_NAME) are expanded using the container''s + environment. If a variable cannot be resolved, the + reference in the input string will be unchanged. + Double $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" + will produce the string literal "$(VAR_NAME)". Escaped + references will never be expanded, regardless of + whether the variable exists or not. Cannot be updated. + More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + command: + description: 'Entrypoint array. Not executed within + a shell. The container image''s ENTRYPOINT is used + if this is not provided. Variable references $(VAR_NAME) + are expanded using the container''s environment. + If a variable cannot be resolved, the reference + in the input string will be unchanged. Double $$ + are reduced to a single $, which allows for escaping + the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will + produce the string literal "$(VAR_NAME)". Escaped + references will never be expanded, regardless of + whether the variable exists or not. Cannot be updated. + More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + 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 previously 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. Double $$ are reduced + to a single $, which allows for escaping the + $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will + produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, + regardless of whether the variable exists + or not. 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + type: object + type: array + image: + description: 'Container 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: 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. + This will be canonicalized upon + output, so case-variant names + will be understood as the same + header. + 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: Deprecated. TCPSocket is NOT + supported as a LifecycleHandler and kept + for the backward compatibility. There are + no validation of this field and lifecycle + hooks will fail in runtime when tcp handler + is specified. + 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 Pod''s termination grace + period countdown begins before the PreStop hook + is executed. Regardless of the outcome of the + handler, the container will eventually terminate + within the Pod''s termination grace period (unless + delayed by finalizers). 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: 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. + This will be canonicalized upon + output, so case-variant names + will be understood as the same + header. + 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: Deprecated. TCPSocket is NOT + supported as a LifecycleHandler and kept + for the backward compatibility. There are + no validation of this field and lifecycle + hooks will fail in runtime when tcp handler + is specified. + 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: 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 + grpc: + description: GRPC specifies an action involving + a GRPC port. + properties: + port: + description: Port number of the gRPC service. + Number must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service + to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default + behavior is defined by gRPC." + type: string + required: + - port + 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. + This will be canonicalized upon output, + so case-variant names will be understood + as the same header. + 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. + 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 + terminationGracePeriodSeconds: + description: Optional duration in seconds the + pod needs to terminate gracefully upon probe + failure. The grace period is the duration in + seconds after the processes running in the pod + are sent a termination signal and the time when + the processes are forcibly halted with a kill + signal. Set this value longer than the expected + cleanup time for your process. If this value + is nil, the pod's terminationGracePeriodSeconds + will be used. Otherwise, this value overrides + the value provided by the pod spec. Value must + be non-negative integer. The value zero indicates + stop immediately via the kill signal (no opportunity + to shut down). This is a beta field and requires + enabling ProbeTerminationGracePeriod feature + gate. Minimum value is 1. spec.terminationGracePeriodSeconds + is used if unset. + format: int64 + type: integer + 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. + 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. Modifying this + array with strategic merge patch may corrupt the + data. For more information See https://github.com/kubernetes/kubernetes/issues/108255. + 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: 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 + grpc: + description: GRPC specifies an action involving + a GRPC port. + properties: + port: + description: Port number of the gRPC service. + Number must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service + to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default + behavior is defined by gRPC." + type: string + required: + - port + 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. + This will be canonicalized upon output, + so case-variant names will be understood + as the same header. + 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. + 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 + terminationGracePeriodSeconds: + description: Optional duration in seconds the + pod needs to terminate gracefully upon probe + failure. The grace period is the duration in + seconds after the processes running in the pod + are sent a termination signal and the time when + the processes are forcibly halted with a kill + signal. Set this value longer than the expected + cleanup time for your process. If this value + is nil, the pod's terminationGracePeriodSeconds + will be used. Otherwise, this value overrides + the value provided by the pod spec. Value must + be non-negative integer. The value zero indicates + stop immediately via the kill signal (no opportunity + to shut down). This is a beta field and requires + enabling ProbeTerminationGracePeriod feature + gate. Minimum value is 1. spec.terminationGracePeriodSeconds + is used if unset. + format: int64 + type: integer + 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 + resizePolicy: + description: Resources resize policy for the container. + items: + description: ContainerResizePolicy represents resource + resize policy for the container. + properties: + resourceName: + description: 'Name of the resource to which + this resource resize policy applies. Supported + values: cpu, memory.' + type: string + restartPolicy: + description: Restart policy to apply when specified + resource is resized. If not specified, it + defaults to NotRequired. + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + description: 'Compute Resources required by this container. + Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + properties: + claims: + description: "Claims lists the names of resources, + defined in spec.resourceClaims, that are used + by this container. \n This is an alpha field + and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It + can only be set for containers." + items: + description: ResourceClaim references one entry + in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of + one entry in pod.spec.resourceClaims of + the Pod where this field is used. It makes + that resource available inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + 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-resources-containers/' + 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. Requests cannot + exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + restartPolicy: + description: 'RestartPolicy defines the restart behavior + of individual containers in a pod. This field may + only be set for init containers, and the only allowed + value is "Always". For non-init containers or when + this field is not specified, the restart behavior + is defined by the Pod''s restart policy and the + container type. Setting the RestartPolicy as "Always" + for the init container will have the following effect: + this init container will be continually restarted + on exit until all regular containers have terminated. + Once all regular containers have completed, all + init containers with restartPolicy "Always" will + be shut down. This lifecycle differs from normal + init containers and is often referred to as a "sidecar" + container. Although this init container still starts + in the init container sequence, it does not wait + for the container to complete before proceeding + to the next init container. Instead, the next init + container starts immediately after this init container + is started, or after any startupProbe has successfully + completed.' + type: string + securityContext: + description: 'SecurityContext defines the security + options the container should be run with. If set, + the fields of SecurityContext override the equivalent + fields of PodSecurityContext. 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 Note that + this field cannot be set when spec.os.name is + windows.' + type: boolean + capabilities: + description: The capabilities to add/drop when + running containers. Defaults to the default + set of capabilities granted by the container + runtime. Note that this field cannot be set + when spec.os.name is windows. + 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. Note that this field cannot be set when + spec.os.name is windows. + 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. Note that this field cannot + be set when spec.os.name is windows. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only + root filesystem. Default is false. Note that + this field cannot be set when spec.os.name is + windows. + 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. Note that this field cannot be set + when spec.os.name is windows. + 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. Note that + this field cannot be set when spec.os.name is + windows. + 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. Note that this field cannot be set + when spec.os.name is windows. + 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 + seccompProfile: + description: The seccomp options to use by this + container. If seccomp options are provided at + both the pod & container level, the container + options override the pod options. Note that + this field cannot be set when spec.os.name is + windows. + properties: + localhostProfile: + description: localhostProfile indicates a + profile defined in a file on the node should + be used. The profile must be preconfigured + on the node to work. Must be a descending + path, relative to the kubelet's configured + seccomp profile location. Must be set if + type is "Localhost". Must NOT be set for + any other type. + type: string + type: + description: "type indicates which kind of + seccomp profile will be applied. Valid options + are: \n Localhost - a profile defined in + a file on the node should be used. RuntimeDefault + - the container runtime default profile + should be used. Unconfined - no profile + should be applied." + type: string + required: + - type + 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. Note that this field cannot be set + when spec.os.name is linux. + 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. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the + name of the GMSA credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container + should be run as a 'Host Process' container. + All of a Pod's containers must have the + same effective HostProcess value (it is + not allowed to have a mix of HostProcess + containers and non-HostProcess containers). + In addition, if HostProcess is true then + HostNetwork must also be set to true. + type: boolean + 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. + 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. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: 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 + grpc: + description: GRPC specifies an action involving + a GRPC port. + properties: + port: + description: Port number of the gRPC service. + Number must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service + to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default + behavior is defined by gRPC." + type: string + required: + - port + 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. + This will be canonicalized upon output, + so case-variant names will be understood + as the same header. + 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. + 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 + terminationGracePeriodSeconds: + description: Optional duration in seconds the + pod needs to terminate gracefully upon probe + failure. The grace period is the duration in + seconds after the processes running in the pod + are sent a termination signal and the time when + the processes are forcibly halted with a kill + signal. Set this value longer than the expected + cleanup time for your process. If this value + is nil, the pod's terminationGracePeriodSeconds + will be used. Otherwise, this value overrides + the value provided by the pod spec. Value must + be non-negative integer. The value zero indicates + stop immediately via the kill signal (no opportunity + to shut down). This is a beta field and requires + enabling ProbeTerminationGracePeriod feature + gate. Minimum value is 1. spec.terminationGracePeriodSeconds + is used if unset. + format: int64 + type: integer + 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. + 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 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + x-kubernetes-preserve-unknown-fields: true + initContainers: + description: Provide ClusterDefinition.spec.componentDefs.podSpec.initContainers + override values, typical scenarios are application container + image updates. + items: + description: A single application container that you want + to run within a pod. + properties: + args: + description: 'Arguments to the entrypoint. The container + image''s CMD is used if this is not provided. Variable + references $(VAR_NAME) are expanded using the container''s + environment. If a variable cannot be resolved, the + reference in the input string will be unchanged. + Double $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" + will produce the string literal "$(VAR_NAME)". Escaped + references will never be expanded, regardless of + whether the variable exists or not. Cannot be updated. + More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + command: + description: 'Entrypoint array. Not executed within + a shell. The container image''s ENTRYPOINT is used + if this is not provided. Variable references $(VAR_NAME) + are expanded using the container''s environment. + If a variable cannot be resolved, the reference + in the input string will be unchanged. Double $$ + are reduced to a single $, which allows for escaping + the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will + produce the string literal "$(VAR_NAME)". Escaped + references will never be expanded, regardless of + whether the variable exists or not. Cannot be updated. + More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + 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 previously 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. Double $$ are reduced + to a single $, which allows for escaping the + $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will + produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, + regardless of whether the variable exists + or not. 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + type: object + type: array + image: + description: 'Container 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: 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. + This will be canonicalized upon + output, so case-variant names + will be understood as the same + header. + 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: Deprecated. TCPSocket is NOT + supported as a LifecycleHandler and kept + for the backward compatibility. There are + no validation of this field and lifecycle + hooks will fail in runtime when tcp handler + is specified. + 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 Pod''s termination grace + period countdown begins before the PreStop hook + is executed. Regardless of the outcome of the + handler, the container will eventually terminate + within the Pod''s termination grace period (unless + delayed by finalizers). 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: 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. + This will be canonicalized upon + output, so case-variant names + will be understood as the same + header. + 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: Deprecated. TCPSocket is NOT + supported as a LifecycleHandler and kept + for the backward compatibility. There are + no validation of this field and lifecycle + hooks will fail in runtime when tcp handler + is specified. + 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: 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 + grpc: + description: GRPC specifies an action involving + a GRPC port. + properties: + port: + description: Port number of the gRPC service. + Number must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service + to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default + behavior is defined by gRPC." + type: string + required: + - port + 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. + This will be canonicalized upon output, + so case-variant names will be understood + as the same header. + 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. + 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 + terminationGracePeriodSeconds: + description: Optional duration in seconds the + pod needs to terminate gracefully upon probe + failure. The grace period is the duration in + seconds after the processes running in the pod + are sent a termination signal and the time when + the processes are forcibly halted with a kill + signal. Set this value longer than the expected + cleanup time for your process. If this value + is nil, the pod's terminationGracePeriodSeconds + will be used. Otherwise, this value overrides + the value provided by the pod spec. Value must + be non-negative integer. The value zero indicates + stop immediately via the kill signal (no opportunity + to shut down). This is a beta field and requires + enabling ProbeTerminationGracePeriod feature + gate. Minimum value is 1. spec.terminationGracePeriodSeconds + is used if unset. + format: int64 + type: integer + 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. + 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. Modifying this + array with strategic merge patch may corrupt the + data. For more information See https://github.com/kubernetes/kubernetes/issues/108255. + 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: 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 + grpc: + description: GRPC specifies an action involving + a GRPC port. + properties: + port: + description: Port number of the gRPC service. + Number must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service + to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default + behavior is defined by gRPC." + type: string + required: + - port + 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. + This will be canonicalized upon output, + so case-variant names will be understood + as the same header. + 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. + 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 + terminationGracePeriodSeconds: + description: Optional duration in seconds the + pod needs to terminate gracefully upon probe + failure. The grace period is the duration in + seconds after the processes running in the pod + are sent a termination signal and the time when + the processes are forcibly halted with a kill + signal. Set this value longer than the expected + cleanup time for your process. If this value + is nil, the pod's terminationGracePeriodSeconds + will be used. Otherwise, this value overrides + the value provided by the pod spec. Value must + be non-negative integer. The value zero indicates + stop immediately via the kill signal (no opportunity + to shut down). This is a beta field and requires + enabling ProbeTerminationGracePeriod feature + gate. Minimum value is 1. spec.terminationGracePeriodSeconds + is used if unset. + format: int64 + type: integer + 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 + resizePolicy: + description: Resources resize policy for the container. + items: + description: ContainerResizePolicy represents resource + resize policy for the container. + properties: + resourceName: + description: 'Name of the resource to which + this resource resize policy applies. Supported + values: cpu, memory.' + type: string + restartPolicy: + description: Restart policy to apply when specified + resource is resized. If not specified, it + defaults to NotRequired. + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + description: 'Compute Resources required by this container. + Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + properties: + claims: + description: "Claims lists the names of resources, + defined in spec.resourceClaims, that are used + by this container. \n This is an alpha field + and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It + can only be set for containers." + items: + description: ResourceClaim references one entry + in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of + one entry in pod.spec.resourceClaims of + the Pod where this field is used. It makes + that resource available inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + 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-resources-containers/' + 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. Requests cannot + exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + restartPolicy: + description: 'RestartPolicy defines the restart behavior + of individual containers in a pod. This field may + only be set for init containers, and the only allowed + value is "Always". For non-init containers or when + this field is not specified, the restart behavior + is defined by the Pod''s restart policy and the + container type. Setting the RestartPolicy as "Always" + for the init container will have the following effect: + this init container will be continually restarted + on exit until all regular containers have terminated. + Once all regular containers have completed, all + init containers with restartPolicy "Always" will + be shut down. This lifecycle differs from normal + init containers and is often referred to as a "sidecar" + container. Although this init container still starts + in the init container sequence, it does not wait + for the container to complete before proceeding + to the next init container. Instead, the next init + container starts immediately after this init container + is started, or after any startupProbe has successfully + completed.' + type: string + securityContext: + description: 'SecurityContext defines the security + options the container should be run with. If set, + the fields of SecurityContext override the equivalent + fields of PodSecurityContext. 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 Note that + this field cannot be set when spec.os.name is + windows.' + type: boolean + capabilities: + description: The capabilities to add/drop when + running containers. Defaults to the default + set of capabilities granted by the container + runtime. Note that this field cannot be set + when spec.os.name is windows. + 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. Note that this field cannot be set when + spec.os.name is windows. + 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. Note that this field cannot + be set when spec.os.name is windows. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only + root filesystem. Default is false. Note that + this field cannot be set when spec.os.name is + windows. + 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. Note that this field cannot be set + when spec.os.name is windows. + 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. Note that + this field cannot be set when spec.os.name is + windows. + 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. Note that this field cannot be set + when spec.os.name is windows. + 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 + seccompProfile: + description: The seccomp options to use by this + container. If seccomp options are provided at + both the pod & container level, the container + options override the pod options. Note that + this field cannot be set when spec.os.name is + windows. + properties: + localhostProfile: + description: localhostProfile indicates a + profile defined in a file on the node should + be used. The profile must be preconfigured + on the node to work. Must be a descending + path, relative to the kubelet's configured + seccomp profile location. Must be set if + type is "Localhost". Must NOT be set for + any other type. + type: string + type: + description: "type indicates which kind of + seccomp profile will be applied. Valid options + are: \n Localhost - a profile defined in + a file on the node should be used. RuntimeDefault + - the container runtime default profile + should be used. Unconfined - no profile + should be applied." + type: string + required: + - type + 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. Note that this field cannot be set + when spec.os.name is linux. + 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. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the + name of the GMSA credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container + should be run as a 'Host Process' container. + All of a Pod's containers must have the + same effective HostProcess value (it is + not allowed to have a mix of HostProcess + containers and non-HostProcess containers). + In addition, if HostProcess is true then + HostNetwork must also be set to true. + type: boolean + 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. + 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. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: 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 + grpc: + description: GRPC specifies an action involving + a GRPC port. + properties: + port: + description: Port number of the gRPC service. + Number must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service + to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default + behavior is defined by gRPC." + type: string + required: + - port + 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. + This will be canonicalized upon output, + so case-variant names will be understood + as the same header. + 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. + 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 + terminationGracePeriodSeconds: + description: Optional duration in seconds the + pod needs to terminate gracefully upon probe + failure. The grace period is the duration in + seconds after the processes running in the pod + are sent a termination signal and the time when + the processes are forcibly halted with a kill + signal. Set this value longer than the expected + cleanup time for your process. If this value + is nil, the pod's terminationGracePeriodSeconds + will be used. Otherwise, this value overrides + the value provided by the pod spec. Value must + be non-negative integer. The value zero indicates + stop immediately via the kill signal (no opportunity + to shut down). This is a beta field and requires + enabling ProbeTerminationGracePeriod feature + gate. Minimum value is 1. spec.terminationGracePeriodSeconds + is used if unset. + format: int64 + type: integer + 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. + 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 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + x-kubernetes-preserve-unknown-fields: true + type: object + required: + - componentDefRef + - versionsContext + type: object + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - componentDefRef + x-kubernetes-list-type: map + required: + - clusterDefinitionRef + - componentVersions + type: object + status: + description: ClusterVersionStatus defines the observed state of ClusterVersion + properties: + clusterDefGeneration: + description: clusterDefGeneration represents the generation number + of ClusterDefinition referenced. + format: int64 + type: integer + message: + description: A human readable message indicating details about why + the ClusterVersion is in this phase. + type: string + observedGeneration: + description: generation number + format: int64 + type: integer + phase: + description: phase - in list of [Available,Unavailable] + enum: + - Available + - Unavailable + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.12.1 + labels: + app.kubernetes.io/name: kubeblocks + name: componentclassdefinitions.apps.kubeblocks.io +spec: + group: apps.kubeblocks.io + names: + categories: + - kubeblocks + kind: ComponentClassDefinition + listKind: ComponentClassDefinitionList + plural: componentclassdefinitions + shortNames: + - ccd + singular: componentclassdefinition + scope: Cluster + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: ComponentClassDefinition is the Schema for the componentclassdefinitions + 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: + type: object + spec: + description: ComponentClassDefinitionSpec defines the desired state of + ComponentClassDefinition + properties: + groups: + description: group defines a list of class series that conform to + the same constraint. + items: + properties: + series: + description: series is a series of class definitions. + items: + properties: + classes: + description: classes are definitions of classes that come + in two forms. In the first form, only ComponentClass.Args + need to be defined, and the complete class definition + is generated by rendering the ComponentClassGroup.Template + and Name. In the second form, the Name, CPU and Memory + must be defined. + items: + properties: + args: + description: args are variable's value + items: + type: string + type: array + cpu: + anyOf: + - type: integer + - type: string + description: the CPU of the class + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + memory: + anyOf: + - type: integer + - type: string + description: the memory of the class + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + name: + description: name is the class name + type: string + type: object + type: array + namingTemplate: + description: 'namingTemplate is a template that uses the + Go template syntax and allows for referencing variables + defined in ComponentClassGroup.Template. This enables + dynamic generation of class names. For example: name: + "general-{{ .cpu }}c{{ .memory }}g"' + type: string + type: object + type: array + template: + description: "template is a class definition template that uses + the Go template syntax and allows for variable declaration. + When defining a class in Series, specifying the variable's + value is sufficient, as the complete class definition will + be generated through rendering the template. \n For example: + template: | cpu: \"{{ or .cpu 1 }}\" memory: \"{{ or .memory + 4 }}Gi\"" + type: string + vars: + description: vars defines the variables declared in the template + and will be used to generating the complete class definition + by render the template. + items: + type: string + type: array + x-kubernetes-list-type: set + type: object + type: array + type: object + status: + description: ComponentClassDefinitionStatus defines the observed state + of ComponentClassDefinition + properties: + classes: + description: classes is the list of classes that have been observed + for this ComponentClassDefinition + items: + properties: + args: + description: args are variable's value + items: + type: string + type: array + cpu: + anyOf: + - type: integer + - type: string + description: the CPU of the class + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + memory: + anyOf: + - type: integer + - type: string + description: the memory of the class + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + name: + description: name is the class name + type: string + type: object + type: array + observedGeneration: + description: observedGeneration is the most recent generation observed + for this ComponentClassDefinition. It corresponds to the ComponentClassDefinition's + generation, which is updated on mutation by the API Server. + format: int64 + type: integer + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.12.1 + labels: + app.kubernetes.io/name: kubeblocks + name: componentdefinitions.apps.kubeblocks.io +spec: + group: apps.kubeblocks.io + names: + categories: + - kubeblocks + kind: ComponentDefinition + listKind: ComponentDefinitionList + plural: componentdefinitions + shortNames: + - cmpd + singular: componentdefinition + scope: Cluster + versions: + - additionalPrinterColumns: + - description: service + jsonPath: .spec.serviceKind + name: SERVICE + type: string + - description: service version + jsonPath: .spec.serviceVersion + name: SERVICE-VERSION + type: string + - description: status phase + jsonPath: .status.phase + name: STATUS + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: ComponentDefinition is the Schema for the componentdefinitions + 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: + type: object + spec: + description: ComponentDefinitionSpec provides a workload component specification + with attributes that strongly work with stateful workloads and day-2 + operation behaviors. + properties: + configs: + description: 'The configs field provided by provider, and finally + this configTemplateRefs will be rendered into the user''s own configuration + file according to the user''s cluster. Cannot be updated. TODO: + support referencing configs from other components or clusters.' + items: + properties: + asEnvFrom: + description: 'asEnvFrom is optional: the list of containers + will be injected into EnvFrom.' + items: + type: string + type: array + x-kubernetes-list-type: set + constraintRef: + description: Specify the name of the referenced the configuration + constraints object. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + defaultMode: + description: 'defaultMode is optional: mode bits used to set + permissions on created files by default. Must be an octal + value between 0000 and 0777 or a decimal value between 0 and + 511. YAML accepts both octal and decimal values, JSON requires + decimal values for mode bits. 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 + keys: + description: Specify a list of keys. If empty, ConfigConstraint + takes effect for all keys in configmap. + items: + type: string + type: array + x-kubernetes-list-type: set + legacyRenderedConfigSpec: + description: 'lazyRenderedConfigSpec is optional: specify the + secondary rendered config spec.' + properties: + namespace: + default: default + description: Specify the namespace of the referenced the + configuration template ConfigMap object. An empty namespace + is equivalent to the "default" namespace. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$ + type: string + policy: + default: none + description: policy defines how to merge external imported + templates into component templates. + enum: + - patch + - replace + - none + type: string + templateRef: + description: Specify the name of the referenced the configuration + template ConfigMap object. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + required: + - templateRef + type: object + name: + description: Specify the name of configuration template. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + namespace: + default: default + description: Specify the namespace of the referenced the configuration + template ConfigMap object. An empty namespace is equivalent + to the "default" namespace. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$ + type: string + templateRef: + description: Specify the name of the referenced the configuration + template ConfigMap object. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + volumeName: + description: volumeName is the volume name of PodTemplate, which + the configuration file produced through the configuration + template will be mounted to the corresponding volume. Must + be a DNS_LABEL name. The volume name must be defined in podSpec.containers[*].volumeMounts. + maxLength: 63 + pattern: ^[a-z]([a-z0-9\-]*[a-z0-9])?$ + type: string + required: + - name + - templateRef + - volumeName + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + description: + description: Description is a brief description of the component. + maxLength: 256 + type: string + labels: + additionalProperties: + type: string + description: Labels defines static labels that will be patched to + all k8s resources created for the component. If a label key conflicts + with any other system labels or user-specified labels, it will be + silently ignored. Cannot be updated. + type: object + lifecycleActions: + description: LifecycleActions defines the operational actions that + needed to interoperate with the component service and processes + for lifecycle management. Cannot be updated. + properties: + accountProvision: + description: AccountProvision defines how to provision accounts. + Cannot be updated. + properties: + builtinHandler: + description: builtinHandler specifies the builtin action handler + name to do the action. the BuiltinHandler within the same + ComponentLifecycleActions should be consistent. Details + can be queried through official documentation in the future. + use CustomHandler to define your own actions if none of + them satisfies the requirement. + type: string + customHandler: + description: customHandler defines the custom way to do action. + properties: + container: + description: Container defines the name of the container + within the target Pod where the action will be executed. + If specified, it must be one of container declared in + @Runtime. If not specified, the first container declared + in @Runtime will be used. Cannot be updated. + type: string + 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 previously 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. + Double $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" + will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + exec: + description: Exec specifies the action to take. Cannot + be updated. + properties: + args: + description: args is used to perform statements. + items: + type: string + type: array + 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 + http: + description: HTTP specifies the http request to perform. + Cannot be updated. + 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. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + method: + description: Method represents the HTTP request method, + which can be one of the standard HTTP methods like + "GET," "POST," "PUT," etc. Defaults to Get. + type: string + 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 + image: + description: Image defines the container image to run + the action. Cannot be updated. + type: string + matchingKey: + description: MatchingKey uses to select the target pod(s) + actually. If the selector is AnyReplica or AllReplicas, + the matchingKey will be ignored. If the selector is + RoleSelector, any replica which has the same role with + matchingKey will be chosen. Cannot be updated. + type: string + preCondition: + description: 'PreCondition defines the condition when + the action will be executed. - Immediately: The Action + is executed immediately after the Component object is + created, without guaranteeing the availability of the + Component and its underlying resources. only after the + action is successfully executed will the Component''s + state turn to ready. - RuntimeReady: The Action is executed + after the Component object is created and once all underlying + Runtimes are ready. only after the action is successfully + executed will the Component''s state turn to ready. + - ComponentReady: The Action is executed after the Component + object is created and once the Component is ready. the + execution process does not impact the state of the Component + and the Cluster. - ClusterReady: The Action is executed + after the Cluster object is created and once the Cluster + is ready. the execution process does not impact the + state of the Component and the Cluster. Cannot be updated.' + type: string + retryPolicy: + description: RetryPolicy defines the strategy for retrying + the action in case of failure. Cannot be updated. + properties: + maxRetries: + default: 0 + description: MaxRetries specifies the maximum number + of times the action should be retried. + type: integer + retryInterval: + default: 0 + description: RetryInterval specifies the interval + between retry attempts. + format: int64 + type: integer + type: object + targetPodSelector: + description: TargetPodSelector defines the way that how + to select the target Pod where the action will be performed, + if there may not have a target replica by default. Cannot + be updated. + enum: + - Any + - All + - Role + - Ordinal + type: string + timeoutSeconds:omitempty: + default: 0 + description: TimeoutSeconds defines the timeout duration + for the action in seconds. Cannot be updated. + format: int32 + type: integer + type: object + type: object + dataAssemble: + description: 'DataAssemble defines how to assemble data synchronized + from external before starting the service for a new replica. + This action is typically used when creating a new replica, such + as: - scale-out - rebuild - clone The data will be streamed + in via stdin. If any error occurs during the assembly process, + the action must be able to guarantee idempotence to allow for + retries from the beginning. Cannot be updated.' + properties: + builtinHandler: + description: builtinHandler specifies the builtin action handler + name to do the action. the BuiltinHandler within the same + ComponentLifecycleActions should be consistent. Details + can be queried through official documentation in the future. + use CustomHandler to define your own actions if none of + them satisfies the requirement. + type: string + customHandler: + description: customHandler defines the custom way to do action. + properties: + container: + description: Container defines the name of the container + within the target Pod where the action will be executed. + If specified, it must be one of container declared in + @Runtime. If not specified, the first container declared + in @Runtime will be used. Cannot be updated. + type: string + 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 previously 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. + Double $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" + will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + exec: + description: Exec specifies the action to take. Cannot + be updated. + properties: + args: + description: args is used to perform statements. + items: + type: string + type: array + 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 + http: + description: HTTP specifies the http request to perform. + Cannot be updated. + 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. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + method: + description: Method represents the HTTP request method, + which can be one of the standard HTTP methods like + "GET," "POST," "PUT," etc. Defaults to Get. + type: string + 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 + image: + description: Image defines the container image to run + the action. Cannot be updated. + type: string + matchingKey: + description: MatchingKey uses to select the target pod(s) + actually. If the selector is AnyReplica or AllReplicas, + the matchingKey will be ignored. If the selector is + RoleSelector, any replica which has the same role with + matchingKey will be chosen. Cannot be updated. + type: string + preCondition: + description: 'PreCondition defines the condition when + the action will be executed. - Immediately: The Action + is executed immediately after the Component object is + created, without guaranteeing the availability of the + Component and its underlying resources. only after the + action is successfully executed will the Component''s + state turn to ready. - RuntimeReady: The Action is executed + after the Component object is created and once all underlying + Runtimes are ready. only after the action is successfully + executed will the Component''s state turn to ready. + - ComponentReady: The Action is executed after the Component + object is created and once the Component is ready. the + execution process does not impact the state of the Component + and the Cluster. - ClusterReady: The Action is executed + after the Cluster object is created and once the Cluster + is ready. the execution process does not impact the + state of the Component and the Cluster. Cannot be updated.' + type: string + retryPolicy: + description: RetryPolicy defines the strategy for retrying + the action in case of failure. Cannot be updated. + properties: + maxRetries: + default: 0 + description: MaxRetries specifies the maximum number + of times the action should be retried. + type: integer + retryInterval: + default: 0 + description: RetryInterval specifies the interval + between retry attempts. + format: int64 + type: integer + type: object + targetPodSelector: + description: TargetPodSelector defines the way that how + to select the target Pod where the action will be performed, + if there may not have a target replica by default. Cannot + be updated. + enum: + - Any + - All + - Role + - Ordinal + type: string + timeoutSeconds:omitempty: + default: 0 + description: TimeoutSeconds defines the timeout duration + for the action in seconds. Cannot be updated. + format: int32 + type: integer + type: object + type: object + dataPopulate: + description: 'DataPopulate defines how to populate the data to + create new replicas. This action is typically used when a new + replica needs to be constructed, such as: - scale-out - rebuild + - clone It should write the valid data to stdout without including + any extraneous information. Cannot be updated.' + properties: + builtinHandler: + description: builtinHandler specifies the builtin action handler + name to do the action. the BuiltinHandler within the same + ComponentLifecycleActions should be consistent. Details + can be queried through official documentation in the future. + use CustomHandler to define your own actions if none of + them satisfies the requirement. + type: string + customHandler: + description: customHandler defines the custom way to do action. + properties: + container: + description: Container defines the name of the container + within the target Pod where the action will be executed. + If specified, it must be one of container declared in + @Runtime. If not specified, the first container declared + in @Runtime will be used. Cannot be updated. + type: string + 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 previously 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. + Double $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" + will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + exec: + description: Exec specifies the action to take. Cannot + be updated. + properties: + args: + description: args is used to perform statements. + items: + type: string + type: array + 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 + http: + description: HTTP specifies the http request to perform. + Cannot be updated. + 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. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + method: + description: Method represents the HTTP request method, + which can be one of the standard HTTP methods like + "GET," "POST," "PUT," etc. Defaults to Get. + type: string + 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 + image: + description: Image defines the container image to run + the action. Cannot be updated. + type: string + matchingKey: + description: MatchingKey uses to select the target pod(s) + actually. If the selector is AnyReplica or AllReplicas, + the matchingKey will be ignored. If the selector is + RoleSelector, any replica which has the same role with + matchingKey will be chosen. Cannot be updated. + type: string + preCondition: + description: 'PreCondition defines the condition when + the action will be executed. - Immediately: The Action + is executed immediately after the Component object is + created, without guaranteeing the availability of the + Component and its underlying resources. only after the + action is successfully executed will the Component''s + state turn to ready. - RuntimeReady: The Action is executed + after the Component object is created and once all underlying + Runtimes are ready. only after the action is successfully + executed will the Component''s state turn to ready. + - ComponentReady: The Action is executed after the Component + object is created and once the Component is ready. the + execution process does not impact the state of the Component + and the Cluster. - ClusterReady: The Action is executed + after the Cluster object is created and once the Cluster + is ready. the execution process does not impact the + state of the Component and the Cluster. Cannot be updated.' + type: string + retryPolicy: + description: RetryPolicy defines the strategy for retrying + the action in case of failure. Cannot be updated. + properties: + maxRetries: + default: 0 + description: MaxRetries specifies the maximum number + of times the action should be retried. + type: integer + retryInterval: + default: 0 + description: RetryInterval specifies the interval + between retry attempts. + format: int64 + type: integer + type: object + targetPodSelector: + description: TargetPodSelector defines the way that how + to select the target Pod where the action will be performed, + if there may not have a target replica by default. Cannot + be updated. + enum: + - Any + - All + - Role + - Ordinal + type: string + timeoutSeconds:omitempty: + default: 0 + description: TimeoutSeconds defines the timeout duration + for the action in seconds. Cannot be updated. + format: int32 + type: integer + type: object + type: object + memberJoin: + description: MemberJoin defines how to add a new replica to the + replication group. This action is typically invoked when a new + replica needs to be added, such as during scale-out. It may + involve updating configuration, notifying other members, and + ensuring data consistency. Cannot be updated. + properties: + builtinHandler: + description: builtinHandler specifies the builtin action handler + name to do the action. the BuiltinHandler within the same + ComponentLifecycleActions should be consistent. Details + can be queried through official documentation in the future. + use CustomHandler to define your own actions if none of + them satisfies the requirement. + type: string + customHandler: + description: customHandler defines the custom way to do action. + properties: + container: + description: Container defines the name of the container + within the target Pod where the action will be executed. + If specified, it must be one of container declared in + @Runtime. If not specified, the first container declared + in @Runtime will be used. Cannot be updated. + type: string + 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 previously 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. + Double $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" + will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + exec: + description: Exec specifies the action to take. Cannot + be updated. + properties: + args: + description: args is used to perform statements. + items: + type: string + type: array + 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 + http: + description: HTTP specifies the http request to perform. + Cannot be updated. + 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. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + method: + description: Method represents the HTTP request method, + which can be one of the standard HTTP methods like + "GET," "POST," "PUT," etc. Defaults to Get. + type: string + 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 + image: + description: Image defines the container image to run + the action. Cannot be updated. + type: string + matchingKey: + description: MatchingKey uses to select the target pod(s) + actually. If the selector is AnyReplica or AllReplicas, + the matchingKey will be ignored. If the selector is + RoleSelector, any replica which has the same role with + matchingKey will be chosen. Cannot be updated. + type: string + preCondition: + description: 'PreCondition defines the condition when + the action will be executed. - Immediately: The Action + is executed immediately after the Component object is + created, without guaranteeing the availability of the + Component and its underlying resources. only after the + action is successfully executed will the Component''s + state turn to ready. - RuntimeReady: The Action is executed + after the Component object is created and once all underlying + Runtimes are ready. only after the action is successfully + executed will the Component''s state turn to ready. + - ComponentReady: The Action is executed after the Component + object is created and once the Component is ready. the + execution process does not impact the state of the Component + and the Cluster. - ClusterReady: The Action is executed + after the Cluster object is created and once the Cluster + is ready. the execution process does not impact the + state of the Component and the Cluster. Cannot be updated.' + type: string + retryPolicy: + description: RetryPolicy defines the strategy for retrying + the action in case of failure. Cannot be updated. + properties: + maxRetries: + default: 0 + description: MaxRetries specifies the maximum number + of times the action should be retried. + type: integer + retryInterval: + default: 0 + description: RetryInterval specifies the interval + between retry attempts. + format: int64 + type: integer + type: object + targetPodSelector: + description: TargetPodSelector defines the way that how + to select the target Pod where the action will be performed, + if there may not have a target replica by default. Cannot + be updated. + enum: + - Any + - All + - Role + - Ordinal + type: string + timeoutSeconds:omitempty: + default: 0 + description: TimeoutSeconds defines the timeout duration + for the action in seconds. Cannot be updated. + format: int32 + type: integer + type: object + type: object + memberLeave: + description: MemberLeave defines how to remove a replica from + the replication group. This action is typically invoked when + a replica needs to be removed, such as during scale-in. It may + involve configuration updates and notifying other members about + the departure, but it is advisable to avoid performing data + migration within this action. Cannot be updated. + properties: + builtinHandler: + description: builtinHandler specifies the builtin action handler + name to do the action. the BuiltinHandler within the same + ComponentLifecycleActions should be consistent. Details + can be queried through official documentation in the future. + use CustomHandler to define your own actions if none of + them satisfies the requirement. + type: string + customHandler: + description: customHandler defines the custom way to do action. + properties: + container: + description: Container defines the name of the container + within the target Pod where the action will be executed. + If specified, it must be one of container declared in + @Runtime. If not specified, the first container declared + in @Runtime will be used. Cannot be updated. + type: string + 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 previously 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. + Double $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" + will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + exec: + description: Exec specifies the action to take. Cannot + be updated. + properties: + args: + description: args is used to perform statements. + items: + type: string + type: array + 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 + http: + description: HTTP specifies the http request to perform. + Cannot be updated. + 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. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + method: + description: Method represents the HTTP request method, + which can be one of the standard HTTP methods like + "GET," "POST," "PUT," etc. Defaults to Get. + type: string + 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 + image: + description: Image defines the container image to run + the action. Cannot be updated. + type: string + matchingKey: + description: MatchingKey uses to select the target pod(s) + actually. If the selector is AnyReplica or AllReplicas, + the matchingKey will be ignored. If the selector is + RoleSelector, any replica which has the same role with + matchingKey will be chosen. Cannot be updated. + type: string + preCondition: + description: 'PreCondition defines the condition when + the action will be executed. - Immediately: The Action + is executed immediately after the Component object is + created, without guaranteeing the availability of the + Component and its underlying resources. only after the + action is successfully executed will the Component''s + state turn to ready. - RuntimeReady: The Action is executed + after the Component object is created and once all underlying + Runtimes are ready. only after the action is successfully + executed will the Component''s state turn to ready. + - ComponentReady: The Action is executed after the Component + object is created and once the Component is ready. the + execution process does not impact the state of the Component + and the Cluster. - ClusterReady: The Action is executed + after the Cluster object is created and once the Cluster + is ready. the execution process does not impact the + state of the Component and the Cluster. Cannot be updated.' + type: string + retryPolicy: + description: RetryPolicy defines the strategy for retrying + the action in case of failure. Cannot be updated. + properties: + maxRetries: + default: 0 + description: MaxRetries specifies the maximum number + of times the action should be retried. + type: integer + retryInterval: + default: 0 + description: RetryInterval specifies the interval + between retry attempts. + format: int64 + type: integer + type: object + targetPodSelector: + description: TargetPodSelector defines the way that how + to select the target Pod where the action will be performed, + if there may not have a target replica by default. Cannot + be updated. + enum: + - Any + - All + - Role + - Ordinal + type: string + timeoutSeconds:omitempty: + default: 0 + description: TimeoutSeconds defines the timeout duration + for the action in seconds. Cannot be updated. + format: int32 + type: integer + type: object + type: object + postProvision: + description: 'PostProvision defines the actions to be executed + and the corresponding policy when a component is created. You + can define the preCondition for executing PostProvision using + Action.PreCondition. The default PostProvision action preCondition + is ComponentReady. The PostProvision Action will be executed + only once. Dedicated env vars for the action: - KB_CLUSTER_COMPONENT_LIST: + The list of all components in the cluster, joined by '','' (e.g., + "comp1,comp2"). - KB_CLUSTER_COMPONENT_POD_NAME_LIST: The list + of all pods name in this component, joined by '','' (e.g., "pod1,pod2"). + - KB_CLUSTER_COMPONENT_POD_IP_LIST: The list of pod IPs where + each pod resides in this component, corresponding one-to-one + with each pod in the KB_CLUSTER_COMPONENT_POD_NAME_LIST. joined + by '','' (e.g., "podIp1,podIp2"). - KB_CLUSTER_COMPONENT_POD_HOST_NAME_LIST: + The list of hostName where each pod resides in this component, + corresponding one-to-one with each pod in the KB_CLUSTER_COMPONENT_POD_NAME_LIST. + joined by '','' (e.g., "hostName1,hostName2"). - KB_CLUSTER_COMPONENT_POD_HOST_IP_LIST: + The list of host IPs where each pod resides in this component, + corresponding one-to-one with each pod in the KB_CLUSTER_COMPONENT_POD_NAME_LIST. + joined by '','' (e.g., "hostIp1,hostIp2"). Cannot be updated.' + properties: + builtinHandler: + description: builtinHandler specifies the builtin action handler + name to do the action. the BuiltinHandler within the same + ComponentLifecycleActions should be consistent. Details + can be queried through official documentation in the future. + use CustomHandler to define your own actions if none of + them satisfies the requirement. + type: string + customHandler: + description: customHandler defines the custom way to do action. + properties: + container: + description: Container defines the name of the container + within the target Pod where the action will be executed. + If specified, it must be one of container declared in + @Runtime. If not specified, the first container declared + in @Runtime will be used. Cannot be updated. + type: string + 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 previously 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. + Double $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" + will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + exec: + description: Exec specifies the action to take. Cannot + be updated. + properties: + args: + description: args is used to perform statements. + items: + type: string + type: array + 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 + http: + description: HTTP specifies the http request to perform. + Cannot be updated. + 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. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + method: + description: Method represents the HTTP request method, + which can be one of the standard HTTP methods like + "GET," "POST," "PUT," etc. Defaults to Get. + type: string + 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 + image: + description: Image defines the container image to run + the action. Cannot be updated. + type: string + matchingKey: + description: MatchingKey uses to select the target pod(s) + actually. If the selector is AnyReplica or AllReplicas, + the matchingKey will be ignored. If the selector is + RoleSelector, any replica which has the same role with + matchingKey will be chosen. Cannot be updated. + type: string + preCondition: + description: 'PreCondition defines the condition when + the action will be executed. - Immediately: The Action + is executed immediately after the Component object is + created, without guaranteeing the availability of the + Component and its underlying resources. only after the + action is successfully executed will the Component''s + state turn to ready. - RuntimeReady: The Action is executed + after the Component object is created and once all underlying + Runtimes are ready. only after the action is successfully + executed will the Component''s state turn to ready. + - ComponentReady: The Action is executed after the Component + object is created and once the Component is ready. the + execution process does not impact the state of the Component + and the Cluster. - ClusterReady: The Action is executed + after the Cluster object is created and once the Cluster + is ready. the execution process does not impact the + state of the Component and the Cluster. Cannot be updated.' + type: string + retryPolicy: + description: RetryPolicy defines the strategy for retrying + the action in case of failure. Cannot be updated. + properties: + maxRetries: + default: 0 + description: MaxRetries specifies the maximum number + of times the action should be retried. + type: integer + retryInterval: + default: 0 + description: RetryInterval specifies the interval + between retry attempts. + format: int64 + type: integer + type: object + targetPodSelector: + description: TargetPodSelector defines the way that how + to select the target Pod where the action will be performed, + if there may not have a target replica by default. Cannot + be updated. + enum: + - Any + - All + - Role + - Ordinal + type: string + timeoutSeconds:omitempty: + default: 0 + description: TimeoutSeconds defines the timeout duration + for the action in seconds. Cannot be updated. + format: int32 + type: integer + type: object + type: object + preTerminate: + description: PreTerminate defines the actions to be executed when + a component is terminated due to an API request. The PreTerminate + Action will be executed only once. Upon receiving a scale-down + command for the Component, it is executed immediately. Only + after the preTerminate action is successfully executed, the + destruction of the Component and its underlying resources proceeds. + Cannot be updated. + properties: + builtinHandler: + description: builtinHandler specifies the builtin action handler + name to do the action. the BuiltinHandler within the same + ComponentLifecycleActions should be consistent. Details + can be queried through official documentation in the future. + use CustomHandler to define your own actions if none of + them satisfies the requirement. + type: string + customHandler: + description: customHandler defines the custom way to do action. + properties: + container: + description: Container defines the name of the container + within the target Pod where the action will be executed. + If specified, it must be one of container declared in + @Runtime. If not specified, the first container declared + in @Runtime will be used. Cannot be updated. + type: string + 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 previously 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. + Double $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" + will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + exec: + description: Exec specifies the action to take. Cannot + be updated. + properties: + args: + description: args is used to perform statements. + items: + type: string + type: array + 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 + http: + description: HTTP specifies the http request to perform. + Cannot be updated. + 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. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + method: + description: Method represents the HTTP request method, + which can be one of the standard HTTP methods like + "GET," "POST," "PUT," etc. Defaults to Get. + type: string + 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 + image: + description: Image defines the container image to run + the action. Cannot be updated. + type: string + matchingKey: + description: MatchingKey uses to select the target pod(s) + actually. If the selector is AnyReplica or AllReplicas, + the matchingKey will be ignored. If the selector is + RoleSelector, any replica which has the same role with + matchingKey will be chosen. Cannot be updated. + type: string + preCondition: + description: 'PreCondition defines the condition when + the action will be executed. - Immediately: The Action + is executed immediately after the Component object is + created, without guaranteeing the availability of the + Component and its underlying resources. only after the + action is successfully executed will the Component''s + state turn to ready. - RuntimeReady: The Action is executed + after the Component object is created and once all underlying + Runtimes are ready. only after the action is successfully + executed will the Component''s state turn to ready. + - ComponentReady: The Action is executed after the Component + object is created and once the Component is ready. the + execution process does not impact the state of the Component + and the Cluster. - ClusterReady: The Action is executed + after the Cluster object is created and once the Cluster + is ready. the execution process does not impact the + state of the Component and the Cluster. Cannot be updated.' + type: string + retryPolicy: + description: RetryPolicy defines the strategy for retrying + the action in case of failure. Cannot be updated. + properties: + maxRetries: + default: 0 + description: MaxRetries specifies the maximum number + of times the action should be retried. + type: integer + retryInterval: + default: 0 + description: RetryInterval specifies the interval + between retry attempts. + format: int64 + type: integer + type: object + targetPodSelector: + description: TargetPodSelector defines the way that how + to select the target Pod where the action will be performed, + if there may not have a target replica by default. Cannot + be updated. + enum: + - Any + - All + - Role + - Ordinal + type: string + timeoutSeconds:omitempty: + default: 0 + description: TimeoutSeconds defines the timeout duration + for the action in seconds. Cannot be updated. + format: int32 + type: integer + type: object + type: object + readonly: + description: Readonly defines how to set a replica service as + read-only. This action is used to protect a replica in case + of volume space exhaustion or excessive traffic. Cannot be updated. + properties: + builtinHandler: + description: builtinHandler specifies the builtin action handler + name to do the action. the BuiltinHandler within the same + ComponentLifecycleActions should be consistent. Details + can be queried through official documentation in the future. + use CustomHandler to define your own actions if none of + them satisfies the requirement. + type: string + customHandler: + description: customHandler defines the custom way to do action. + properties: + container: + description: Container defines the name of the container + within the target Pod where the action will be executed. + If specified, it must be one of container declared in + @Runtime. If not specified, the first container declared + in @Runtime will be used. Cannot be updated. + type: string + 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 previously 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. + Double $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" + will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + exec: + description: Exec specifies the action to take. Cannot + be updated. + properties: + args: + description: args is used to perform statements. + items: + type: string + type: array + 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 + http: + description: HTTP specifies the http request to perform. + Cannot be updated. + 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. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + method: + description: Method represents the HTTP request method, + which can be one of the standard HTTP methods like + "GET," "POST," "PUT," etc. Defaults to Get. + type: string + 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 + image: + description: Image defines the container image to run + the action. Cannot be updated. + type: string + matchingKey: + description: MatchingKey uses to select the target pod(s) + actually. If the selector is AnyReplica or AllReplicas, + the matchingKey will be ignored. If the selector is + RoleSelector, any replica which has the same role with + matchingKey will be chosen. Cannot be updated. + type: string + preCondition: + description: 'PreCondition defines the condition when + the action will be executed. - Immediately: The Action + is executed immediately after the Component object is + created, without guaranteeing the availability of the + Component and its underlying resources. only after the + action is successfully executed will the Component''s + state turn to ready. - RuntimeReady: The Action is executed + after the Component object is created and once all underlying + Runtimes are ready. only after the action is successfully + executed will the Component''s state turn to ready. + - ComponentReady: The Action is executed after the Component + object is created and once the Component is ready. the + execution process does not impact the state of the Component + and the Cluster. - ClusterReady: The Action is executed + after the Cluster object is created and once the Cluster + is ready. the execution process does not impact the + state of the Component and the Cluster. Cannot be updated.' + type: string + retryPolicy: + description: RetryPolicy defines the strategy for retrying + the action in case of failure. Cannot be updated. + properties: + maxRetries: + default: 0 + description: MaxRetries specifies the maximum number + of times the action should be retried. + type: integer + retryInterval: + default: 0 + description: RetryInterval specifies the interval + between retry attempts. + format: int64 + type: integer + type: object + targetPodSelector: + description: TargetPodSelector defines the way that how + to select the target Pod where the action will be performed, + if there may not have a target replica by default. Cannot + be updated. + enum: + - Any + - All + - Role + - Ordinal + type: string + timeoutSeconds:omitempty: + default: 0 + description: TimeoutSeconds defines the timeout duration + for the action in seconds. Cannot be updated. + format: int32 + type: integer + type: object + type: object + readwrite: + description: Readwrite defines how to set a replica service as + read-write. Cannot be updated. + properties: + builtinHandler: + description: builtinHandler specifies the builtin action handler + name to do the action. the BuiltinHandler within the same + ComponentLifecycleActions should be consistent. Details + can be queried through official documentation in the future. + use CustomHandler to define your own actions if none of + them satisfies the requirement. + type: string + customHandler: + description: customHandler defines the custom way to do action. + properties: + container: + description: Container defines the name of the container + within the target Pod where the action will be executed. + If specified, it must be one of container declared in + @Runtime. If not specified, the first container declared + in @Runtime will be used. Cannot be updated. + type: string + 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 previously 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. + Double $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" + will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + exec: + description: Exec specifies the action to take. Cannot + be updated. + properties: + args: + description: args is used to perform statements. + items: + type: string + type: array + 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 + http: + description: HTTP specifies the http request to perform. + Cannot be updated. + 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. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + method: + description: Method represents the HTTP request method, + which can be one of the standard HTTP methods like + "GET," "POST," "PUT," etc. Defaults to Get. + type: string + 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 + image: + description: Image defines the container image to run + the action. Cannot be updated. + type: string + matchingKey: + description: MatchingKey uses to select the target pod(s) + actually. If the selector is AnyReplica or AllReplicas, + the matchingKey will be ignored. If the selector is + RoleSelector, any replica which has the same role with + matchingKey will be chosen. Cannot be updated. + type: string + preCondition: + description: 'PreCondition defines the condition when + the action will be executed. - Immediately: The Action + is executed immediately after the Component object is + created, without guaranteeing the availability of the + Component and its underlying resources. only after the + action is successfully executed will the Component''s + state turn to ready. - RuntimeReady: The Action is executed + after the Component object is created and once all underlying + Runtimes are ready. only after the action is successfully + executed will the Component''s state turn to ready. + - ComponentReady: The Action is executed after the Component + object is created and once the Component is ready. the + execution process does not impact the state of the Component + and the Cluster. - ClusterReady: The Action is executed + after the Cluster object is created and once the Cluster + is ready. the execution process does not impact the + state of the Component and the Cluster. Cannot be updated.' + type: string + retryPolicy: + description: RetryPolicy defines the strategy for retrying + the action in case of failure. Cannot be updated. + properties: + maxRetries: + default: 0 + description: MaxRetries specifies the maximum number + of times the action should be retried. + type: integer + retryInterval: + default: 0 + description: RetryInterval specifies the interval + between retry attempts. + format: int64 + type: integer + type: object + targetPodSelector: + description: TargetPodSelector defines the way that how + to select the target Pod where the action will be performed, + if there may not have a target replica by default. Cannot + be updated. + enum: + - Any + - All + - Role + - Ordinal + type: string + timeoutSeconds:omitempty: + default: 0 + description: TimeoutSeconds defines the timeout duration + for the action in seconds. Cannot be updated. + format: int32 + type: integer + type: object + type: object + reconfigure: + description: Reconfigure defines how to notify the replica service + that there is a configuration update. Cannot be updated. + properties: + builtinHandler: + description: builtinHandler specifies the builtin action handler + name to do the action. the BuiltinHandler within the same + ComponentLifecycleActions should be consistent. Details + can be queried through official documentation in the future. + use CustomHandler to define your own actions if none of + them satisfies the requirement. + type: string + customHandler: + description: customHandler defines the custom way to do action. + properties: + container: + description: Container defines the name of the container + within the target Pod where the action will be executed. + If specified, it must be one of container declared in + @Runtime. If not specified, the first container declared + in @Runtime will be used. Cannot be updated. + type: string + 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 previously 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. + Double $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" + will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + exec: + description: Exec specifies the action to take. Cannot + be updated. + properties: + args: + description: args is used to perform statements. + items: + type: string + type: array + 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 + http: + description: HTTP specifies the http request to perform. + Cannot be updated. + 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. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + method: + description: Method represents the HTTP request method, + which can be one of the standard HTTP methods like + "GET," "POST," "PUT," etc. Defaults to Get. + type: string + 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 + image: + description: Image defines the container image to run + the action. Cannot be updated. + type: string + matchingKey: + description: MatchingKey uses to select the target pod(s) + actually. If the selector is AnyReplica or AllReplicas, + the matchingKey will be ignored. If the selector is + RoleSelector, any replica which has the same role with + matchingKey will be chosen. Cannot be updated. + type: string + preCondition: + description: 'PreCondition defines the condition when + the action will be executed. - Immediately: The Action + is executed immediately after the Component object is + created, without guaranteeing the availability of the + Component and its underlying resources. only after the + action is successfully executed will the Component''s + state turn to ready. - RuntimeReady: The Action is executed + after the Component object is created and once all underlying + Runtimes are ready. only after the action is successfully + executed will the Component''s state turn to ready. + - ComponentReady: The Action is executed after the Component + object is created and once the Component is ready. the + execution process does not impact the state of the Component + and the Cluster. - ClusterReady: The Action is executed + after the Cluster object is created and once the Cluster + is ready. the execution process does not impact the + state of the Component and the Cluster. Cannot be updated.' + type: string + retryPolicy: + description: RetryPolicy defines the strategy for retrying + the action in case of failure. Cannot be updated. + properties: + maxRetries: + default: 0 + description: MaxRetries specifies the maximum number + of times the action should be retried. + type: integer + retryInterval: + default: 0 + description: RetryInterval specifies the interval + between retry attempts. + format: int64 + type: integer + type: object + targetPodSelector: + description: TargetPodSelector defines the way that how + to select the target Pod where the action will be performed, + if there may not have a target replica by default. Cannot + be updated. + enum: + - Any + - All + - Role + - Ordinal + type: string + timeoutSeconds:omitempty: + default: 0 + description: TimeoutSeconds defines the timeout duration + for the action in seconds. Cannot be updated. + format: int32 + type: integer + type: object + type: object + roleProbe: + description: RoleProbe defines how to probe the role of replicas. + Cannot be updated. + properties: + builtinHandler: + description: builtinHandler specifies the builtin action handler + name to do the action. the BuiltinHandler within the same + ComponentLifecycleActions should be consistent. Details + can be queried through official documentation in the future. + use CustomHandler to define your own actions if none of + them satisfies the requirement. + type: string + customHandler: + description: customHandler defines the custom way to do action. + properties: + container: + description: Container defines the name of the container + within the target Pod where the action will be executed. + If specified, it must be one of container declared in + @Runtime. If not specified, the first container declared + in @Runtime will be used. Cannot be updated. + type: string + 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 previously 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. + Double $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" + will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + exec: + description: Exec specifies the action to take. Cannot + be updated. + properties: + args: + description: args is used to perform statements. + items: + type: string + type: array + 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 + http: + description: HTTP specifies the http request to perform. + Cannot be updated. + 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. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + method: + description: Method represents the HTTP request method, + which can be one of the standard HTTP methods like + "GET," "POST," "PUT," etc. Defaults to Get. + type: string + 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 + image: + description: Image defines the container image to run + the action. Cannot be updated. + type: string + matchingKey: + description: MatchingKey uses to select the target pod(s) + actually. If the selector is AnyReplica or AllReplicas, + the matchingKey will be ignored. If the selector is + RoleSelector, any replica which has the same role with + matchingKey will be chosen. Cannot be updated. + type: string + preCondition: + description: 'PreCondition defines the condition when + the action will be executed. - Immediately: The Action + is executed immediately after the Component object is + created, without guaranteeing the availability of the + Component and its underlying resources. only after the + action is successfully executed will the Component''s + state turn to ready. - RuntimeReady: The Action is executed + after the Component object is created and once all underlying + Runtimes are ready. only after the action is successfully + executed will the Component''s state turn to ready. + - ComponentReady: The Action is executed after the Component + object is created and once the Component is ready. the + execution process does not impact the state of the Component + and the Cluster. - ClusterReady: The Action is executed + after the Cluster object is created and once the Cluster + is ready. the execution process does not impact the + state of the Component and the Cluster. Cannot be updated.' + type: string + retryPolicy: + description: RetryPolicy defines the strategy for retrying + the action in case of failure. Cannot be updated. + properties: + maxRetries: + default: 0 + description: MaxRetries specifies the maximum number + of times the action should be retried. + type: integer + retryInterval: + default: 0 + description: RetryInterval specifies the interval + between retry attempts. + format: int64 + type: integer + type: object + targetPodSelector: + description: TargetPodSelector defines the way that how + to select the target Pod where the action will be performed, + if there may not have a target replica by default. Cannot + be updated. + enum: + - Any + - All + - Role + - Ordinal + type: string + timeoutSeconds:omitempty: + default: 0 + description: TimeoutSeconds defines the timeout duration + for the action in seconds. Cannot be updated. + format: int32 + type: integer + 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 + 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 + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs to + terminate gracefully upon probe failure. The grace period + is the duration in seconds after the processes running in + the pod are sent a termination signal and the time when + the processes are forcibly halted with a kill signal. Set + this value longer than the expected cleanup time for your + process. If this value is nil, the pod's terminationGracePeriodSeconds + will be used. Otherwise, this value overrides the value + provided by the pod spec. Value must be non-negative integer. + The value zero indicates stop immediately via the kill signal + (no opportunity to shut down). This is a beta field and + requires enabling ProbeTerminationGracePeriod feature gate. + Minimum value is 1. spec.terminationGracePeriodSeconds is + used if unset. + format: int64 + type: integer + 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 + switchover: + description: 'Switchover defines how to proactively switch the + current leader to a new replica to minimize the impact on availability. + This action is typically invoked when the leader is about to + become unavailable due to events, such as: - switchover - stop + - restart - scale-in Dedicated env vars for the action: - KB_SWITCHOVER_CANDIDATE_NAME: + The name of the new candidate replica''s Pod. It may be empty. + - KB_SWITCHOVER_CANDIDATE_FQDN: The FQDN of the new candidate + replica. It may be empty. - KB_LEADER_POD_IP: The IP address + of the original leader''s Pod before switchover. - KB_LEADER_POD_NAME: + The name of the original leader''s Pod before switchover. - + KB_LEADER_POD_FQDN: The FQDN of the original leader''s Pod before + switchover. The env vars with following prefix are deprecated + and will be removed in the future: - KB_REPLICATION_PRIMARY_POD_: + The prefix of the environment variables of the original primary''s + Pod before switchover. - KB_CONSENSUS_LEADER_POD_: The prefix + of the environment variables of the original leader''s Pod before + switchover. Cannot be updated.' + properties: + scriptSpecSelectors: + description: scriptSpecSelectors defines the selector of the + scriptSpecs that need to be referenced. Once ScriptSpecSelectors + is defined, the scripts defined in scripts can be referenced + in the Action. + items: + properties: + name: + description: ScriptSpec name of the referent, refer + to componentDefs[x].scriptSpecs[y].Name. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + required: + - name + type: object + type: array + withCandidate: + description: withCandidate corresponds to the switchover of + the specified candidate primary or leader instance. Currently, + only Action.Exec is supported, Action.HTTP is not supported. + properties: + container: + description: Container defines the name of the container + within the target Pod where the action will be executed. + If specified, it must be one of container declared in + @Runtime. If not specified, the first container declared + in @Runtime will be used. Cannot be updated. + type: string + 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 previously 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. + Double $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" + will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + exec: + description: Exec specifies the action to take. Cannot + be updated. + properties: + args: + description: args is used to perform statements. + items: + type: string + type: array + 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 + http: + description: HTTP specifies the http request to perform. + Cannot be updated. + 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. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + method: + description: Method represents the HTTP request method, + which can be one of the standard HTTP methods like + "GET," "POST," "PUT," etc. Defaults to Get. + type: string + 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 + image: + description: Image defines the container image to run + the action. Cannot be updated. + type: string + matchingKey: + description: MatchingKey uses to select the target pod(s) + actually. If the selector is AnyReplica or AllReplicas, + the matchingKey will be ignored. If the selector is + RoleSelector, any replica which has the same role with + matchingKey will be chosen. Cannot be updated. + type: string + preCondition: + description: 'PreCondition defines the condition when + the action will be executed. - Immediately: The Action + is executed immediately after the Component object is + created, without guaranteeing the availability of the + Component and its underlying resources. only after the + action is successfully executed will the Component''s + state turn to ready. - RuntimeReady: The Action is executed + after the Component object is created and once all underlying + Runtimes are ready. only after the action is successfully + executed will the Component''s state turn to ready. + - ComponentReady: The Action is executed after the Component + object is created and once the Component is ready. the + execution process does not impact the state of the Component + and the Cluster. - ClusterReady: The Action is executed + after the Cluster object is created and once the Cluster + is ready. the execution process does not impact the + state of the Component and the Cluster. Cannot be updated.' + type: string + retryPolicy: + description: RetryPolicy defines the strategy for retrying + the action in case of failure. Cannot be updated. + properties: + maxRetries: + default: 0 + description: MaxRetries specifies the maximum number + of times the action should be retried. + type: integer + retryInterval: + default: 0 + description: RetryInterval specifies the interval + between retry attempts. + format: int64 + type: integer + type: object + targetPodSelector: + description: TargetPodSelector defines the way that how + to select the target Pod where the action will be performed, + if there may not have a target replica by default. Cannot + be updated. + enum: + - Any + - All + - Role + - Ordinal + type: string + timeoutSeconds:omitempty: + default: 0 + description: TimeoutSeconds defines the timeout duration + for the action in seconds. Cannot be updated. + format: int32 + type: integer + type: object + withoutCandidate: + description: withoutCandidate corresponds to a switchover + that does not specify a candidate primary or leader instance. + Currently, only Action.Exec is supported, Action.HTTP is + not supported. + properties: + container: + description: Container defines the name of the container + within the target Pod where the action will be executed. + If specified, it must be one of container declared in + @Runtime. If not specified, the first container declared + in @Runtime will be used. Cannot be updated. + type: string + 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 previously 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. + Double $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" + will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + exec: + description: Exec specifies the action to take. Cannot + be updated. + properties: + args: + description: args is used to perform statements. + items: + type: string + type: array + 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 + http: + description: HTTP specifies the http request to perform. + Cannot be updated. + 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. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + method: + description: Method represents the HTTP request method, + which can be one of the standard HTTP methods like + "GET," "POST," "PUT," etc. Defaults to Get. + type: string + 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 + image: + description: Image defines the container image to run + the action. Cannot be updated. + type: string + matchingKey: + description: MatchingKey uses to select the target pod(s) + actually. If the selector is AnyReplica or AllReplicas, + the matchingKey will be ignored. If the selector is + RoleSelector, any replica which has the same role with + matchingKey will be chosen. Cannot be updated. + type: string + preCondition: + description: 'PreCondition defines the condition when + the action will be executed. - Immediately: The Action + is executed immediately after the Component object is + created, without guaranteeing the availability of the + Component and its underlying resources. only after the + action is successfully executed will the Component''s + state turn to ready. - RuntimeReady: The Action is executed + after the Component object is created and once all underlying + Runtimes are ready. only after the action is successfully + executed will the Component''s state turn to ready. + - ComponentReady: The Action is executed after the Component + object is created and once the Component is ready. the + execution process does not impact the state of the Component + and the Cluster. - ClusterReady: The Action is executed + after the Cluster object is created and once the Cluster + is ready. the execution process does not impact the + state of the Component and the Cluster. Cannot be updated.' + type: string + retryPolicy: + description: RetryPolicy defines the strategy for retrying + the action in case of failure. Cannot be updated. + properties: + maxRetries: + default: 0 + description: MaxRetries specifies the maximum number + of times the action should be retried. + type: integer + retryInterval: + default: 0 + description: RetryInterval specifies the interval + between retry attempts. + format: int64 + type: integer + type: object + targetPodSelector: + description: TargetPodSelector defines the way that how + to select the target Pod where the action will be performed, + if there may not have a target replica by default. Cannot + be updated. + enum: + - Any + - All + - Role + - Ordinal + type: string + timeoutSeconds:omitempty: + default: 0 + description: TimeoutSeconds defines the timeout duration + for the action in seconds. Cannot be updated. + format: int32 + type: integer + type: object + type: object + type: object + logConfigs: + description: LogConfigs is detail log file config which provided by + provider. Cannot be updated. + items: + properties: + filePathPattern: + description: filePathPattern log file path pattern which indicate + how to find this file corresponding to variable (log path) + in database kernel. please don't set this casually. + maxLength: 4096 + type: string + name: + description: name log type name, such as slow for MySQL slow + log file. + maxLength: 128 + type: string + required: + - filePathPattern + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + monitor: + description: Monitor is monitoring config which provided by provider. + Cannot be updated. + properties: + builtIn: + default: false + description: builtIn is a switch to enable KubeBlocks builtIn + monitoring. If BuiltIn is set to true, monitor metrics will + be scraped automatically. If BuiltIn is set to false, the provider + should set ExporterConfig and Sidecar container own. + type: boolean + exporterConfig: + description: exporterConfig provided by provider, which specify + necessary information to Time Series Database. exporterConfig + is valid when builtIn is false. + properties: + scrapePath: + default: /metrics + description: scrapePath is exporter url path for Time Series + Database to scrape metrics. + maxLength: 128 + type: string + scrapePort: + anyOf: + - type: integer + - type: string + description: scrapePort is exporter port for Time Series Database + to scrape metrics. + x-kubernetes-int-or-string: true + required: + - scrapePort + type: object + type: object + policyRules: + description: PolicyRules defines the namespaced policy rules required + by the component. If any rule application fails (e.g., due to lack + of permissions), the provisioning of the component instance will + also fail. Cannot be updated. + items: + description: PolicyRule holds information that describes a policy + rule, but does not contain information about who the rule applies + to or which namespace the rule applies to. + properties: + apiGroups: + description: APIGroups is the name of the APIGroup that contains + the resources. If multiple API groups are specified, any + action requested against one of the enumerated resources in + any API group will be allowed. "" represents the core API + group and "*" represents all API groups. + items: + type: string + type: array + nonResourceURLs: + description: NonResourceURLs is a set of partial urls that a + user should have access to. *s are allowed, but only as the + full, final step in the path Since non-resource URLs are not + namespaced, this field is only applicable for ClusterRoles + referenced from a ClusterRoleBinding. Rules can either apply + to API resources (such as "pods" or "secrets") or non-resource + URL paths (such as "/api"), but not both. + items: + type: string + type: array + resourceNames: + description: ResourceNames is an optional white list of names + that the rule applies to. An empty set means that everything + is allowed. + items: + type: string + type: array + resources: + description: Resources is a list of resources this rule applies + to. '*' represents all resources. + items: + type: string + type: array + verbs: + description: Verbs is a list of Verbs that apply to ALL the + ResourceKinds contained in this rule. '*' represents all verbs. + items: + type: string + type: array + required: + - verbs + type: object + type: array + provider: + description: Provider is the name of the component provider. + maxLength: 32 + type: string + replicasLimit: + description: ReplicasLimit defines the limit of valid replicas supported. + Cannot be updated. + properties: + maxReplicas: + description: The maximum limit of replicas. + format: int32 + type: integer + minReplicas: + description: The minimum limit of replicas. + format: int32 + type: integer + required: + - maxReplicas + - minReplicas + type: object + x-kubernetes-validations: + - message: the minimum and maximum limit of replicas should be in + the range of [0, 128] + rule: self.minReplicas >= 0 && self.maxReplicas <= 128 + - message: the minimum replicas limit should be no greater than the + maximum + rule: self.minReplicas <= self.maxReplicas + roleArbitrator: + default: External + description: RoleArbitrator defines the strategy for electing the + component's active role. Cannot be updated. + enum: + - External + - Lorry + type: string + roles: + description: Roles defines all the roles that the component can assume. + Cannot be updated. + items: + description: ReplicaRole represents a role that can be assumed by + a component instance. + properties: + name: + description: Name of the role. It will apply to "apps.kubeblocks.io/role" + object label value. Cannot be updated. + maxLength: 32 + pattern: ^.*[^\s]+.*$ + type: string + serviceable: + default: false + description: Serviceable indicates whether a replica with this + role can provide services. Cannot be updated. + type: boolean + votable: + default: false + description: Votable indicates whether a replica with this role + is allowed to vote. Cannot be updated. + type: boolean + writable: + default: false + description: Writable indicates whether a replica with this + role is allowed to write data. Cannot be updated. + type: boolean + required: + - name + type: object + type: array + runtime: + description: 'Runtime defines primarily runtime information for the + component, including: - Init containers - Containers - Image - Commands + - Args - Envs - Mounts - Ports - Security context - Probes - Lifecycle + - Volumes CPU and memory resource limits, as well as scheduling + settings (affinity, toleration, priority), should not be configured + within this structure. Cannot be updated.' + properties: + activeDeadlineSeconds: + description: Optional duration in seconds the pod may be active + on the node relative to StartTime before the system will actively + try to mark it failed and kill associated containers. Value + must be a positive integer. + format: int64 + type: integer + affinity: + description: If specified, the pod's scheduling constraints + properties: + nodeAffinity: + description: Describes node affinity scheduling rules for + the pod. + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule pods + to nodes that satisfy the affinity expressions specified + by this field, but it may choose a node that violates + one or more of the expressions. The node that is most + preferred is the one with the greatest sum of weights, + i.e. for each node that meets all of the scheduling + requirements (resource request, requiredDuringScheduling + affinity expressions, etc.), compute a sum by iterating + through the elements of this field and adding "weight" + to the sum if the node matches the corresponding matchExpressions; + the node(s) with the highest sum are the most preferred. + items: + description: An empty preferred scheduling term matches + all objects with implicit weight 0 (i.e. it's a no-op). + A null preferred scheduling term matches no objects + (i.e. is also a no-op). + properties: + preference: + description: A node selector term, associated with + the corresponding weight. + properties: + matchExpressions: + description: A list of node selector requirements + by node's labels. + items: + description: A node selector requirement is + a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators + are In, NotIn, Exists, DoesNotExist. + Gt, and Lt. + type: string + values: + description: 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. If the + operator is Gt or Lt, the values array + must have a single element, which will + be interpreted as an integer. This array + is replaced during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + description: A list of node selector requirements + by node's fields. + items: + description: A node selector requirement is + a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators + are In, NotIn, Exists, DoesNotExist. + Gt, and Lt. + type: string + values: + description: 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. If the + operator is Gt or Lt, the values array + must have a single element, which will + be interpreted as an integer. This array + is replaced during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + x-kubernetes-map-type: atomic + weight: + description: Weight associated with matching the + corresponding nodeSelectorTerm, in the range 1-100. + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the affinity requirements specified by + this field are not met at scheduling time, the pod will + not be scheduled onto the node. If the affinity requirements + specified by this field cease to be met at some point + during pod execution (e.g. due to an update), the system + may or may not try to eventually evict the pod from + its node. + properties: + nodeSelectorTerms: + description: Required. A list of node selector terms. + The terms are ORed. + items: + description: A null or empty node selector term + matches no objects. The requirements of them are + ANDed. The TopologySelectorTerm type implements + a subset of the NodeSelectorTerm. + properties: + matchExpressions: + description: A list of node selector requirements + by node's labels. + items: + description: A node selector requirement is + a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators + are In, NotIn, Exists, DoesNotExist. + Gt, and Lt. + type: string + values: + description: 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. If the + operator is Gt or Lt, the values array + must have a single element, which will + be interpreted as an integer. This array + is replaced during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + description: A list of node selector requirements + by node's fields. + items: + description: A node selector requirement is + a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators + are In, NotIn, Exists, DoesNotExist. + Gt, and Lt. + type: string + values: + description: 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. If the + operator is Gt or Lt, the values array + must have a single element, which will + be interpreted as an integer. This array + is replaced during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + x-kubernetes-map-type: atomic + type: array + required: + - nodeSelectorTerms + type: object + x-kubernetes-map-type: atomic + type: object + podAffinity: + description: Describes pod affinity scheduling rules (e.g. + co-locate this pod in the same node, zone, etc. as some + other pod(s)). + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule pods + to nodes that satisfy the affinity expressions specified + by this field, but it may choose a node that violates + one or more of the expressions. The node that is most + preferred is the one with the greatest sum of weights, + i.e. for each node that meets all of the scheduling + requirements (resource request, requiredDuringScheduling + affinity expressions, etc.), compute a sum by iterating + through the elements of this field and adding "weight" + to the sum if the node has pods which matches the corresponding + podAffinityTerm; the node(s) with the highest sum are + the most preferred. + items: + description: The weights of all of the matched WeightedPodAffinityTerm + fields are added per-node to find the most preferred + node(s) + properties: + podAffinityTerm: + description: Required. A pod affinity term, associated + with the corresponding weight. + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The requirements + are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied + to the union of the namespaces selected by + this field and the ones listed in the namespaces + field. null selector and null or empty namespaces + list means "this pod's namespace". An empty + selector ({}) matches all namespaces. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The requirements + are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static list + of namespace names that the term applies to. + The term is applied to the union of the namespaces + listed in this field and the ones selected + by namespaceSelector. null or empty namespaces + list and null namespaceSelector means "this + pod's namespace". + items: + type: string + type: array + topologyKey: + description: This pod should be co-located (affinity) + or not co-located (anti-affinity) with the + pods matching the labelSelector in the specified + namespaces, where co-located is defined as + running on a node whose value of the label + with key topologyKey matches that of any node + on which any of the selected pods is running. + Empty topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + weight: + description: weight associated with matching the + corresponding podAffinityTerm, in the range 1-100. + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the affinity requirements specified by + this field are not met at scheduling time, the pod will + not be scheduled onto the node. If the affinity requirements + specified by this field cease to be met at some point + during pod execution (e.g. due to a pod label update), + the system may or may not try to eventually evict the + pod from its node. When there are multiple elements, + the lists of nodes corresponding to each podAffinityTerm + are intersected, i.e. all terms must be satisfied. + items: + description: Defines a set of pods (namely those matching + the labelSelector relative to the given namespace(s)) + that this pod should be co-located (affinity) or not + co-located (anti-affinity) with, where co-located + is defined as running on a node whose value of the + label with key matches that of any node + on which a pod of the set of pods is running + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied + to the union of the namespaces selected by this + field and the ones listed in the namespaces field. + null selector and null or empty namespaces list + means "this pod's namespace". An empty selector + ({}) matches all namespaces. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static list + of namespace names that the term applies to. The + term is applied to the union of the namespaces + listed in this field and the ones selected by + namespaceSelector. null or empty namespaces list + and null namespaceSelector means "this pod's namespace". + items: + type: string + type: array + topologyKey: + description: This pod should be co-located (affinity) + or not co-located (anti-affinity) with the pods + matching the labelSelector in the specified namespaces, + where co-located is defined as running on a node + whose value of the label with key topologyKey + matches that of any node on which any of the selected + pods is running. Empty topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + type: array + type: object + podAntiAffinity: + description: Describes pod anti-affinity scheduling rules + (e.g. avoid putting this pod in the same node, zone, etc. + as some other pod(s)). + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule pods + to nodes that satisfy the anti-affinity expressions + specified by this field, but it may choose a node that + violates one or more of the expressions. The node that + is most preferred is the one with the greatest sum of + weights, i.e. for each node that meets all of the scheduling + requirements (resource request, requiredDuringScheduling + anti-affinity expressions, etc.), compute a sum by iterating + through the elements of this field and adding "weight" + to the sum if the node has pods which matches the corresponding + podAffinityTerm; the node(s) with the highest sum are + the most preferred. + items: + description: The weights of all of the matched WeightedPodAffinityTerm + fields are added per-node to find the most preferred + node(s) + properties: + podAffinityTerm: + description: Required. A pod affinity term, associated + with the corresponding weight. + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The requirements + are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied + to the union of the namespaces selected by + this field and the ones listed in the namespaces + field. null selector and null or empty namespaces + list means "this pod's namespace". An empty + selector ({}) matches all namespaces. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The requirements + are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static list + of namespace names that the term applies to. + The term is applied to the union of the namespaces + listed in this field and the ones selected + by namespaceSelector. null or empty namespaces + list and null namespaceSelector means "this + pod's namespace". + items: + type: string + type: array + topologyKey: + description: This pod should be co-located (affinity) + or not co-located (anti-affinity) with the + pods matching the labelSelector in the specified + namespaces, where co-located is defined as + running on a node whose value of the label + with key topologyKey matches that of any node + on which any of the selected pods is running. + Empty topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + weight: + description: weight associated with matching the + corresponding podAffinityTerm, in the range 1-100. + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the anti-affinity requirements specified + by this field are not met at scheduling time, the pod + will not be scheduled onto the node. If the anti-affinity + requirements specified by this field cease to be met + at some point during pod execution (e.g. due to a pod + label update), the system may or may not try to eventually + evict the pod from its node. When there are multiple + elements, the lists of nodes corresponding to each podAffinityTerm + are intersected, i.e. all terms must be satisfied. + items: + description: Defines a set of pods (namely those matching + the labelSelector relative to the given namespace(s)) + that this pod should be co-located (affinity) or not + co-located (anti-affinity) with, where co-located + is defined as running on a node whose value of the + label with key matches that of any node + on which a pod of the set of pods is running + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied + to the union of the namespaces selected by this + field and the ones listed in the namespaces field. + null selector and null or empty namespaces list + means "this pod's namespace". An empty selector + ({}) matches all namespaces. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static list + of namespace names that the term applies to. The + term is applied to the union of the namespaces + listed in this field and the ones selected by + namespaceSelector. null or empty namespaces list + and null namespaceSelector means "this pod's namespace". + items: + type: string + type: array + topologyKey: + description: This pod should be co-located (affinity) + or not co-located (anti-affinity) with the pods + matching the labelSelector in the specified namespaces, + where co-located is defined as running on a node + whose value of the label with key topologyKey + matches that of any node on which any of the selected + pods is running. Empty topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + type: array + type: object + type: object + automountServiceAccountToken: + description: AutomountServiceAccountToken indicates whether a + service account token should be automatically mounted. + type: boolean + containers: + description: List of containers belonging to the pod. Containers + cannot currently be added or removed. There must be at least + one container in a Pod. Cannot be updated. + items: + description: A single application container that you want to + run within a pod. + properties: + args: + description: 'Arguments to the entrypoint. The container + image''s CMD is used if this is not provided. Variable + references $(VAR_NAME) are expanded using the container''s + environment. If a variable cannot be resolved, the reference + in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) + syntax: i.e. "$$(VAR_NAME)" will produce the string literal + "$(VAR_NAME)". Escaped references will never be expanded, + regardless of whether the variable exists or not. Cannot + be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + command: + description: 'Entrypoint array. Not executed within a shell. + The container image''s ENTRYPOINT is used if this is not + provided. Variable references $(VAR_NAME) are expanded + using the container''s environment. If a variable cannot + be resolved, the reference in the input string will be + unchanged. Double $$ are reduced to a single $, which + allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" + will produce the string literal "$(VAR_NAME)". Escaped + references will never be expanded, regardless of whether + the variable exists or not. Cannot be updated. More info: + https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + 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 previously 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. + Double $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" + will produce the string literal "$(VAR_NAME)". Escaped + references will never be expanded, regardless of + whether the variable exists or not. 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + type: object + type: array + image: + description: 'Container 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: 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. This + will be canonicalized upon output, so + case-variant names will be understood + as the same header. + 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: Deprecated. TCPSocket is NOT supported + as a LifecycleHandler and kept for the backward + compatibility. There are no validation of this + field and lifecycle hooks will fail in runtime + when tcp handler is specified. + 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 Pod''s termination + grace period countdown begins before the PreStop hook + is executed. Regardless of the outcome of the handler, + the container will eventually terminate within the + Pod''s termination grace period (unless delayed by + finalizers). 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: 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. This + will be canonicalized upon output, so + case-variant names will be understood + as the same header. + 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: Deprecated. TCPSocket is NOT supported + as a LifecycleHandler and kept for the backward + compatibility. There are no validation of this + field and lifecycle hooks will fail in runtime + when tcp handler is specified. + 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: 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 + grpc: + description: GRPC specifies an action involving a GRPC + port. + properties: + port: + description: Port number of the gRPC service. Number + must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service + to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default behavior + is defined by gRPC." + type: string + required: + - port + 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. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + 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. + 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 + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs + to terminate gracefully upon probe failure. The grace + period is the duration in seconds after the processes + running in the pod are sent a termination signal and + the time when the processes are forcibly halted with + a kill signal. Set this value longer than the expected + cleanup time for your process. If this value is nil, + the pod's terminationGracePeriodSeconds will be used. + Otherwise, this value overrides the value provided + by the pod spec. Value must be non-negative integer. + The value zero indicates stop immediately via the + kill signal (no opportunity to shut down). This is + a beta field and requires enabling ProbeTerminationGracePeriod + feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds + is used if unset. + format: int64 + type: integer + 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. + 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. Modifying this array with strategic + merge patch may corrupt the data. For more information + See https://github.com/kubernetes/kubernetes/issues/108255. + 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: 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 + grpc: + description: GRPC specifies an action involving a GRPC + port. + properties: + port: + description: Port number of the gRPC service. Number + must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service + to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default behavior + is defined by gRPC." + type: string + required: + - port + 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. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + 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. + 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 + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs + to terminate gracefully upon probe failure. The grace + period is the duration in seconds after the processes + running in the pod are sent a termination signal and + the time when the processes are forcibly halted with + a kill signal. Set this value longer than the expected + cleanup time for your process. If this value is nil, + the pod's terminationGracePeriodSeconds will be used. + Otherwise, this value overrides the value provided + by the pod spec. Value must be non-negative integer. + The value zero indicates stop immediately via the + kill signal (no opportunity to shut down). This is + a beta field and requires enabling ProbeTerminationGracePeriod + feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds + is used if unset. + format: int64 + type: integer + 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 + resizePolicy: + description: Resources resize policy for the container. + items: + description: ContainerResizePolicy represents resource + resize policy for the container. + properties: + resourceName: + description: 'Name of the resource to which this resource + resize policy applies. Supported values: cpu, memory.' + type: string + restartPolicy: + description: Restart policy to apply when specified + resource is resized. If not specified, it defaults + to NotRequired. + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + description: 'Compute Resources required by this container. + Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the + DynamicResourceAllocation feature gate. \n This field + is immutable. It can only be set for containers." + items: + description: ResourceClaim references one entry in + PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry + in pod.spec.resourceClaims of the Pod where + this field is used. It makes that resource available + inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + 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-resources-containers/' + 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. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + restartPolicy: + description: 'RestartPolicy defines the restart behavior + of individual containers in a pod. This field may only + be set for init containers, and the only allowed value + is "Always". For non-init containers or when this field + is not specified, the restart behavior is defined by the + Pod''s restart policy and the container type. Setting + the RestartPolicy as "Always" for the init container will + have the following effect: this init container will be + continually restarted on exit until all regular containers + have terminated. Once all regular containers have completed, + all init containers with restartPolicy "Always" will be + shut down. This lifecycle differs from normal init containers + and is often referred to as a "sidecar" container. Although + this init container still starts in the init container + sequence, it does not wait for the container to complete + before proceeding to the next init container. Instead, + the next init container starts immediately after this + init container is started, or after any startupProbe has + successfully completed.' + type: string + securityContext: + description: 'SecurityContext defines the security options + the container should be run with. If set, the fields of + SecurityContext override the equivalent fields of PodSecurityContext. + 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 Note that this field cannot be + set when spec.os.name is windows.' + type: boolean + capabilities: + description: The capabilities to add/drop when running + containers. Defaults to the default set of capabilities + granted by the container runtime. Note that this field + cannot be set when spec.os.name is windows. + 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. Note that + this field cannot be set when spec.os.name is windows. + 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. Note that this field cannot + be set when spec.os.name is windows. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only + root filesystem. Default is false. Note that this + field cannot be set when spec.os.name is windows. + 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. Note that this field cannot be set + when spec.os.name is windows. + 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. + Note that this field cannot be set when spec.os.name + is windows. + 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. Note + that this field cannot be set when spec.os.name is + windows. + 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 + seccompProfile: + description: The seccomp options to use by this container. + If seccomp options are provided at both the pod & + container level, the container options override the + pod options. Note that this field cannot be set when + spec.os.name is windows. + properties: + localhostProfile: + description: localhostProfile indicates a profile + defined in a file on the node should be used. + The profile must be preconfigured on the node + to work. Must be a descending path, relative to + the kubelet's configured seccomp profile location. + Must be set if type is "Localhost". Must NOT be + set for any other type. + type: string + type: + description: "type indicates which kind of seccomp + profile will be applied. Valid options are: \n + Localhost - a profile defined in a file on the + node should be used. RuntimeDefault - the container + runtime default profile should be used. Unconfined + - no profile should be applied." + type: string + required: + - type + 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. Note that this field cannot be set + when spec.os.name is linux. + 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. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name + of the GMSA credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container + should be run as a 'Host Process' container. All + of a Pod's containers must have the same effective + HostProcess value (it is not allowed to have a + mix of HostProcess containers and non-HostProcess + containers). In addition, if HostProcess is true + then HostNetwork must also be set to true. + type: boolean + 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. + 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. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: 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 + grpc: + description: GRPC specifies an action involving a GRPC + port. + properties: + port: + description: Port number of the gRPC service. Number + must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service + to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default behavior + is defined by gRPC." + type: string + required: + - port + 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. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + 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. + 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 + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs + to terminate gracefully upon probe failure. The grace + period is the duration in seconds after the processes + running in the pod are sent a termination signal and + the time when the processes are forcibly halted with + a kill signal. Set this value longer than the expected + cleanup time for your process. If this value is nil, + the pod's terminationGracePeriodSeconds will be used. + Otherwise, this value overrides the value provided + by the pod spec. Value must be non-negative integer. + The value zero indicates stop immediately via the + kill signal (no opportunity to shut down). This is + a beta field and requires enabling ProbeTerminationGracePeriod + feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds + is used if unset. + format: int64 + type: integer + 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. + 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 + type: array + dnsConfig: + description: Specifies the DNS parameters of a pod. Parameters + specified here will be merged to the generated DNS configuration + based on DNSPolicy. + properties: + nameservers: + description: A list of DNS name server IP addresses. This + will be appended to the base nameservers generated from + DNSPolicy. Duplicated nameservers will be removed. + items: + type: string + type: array + options: + description: A list of DNS resolver options. This will be + merged with the base options generated from DNSPolicy. Duplicated + entries will be removed. Resolution options given in Options + will override those that appear in the base DNSPolicy. + items: + description: PodDNSConfigOption defines DNS resolver options + of a pod. + properties: + name: + description: Required. + type: string + value: + type: string + type: object + type: array + searches: + description: A list of DNS search domains for host-name lookup. + This will be appended to the base search paths generated + from DNSPolicy. Duplicated search paths will be removed. + items: + type: string + type: array + type: object + dnsPolicy: + description: Set DNS policy for the pod. Defaults to "ClusterFirst". + Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', + 'Default' or 'None'. DNS parameters given in DNSConfig will + be merged with the policy selected with DNSPolicy. To have DNS + options set along with hostNetwork, you have to specify DNS + policy explicitly to 'ClusterFirstWithHostNet'. + type: string + enableServiceLinks: + description: 'EnableServiceLinks indicates whether information + about services should be injected into pod''s environment variables, + matching the syntax of Docker links. Optional: Defaults to true.' + type: boolean + ephemeralContainers: + description: List of ephemeral containers run in this pod. Ephemeral + containers may be run in an existing pod to perform user-initiated + actions such as debugging. This list cannot be specified when + creating a pod, and it cannot be modified by updating the pod + spec. In order to add an ephemeral container to an existing + pod, use the pod's ephemeralcontainers subresource. + items: + description: "An EphemeralContainer is a temporary container + that you may add to an existing Pod for user-initiated activities + such as debugging. Ephemeral containers have no resource or + scheduling guarantees, and they will not be restarted when + they exit or when a Pod is removed or restarted. The kubelet + may evict a Pod if an ephemeral container causes the Pod to + exceed its resource allocation. \n To add an ephemeral container, + use the ephemeralcontainers subresource of an existing Pod. + Ephemeral containers may not be removed or restarted." + properties: + args: + description: 'Arguments to the entrypoint. The image''s + CMD is used if this is not provided. Variable references + $(VAR_NAME) are expanded using the container''s environment. + If a variable cannot be resolved, the reference in the + input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) + syntax: i.e. "$$(VAR_NAME)" will produce the string literal + "$(VAR_NAME)". Escaped references will never be expanded, + regardless of whether the variable exists or not. Cannot + be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + command: + description: 'Entrypoint array. Not executed within a shell. + The image''s ENTRYPOINT is used if this is not provided. + Variable references $(VAR_NAME) are expanded using the + container''s environment. If a variable cannot be resolved, + the reference in the input string will be unchanged. Double + $$ are reduced to a single $, which allows for escaping + the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce + the string literal "$(VAR_NAME)". Escaped references will + never be expanded, regardless of whether the variable + exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + 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 previously 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. + Double $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" + will produce the string literal "$(VAR_NAME)". Escaped + references will never be expanded, regardless of + whether the variable exists or not. 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + type: object + type: array + image: + description: 'Container image name. More info: https://kubernetes.io/docs/concepts/containers/images' + 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: Lifecycle is not allowed for ephemeral containers. + 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: 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. This + will be canonicalized upon output, so + case-variant names will be understood + as the same header. + 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: Deprecated. TCPSocket is NOT supported + as a LifecycleHandler and kept for the backward + compatibility. There are no validation of this + field and lifecycle hooks will fail in runtime + when tcp handler is specified. + 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 Pod''s termination + grace period countdown begins before the PreStop hook + is executed. Regardless of the outcome of the handler, + the container will eventually terminate within the + Pod''s termination grace period (unless delayed by + finalizers). 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: 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. This + will be canonicalized upon output, so + case-variant names will be understood + as the same header. + 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: Deprecated. TCPSocket is NOT supported + as a LifecycleHandler and kept for the backward + compatibility. There are no validation of this + field and lifecycle hooks will fail in runtime + when tcp handler is specified. + 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: Probes are not allowed for ephemeral containers. + properties: + exec: + description: 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 + grpc: + description: GRPC specifies an action involving a GRPC + port. + properties: + port: + description: Port number of the gRPC service. Number + must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service + to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default behavior + is defined by gRPC." + type: string + required: + - port + 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. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + 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. + 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 + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs + to terminate gracefully upon probe failure. The grace + period is the duration in seconds after the processes + running in the pod are sent a termination signal and + the time when the processes are forcibly halted with + a kill signal. Set this value longer than the expected + cleanup time for your process. If this value is nil, + the pod's terminationGracePeriodSeconds will be used. + Otherwise, this value overrides the value provided + by the pod spec. Value must be non-negative integer. + The value zero indicates stop immediately via the + kill signal (no opportunity to shut down). This is + a beta field and requires enabling ProbeTerminationGracePeriod + feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds + is used if unset. + format: int64 + type: integer + 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 ephemeral container specified as + a DNS_LABEL. This name must be unique among all containers, + init containers and ephemeral containers. + type: string + ports: + description: Ports are not allowed for ephemeral containers. + 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: Probes are not allowed for ephemeral containers. + properties: + exec: + description: 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 + grpc: + description: GRPC specifies an action involving a GRPC + port. + properties: + port: + description: Port number of the gRPC service. Number + must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service + to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default behavior + is defined by gRPC." + type: string + required: + - port + 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. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + 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. + 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 + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs + to terminate gracefully upon probe failure. The grace + period is the duration in seconds after the processes + running in the pod are sent a termination signal and + the time when the processes are forcibly halted with + a kill signal. Set this value longer than the expected + cleanup time for your process. If this value is nil, + the pod's terminationGracePeriodSeconds will be used. + Otherwise, this value overrides the value provided + by the pod spec. Value must be non-negative integer. + The value zero indicates stop immediately via the + kill signal (no opportunity to shut down). This is + a beta field and requires enabling ProbeTerminationGracePeriod + feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds + is used if unset. + format: int64 + type: integer + 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 + resizePolicy: + description: Resources resize policy for the container. + items: + description: ContainerResizePolicy represents resource + resize policy for the container. + properties: + resourceName: + description: 'Name of the resource to which this resource + resize policy applies. Supported values: cpu, memory.' + type: string + restartPolicy: + description: Restart policy to apply when specified + resource is resized. If not specified, it defaults + to NotRequired. + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + description: Resources are not allowed for ephemeral containers. + Ephemeral containers use spare resources already allocated + to the pod. + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the + DynamicResourceAllocation feature gate. \n This field + is immutable. It can only be set for containers." + items: + description: ResourceClaim references one entry in + PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry + in pod.spec.resourceClaims of the Pod where + this field is used. It makes that resource available + inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + 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-resources-containers/' + 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. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + restartPolicy: + description: Restart policy for the container to manage + the restart behavior of each container within a pod. This + may only be set for init containers. You cannot set this + field on ephemeral containers. + type: string + securityContext: + description: 'Optional: SecurityContext defines the security + options the ephemeral container should be run with. If + set, the fields of SecurityContext override the equivalent + fields of PodSecurityContext.' + 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 Note that this field cannot be + set when spec.os.name is windows.' + type: boolean + capabilities: + description: The capabilities to add/drop when running + containers. Defaults to the default set of capabilities + granted by the container runtime. Note that this field + cannot be set when spec.os.name is windows. + 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. Note that + this field cannot be set when spec.os.name is windows. + 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. Note that this field cannot + be set when spec.os.name is windows. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only + root filesystem. Default is false. Note that this + field cannot be set when spec.os.name is windows. + 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. Note that this field cannot be set + when spec.os.name is windows. + 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. + Note that this field cannot be set when spec.os.name + is windows. + 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. Note + that this field cannot be set when spec.os.name is + windows. + 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 + seccompProfile: + description: The seccomp options to use by this container. + If seccomp options are provided at both the pod & + container level, the container options override the + pod options. Note that this field cannot be set when + spec.os.name is windows. + properties: + localhostProfile: + description: localhostProfile indicates a profile + defined in a file on the node should be used. + The profile must be preconfigured on the node + to work. Must be a descending path, relative to + the kubelet's configured seccomp profile location. + Must be set if type is "Localhost". Must NOT be + set for any other type. + type: string + type: + description: "type indicates which kind of seccomp + profile will be applied. Valid options are: \n + Localhost - a profile defined in a file on the + node should be used. RuntimeDefault - the container + runtime default profile should be used. Unconfined + - no profile should be applied." + type: string + required: + - type + 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. Note that this field cannot be set + when spec.os.name is linux. + 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. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name + of the GMSA credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container + should be run as a 'Host Process' container. All + of a Pod's containers must have the same effective + HostProcess value (it is not allowed to have a + mix of HostProcess containers and non-HostProcess + containers). In addition, if HostProcess is true + then HostNetwork must also be set to true. + type: boolean + 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. + type: string + type: object + type: object + startupProbe: + description: Probes are not allowed for ephemeral containers. + properties: + exec: + description: 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 + grpc: + description: GRPC specifies an action involving a GRPC + port. + properties: + port: + description: Port number of the gRPC service. Number + must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service + to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default behavior + is defined by gRPC." + type: string + required: + - port + 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. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + 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. + 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 + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs + to terminate gracefully upon probe failure. The grace + period is the duration in seconds after the processes + running in the pod are sent a termination signal and + the time when the processes are forcibly halted with + a kill signal. Set this value longer than the expected + cleanup time for your process. If this value is nil, + the pod's terminationGracePeriodSeconds will be used. + Otherwise, this value overrides the value provided + by the pod spec. Value must be non-negative integer. + The value zero indicates stop immediately via the + kill signal (no opportunity to shut down). This is + a beta field and requires enabling ProbeTerminationGracePeriod + feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds + is used if unset. + format: int64 + type: integer + 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 + targetContainerName: + description: "If set, the name of the container from PodSpec + that this ephemeral container targets. The ephemeral container + will be run in the namespaces (IPC, PID, etc) of this + container. If not set then the ephemeral container uses + the namespaces configured in the Pod spec. \n The container + runtime must implement support for this feature. If the + runtime does not support namespace targeting then the + result of setting this field is undefined." + type: string + 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. + 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. + Subpath mounts are not allowed for ephemeral containers. + 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 + type: array + hostAliases: + description: HostAliases is an optional list of hosts and IPs + that will be injected into the pod's hosts file if specified. + This is only valid for non-hostNetwork pods. + items: + description: HostAlias holds the mapping between IP and hostnames + that will be injected as an entry in the pod's hosts file. + properties: + hostnames: + description: Hostnames for the above IP address. + items: + type: string + type: array + ip: + description: IP address of the host file entry. + type: string + type: object + type: array + hostIPC: + description: 'Use the host''s ipc namespace. Optional: Default + to false.' + type: boolean + hostNetwork: + description: Host networking requested for this pod. Use the host's + network namespace. If this option is set, the ports that will + be used must be specified. Default to false. + type: boolean + hostPID: + description: 'Use the host''s pid namespace. Optional: Default + to false.' + type: boolean + hostUsers: + description: 'Use the host''s user namespace. Optional: Default + to true. If set to true or not present, the pod will be run + in the host user namespace, useful for when the pod needs a + feature only available to the host user namespace, such as loading + a kernel module with CAP_SYS_MODULE. When set to false, a new + userns is created for the pod. Setting false is useful for mitigating + container breakout vulnerabilities even allowing users to run + their containers as root without actually having root privileges + on the host. This field is alpha-level and is only honored by + servers that enable the UserNamespacesSupport feature.' + type: boolean + hostname: + description: Specifies the hostname of the Pod If not specified, + the pod's hostname will be set to a system-defined value. + type: string + imagePullSecrets: + description: 'ImagePullSecrets is an optional list of references + to secrets in the same namespace to use for pulling any of the + images used by this PodSpec. If specified, these secrets will + be passed to individual puller implementations for them to use. + More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod' + items: + description: LocalObjectReference contains enough information + to let you locate the referenced object inside the same namespace. + 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 + x-kubernetes-map-type: atomic + type: array + initContainers: + description: 'List of initialization containers belonging to the + pod. Init containers are executed in order prior to containers + being started. If any init container fails, the pod is considered + to have failed and is handled according to its restartPolicy. + The name for an init container or normal container must be unique + among all containers. Init containers may not have Lifecycle + actions, Readiness probes, Liveness probes, or Startup probes. + The resourceRequirements of an init container are taken into + account during scheduling by finding the highest request/limit + for each resource type, and then using the max of of that value + or the sum of the normal containers. Limits are applied to init + containers in a similar fashion. Init containers cannot currently + be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/' + items: + description: A single application container that you want to + run within a pod. + properties: + args: + description: 'Arguments to the entrypoint. The container + image''s CMD is used if this is not provided. Variable + references $(VAR_NAME) are expanded using the container''s + environment. If a variable cannot be resolved, the reference + in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) + syntax: i.e. "$$(VAR_NAME)" will produce the string literal + "$(VAR_NAME)". Escaped references will never be expanded, + regardless of whether the variable exists or not. Cannot + be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + command: + description: 'Entrypoint array. Not executed within a shell. + The container image''s ENTRYPOINT is used if this is not + provided. Variable references $(VAR_NAME) are expanded + using the container''s environment. If a variable cannot + be resolved, the reference in the input string will be + unchanged. Double $$ are reduced to a single $, which + allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" + will produce the string literal "$(VAR_NAME)". Escaped + references will never be expanded, regardless of whether + the variable exists or not. Cannot be updated. More info: + https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + 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 previously 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. + Double $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" + will produce the string literal "$(VAR_NAME)". Escaped + references will never be expanded, regardless of + whether the variable exists or not. 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + type: object + type: array + image: + description: 'Container 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: 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. This + will be canonicalized upon output, so + case-variant names will be understood + as the same header. + 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: Deprecated. TCPSocket is NOT supported + as a LifecycleHandler and kept for the backward + compatibility. There are no validation of this + field and lifecycle hooks will fail in runtime + when tcp handler is specified. + 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 Pod''s termination + grace period countdown begins before the PreStop hook + is executed. Regardless of the outcome of the handler, + the container will eventually terminate within the + Pod''s termination grace period (unless delayed by + finalizers). 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: 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. This + will be canonicalized upon output, so + case-variant names will be understood + as the same header. + 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: Deprecated. TCPSocket is NOT supported + as a LifecycleHandler and kept for the backward + compatibility. There are no validation of this + field and lifecycle hooks will fail in runtime + when tcp handler is specified. + 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: 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 + grpc: + description: GRPC specifies an action involving a GRPC + port. + properties: + port: + description: Port number of the gRPC service. Number + must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service + to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default behavior + is defined by gRPC." + type: string + required: + - port + 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. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + 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. + 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 + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs + to terminate gracefully upon probe failure. The grace + period is the duration in seconds after the processes + running in the pod are sent a termination signal and + the time when the processes are forcibly halted with + a kill signal. Set this value longer than the expected + cleanup time for your process. If this value is nil, + the pod's terminationGracePeriodSeconds will be used. + Otherwise, this value overrides the value provided + by the pod spec. Value must be non-negative integer. + The value zero indicates stop immediately via the + kill signal (no opportunity to shut down). This is + a beta field and requires enabling ProbeTerminationGracePeriod + feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds + is used if unset. + format: int64 + type: integer + 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. + 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. Modifying this array with strategic + merge patch may corrupt the data. For more information + See https://github.com/kubernetes/kubernetes/issues/108255. + 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: 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 + grpc: + description: GRPC specifies an action involving a GRPC + port. + properties: + port: + description: Port number of the gRPC service. Number + must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service + to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default behavior + is defined by gRPC." + type: string + required: + - port + 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. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + 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. + 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 + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs + to terminate gracefully upon probe failure. The grace + period is the duration in seconds after the processes + running in the pod are sent a termination signal and + the time when the processes are forcibly halted with + a kill signal. Set this value longer than the expected + cleanup time for your process. If this value is nil, + the pod's terminationGracePeriodSeconds will be used. + Otherwise, this value overrides the value provided + by the pod spec. Value must be non-negative integer. + The value zero indicates stop immediately via the + kill signal (no opportunity to shut down). This is + a beta field and requires enabling ProbeTerminationGracePeriod + feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds + is used if unset. + format: int64 + type: integer + 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 + resizePolicy: + description: Resources resize policy for the container. + items: + description: ContainerResizePolicy represents resource + resize policy for the container. + properties: + resourceName: + description: 'Name of the resource to which this resource + resize policy applies. Supported values: cpu, memory.' + type: string + restartPolicy: + description: Restart policy to apply when specified + resource is resized. If not specified, it defaults + to NotRequired. + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + description: 'Compute Resources required by this container. + Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the + DynamicResourceAllocation feature gate. \n This field + is immutable. It can only be set for containers." + items: + description: ResourceClaim references one entry in + PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry + in pod.spec.resourceClaims of the Pod where + this field is used. It makes that resource available + inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + 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-resources-containers/' + 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. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + restartPolicy: + description: 'RestartPolicy defines the restart behavior + of individual containers in a pod. This field may only + be set for init containers, and the only allowed value + is "Always". For non-init containers or when this field + is not specified, the restart behavior is defined by the + Pod''s restart policy and the container type. Setting + the RestartPolicy as "Always" for the init container will + have the following effect: this init container will be + continually restarted on exit until all regular containers + have terminated. Once all regular containers have completed, + all init containers with restartPolicy "Always" will be + shut down. This lifecycle differs from normal init containers + and is often referred to as a "sidecar" container. Although + this init container still starts in the init container + sequence, it does not wait for the container to complete + before proceeding to the next init container. Instead, + the next init container starts immediately after this + init container is started, or after any startupProbe has + successfully completed.' + type: string + securityContext: + description: 'SecurityContext defines the security options + the container should be run with. If set, the fields of + SecurityContext override the equivalent fields of PodSecurityContext. + 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 Note that this field cannot be + set when spec.os.name is windows.' + type: boolean + capabilities: + description: The capabilities to add/drop when running + containers. Defaults to the default set of capabilities + granted by the container runtime. Note that this field + cannot be set when spec.os.name is windows. + 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. Note that + this field cannot be set when spec.os.name is windows. + 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. Note that this field cannot + be set when spec.os.name is windows. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only + root filesystem. Default is false. Note that this + field cannot be set when spec.os.name is windows. + 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. Note that this field cannot be set + when spec.os.name is windows. + 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. + Note that this field cannot be set when spec.os.name + is windows. + 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. Note + that this field cannot be set when spec.os.name is + windows. + 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 + seccompProfile: + description: The seccomp options to use by this container. + If seccomp options are provided at both the pod & + container level, the container options override the + pod options. Note that this field cannot be set when + spec.os.name is windows. + properties: + localhostProfile: + description: localhostProfile indicates a profile + defined in a file on the node should be used. + The profile must be preconfigured on the node + to work. Must be a descending path, relative to + the kubelet's configured seccomp profile location. + Must be set if type is "Localhost". Must NOT be + set for any other type. + type: string + type: + description: "type indicates which kind of seccomp + profile will be applied. Valid options are: \n + Localhost - a profile defined in a file on the + node should be used. RuntimeDefault - the container + runtime default profile should be used. Unconfined + - no profile should be applied." + type: string + required: + - type + 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. Note that this field cannot be set + when spec.os.name is linux. + 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. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name + of the GMSA credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container + should be run as a 'Host Process' container. All + of a Pod's containers must have the same effective + HostProcess value (it is not allowed to have a + mix of HostProcess containers and non-HostProcess + containers). In addition, if HostProcess is true + then HostNetwork must also be set to true. + type: boolean + 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. + 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. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: 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 + grpc: + description: GRPC specifies an action involving a GRPC + port. + properties: + port: + description: Port number of the gRPC service. Number + must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service + to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default behavior + is defined by gRPC." + type: string + required: + - port + 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. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + 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. + 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 + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs + to terminate gracefully upon probe failure. The grace + period is the duration in seconds after the processes + running in the pod are sent a termination signal and + the time when the processes are forcibly halted with + a kill signal. Set this value longer than the expected + cleanup time for your process. If this value is nil, + the pod's terminationGracePeriodSeconds will be used. + Otherwise, this value overrides the value provided + by the pod spec. Value must be non-negative integer. + The value zero indicates stop immediately via the + kill signal (no opportunity to shut down). This is + a beta field and requires enabling ProbeTerminationGracePeriod + feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds + is used if unset. + format: int64 + type: integer + 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. + 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 + type: array + nodeName: + description: NodeName is a request to schedule this pod onto a + specific node. If it is non-empty, the scheduler simply schedules + this pod onto that node, assuming that it fits resource requirements. + type: string + nodeSelector: + additionalProperties: + type: string + description: 'NodeSelector is a selector which must be true for + the pod to fit on a node. Selector which must match a node''s + labels for the pod to be scheduled on that node. More info: + https://kubernetes.io/docs/concepts/configuration/assign-pod-node/' + type: object + x-kubernetes-map-type: atomic + os: + description: "Specifies the OS of the containers in the pod. Some + pod and container fields are restricted if this is set. \n If + the OS field is set to linux, the following fields must be unset: + -securityContext.windowsOptions \n If the OS field is set to + windows, following fields must be unset: - spec.hostPID - spec.hostIPC + - spec.hostUsers - spec.securityContext.seLinuxOptions - spec.securityContext.seccompProfile + - spec.securityContext.fsGroup - spec.securityContext.fsGroupChangePolicy + - spec.securityContext.sysctls - spec.shareProcessNamespace + - spec.securityContext.runAsUser - spec.securityContext.runAsGroup + - spec.securityContext.supplementalGroups - spec.containers[*].securityContext.seLinuxOptions + - spec.containers[*].securityContext.seccompProfile - spec.containers[*].securityContext.capabilities + - spec.containers[*].securityContext.readOnlyRootFilesystem + - spec.containers[*].securityContext.privileged - spec.containers[*].securityContext.allowPrivilegeEscalation + - spec.containers[*].securityContext.procMount - spec.containers[*].securityContext.runAsUser + - spec.containers[*].securityContext.runAsGroup" + properties: + name: + description: 'Name is the name of the operating system. The + currently supported values are linux and windows. Additional + value may be defined in future and can be one of: https://github.com/opencontainers/runtime-spec/blob/master/config.md#platform-specific-configuration + Clients should expect to handle additional values and treat + unrecognized values in this field as os: null' + type: string + required: + - name + type: object + overhead: + 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: 'Overhead represents the resource overhead associated + with running a pod for a given RuntimeClass. This field will + be autopopulated at admission time by the RuntimeClass admission + controller. If the RuntimeClass admission controller is enabled, + overhead must not be set in Pod create requests. The RuntimeClass + admission controller will reject Pod create requests which have + the overhead already set. If RuntimeClass is configured and + selected in the PodSpec, Overhead will be set to the value defined + in the corresponding RuntimeClass, otherwise it will remain + unset and treated as zero. More info: https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md' + type: object + preemptionPolicy: + description: PreemptionPolicy is the Policy for preempting pods + with lower priority. One of Never, PreemptLowerPriority. Defaults + to PreemptLowerPriority if unset. + type: string + priority: + description: The priority value. Various system components use + this field to find the priority of the pod. When Priority Admission + Controller is enabled, it prevents users from setting this field. + The admission controller populates this field from PriorityClassName. + The higher the value, the higher the priority. + format: int32 + type: integer + priorityClassName: + description: If specified, indicates the pod's priority. "system-node-critical" + and "system-cluster-critical" are two special keywords which + indicate the highest priorities with the former being the highest + priority. Any other name must be defined by creating a PriorityClass + object with that name. If not specified, the pod priority will + be default or zero if there is no default. + type: string + readinessGates: + description: 'If specified, all readiness gates will be evaluated + for pod readiness. A pod is ready when all its containers are + ready AND all conditions specified in the readiness gates have + status equal to "True" More info: https://git.k8s.io/enhancements/keps/sig-network/580-pod-readiness-gates' + items: + description: PodReadinessGate contains the reference to a pod + condition + properties: + conditionType: + description: ConditionType refers to a condition in the + pod's condition list with matching type. + type: string + required: + - conditionType + type: object + type: array + resourceClaims: + description: "ResourceClaims defines which ResourceClaims must + be allocated and reserved before the Pod is allowed to start. + The resources will be made available to those containers which + consume them by name. \n This is an alpha field and requires + enabling the DynamicResourceAllocation feature gate. \n This + field is immutable." + items: + description: PodResourceClaim references exactly one ResourceClaim + through a ClaimSource. It adds a name to it that uniquely + identifies the ResourceClaim inside the Pod. Containers that + need access to the ResourceClaim reference it with this name. + properties: + name: + description: Name uniquely identifies this resource claim + inside the pod. This must be a DNS_LABEL. + type: string + source: + description: Source describes where to find the ResourceClaim. + properties: + resourceClaimName: + description: ResourceClaimName is the name of a ResourceClaim + object in the same namespace as this pod. + type: string + resourceClaimTemplateName: + description: "ResourceClaimTemplateName is the name + of a ResourceClaimTemplate object in the same namespace + as this pod. \n The template will be used to create + a new ResourceClaim, which will be bound to this pod. + When this pod is deleted, the ResourceClaim will also + be deleted. The pod name and resource name, along + with a generated component, will be used to form a + unique name for the ResourceClaim, which will be recorded + in pod.status.resourceClaimStatuses. \n This field + is immutable and no changes will be made to the corresponding + ResourceClaim by the control plane after creating + the ResourceClaim." + type: string + type: object + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + restartPolicy: + description: 'Restart policy for all containers within the pod. + One of Always, OnFailure, Never. In some contexts, only a subset + of those values may be permitted. Default to Always. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy' + type: string + runtimeClassName: + description: 'RuntimeClassName refers to a RuntimeClass object + in the node.k8s.io group, which should be used to run this pod. If + no RuntimeClass resource matches the named class, the pod will + not be run. If unset or empty, the "legacy" RuntimeClass will + be used, which is an implicit class with an empty definition + that uses the default runtime handler. More info: https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class' + type: string + schedulerName: + description: If specified, the pod will be dispatched by specified + scheduler. If not specified, the pod will be dispatched by default + scheduler. + type: string + schedulingGates: + description: "SchedulingGates is an opaque list of values that + if specified will block scheduling the pod. If schedulingGates + is not empty, the pod will stay in the SchedulingGated state + and the scheduler will not attempt to schedule the pod. \n SchedulingGates + can only be set at pod creation time, and be removed only afterwards. + \n This is a beta feature enabled by the PodSchedulingReadiness + feature gate." + items: + description: PodSchedulingGate is associated to a Pod to guard + its scheduling. + properties: + name: + description: Name of the scheduling gate. Each scheduling + gate must have a unique name field. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + securityContext: + description: 'SecurityContext holds pod-level security attributes + and common container settings. Optional: Defaults to empty. See + type description for default values of each field.' + properties: + fsGroup: + description: "A special supplemental group that applies to + all containers in a pod. Some volume types allow the Kubelet + to change the ownership of that volume to be owned by the + pod: \n 1. The owning GID will be the FSGroup 2. The setgid + bit is set (new files created in the volume will be owned + by FSGroup) 3. The permission bits are OR'd with rw-rw---- + \n If unset, the Kubelet will not modify the ownership and + permissions of any volume. Note that this field cannot be + set when spec.os.name is windows." + format: int64 + type: integer + fsGroupChangePolicy: + description: 'fsGroupChangePolicy defines behavior of changing + ownership and permission of the volume before being exposed + inside Pod. This field will only apply to volume types which + support fsGroup based ownership(and permissions). It will + have no effect on ephemeral volume types such as: secret, + configmaps and emptydir. Valid values are "OnRootMismatch" + and "Always". If not specified, "Always" is used. Note that + this field cannot be set when spec.os.name is windows.' + type: string + runAsGroup: + description: The GID to run the entrypoint of the container + process. Uses runtime default if unset. May also be set + in SecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext + takes precedence for that container. Note that this field + cannot be set when spec.os.name is windows. + 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 SecurityContext. 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 SecurityContext. If set + in both SecurityContext and PodSecurityContext, the value + specified in SecurityContext takes precedence for that container. + Note that this field cannot be set when spec.os.name is + windows. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to all containers. + If unspecified, the container runtime will allocate a random + SELinux context for each container. May also be set in + SecurityContext. If set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence + for that container. Note that this field cannot be set when + spec.os.name is windows. + 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 + seccompProfile: + description: The seccomp options to use by the containers + in this pod. Note that this field cannot be set when spec.os.name + is windows. + properties: + localhostProfile: + description: localhostProfile indicates a profile defined + in a file on the node should be used. The profile must + be preconfigured on the node to work. Must be a descending + path, relative to the kubelet's configured seccomp profile + location. Must be set if type is "Localhost". Must NOT + be set for any other type. + type: string + type: + description: "type indicates which kind of seccomp profile + will be applied. Valid options are: \n Localhost - a + profile defined in a file on the node should be used. + RuntimeDefault - the container runtime default profile + should be used. Unconfined - no profile should be applied." + type: string + required: + - type + type: object + supplementalGroups: + description: A list of groups applied to the first process + run in each container, in addition to the container's primary + GID, the fsGroup (if specified), and group memberships defined + in the container image for the uid of the container process. + If unspecified, no additional groups are added to any container. + Note that group memberships defined in the container image + for the uid of the container process are still effective, + even if they are not included in this list. Note that this + field cannot be set when spec.os.name is windows. + items: + format: int64 + type: integer + type: array + sysctls: + description: Sysctls hold a list of namespaced sysctls used + for the pod. Pods with unsupported sysctls (by the container + runtime) might fail to launch. Note that this field cannot + be set when spec.os.name is windows. + items: + description: Sysctl defines a kernel parameter to be set + properties: + name: + description: Name of a property to set + type: string + value: + description: Value of a property to set + type: string + required: + - name + - value + type: object + type: array + windowsOptions: + description: The Windows specific settings applied to all + containers. If unspecified, the options within a container's + SecurityContext will be used. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. Note that this field cannot be set when + spec.os.name is linux. + 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. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the + GMSA credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container should + be run as a 'Host Process' container. All of a Pod's + containers must have the same effective HostProcess + value (it is not allowed to have a mix of HostProcess + containers and non-HostProcess containers). In addition, + if HostProcess is true then HostNetwork must also be + set to true. + type: boolean + 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. + type: string + type: object + type: object + serviceAccount: + description: 'DeprecatedServiceAccount is a depreciated alias + for ServiceAccountName. Deprecated: Use serviceAccountName instead.' + type: string + serviceAccountName: + description: 'ServiceAccountName is the name of the ServiceAccount + to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/' + type: string + setHostnameAsFQDN: + description: If true the pod's hostname will be configured as + the pod's FQDN, rather than the leaf name (the default). In + Linux containers, this means setting the FQDN in the hostname + field of the kernel (the nodename field of struct utsname). + In Windows containers, this means setting the registry value + of hostname for the registry key HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters + to FQDN. If a pod does not have FQDN, this has no effect. Default + to false. + type: boolean + shareProcessNamespace: + description: 'Share a single process namespace between all of + the containers in a pod. When this is set containers will be + able to view and signal processes from other containers in the + same pod, and the first process in each container will not be + assigned PID 1. HostPID and ShareProcessNamespace cannot both + be set. Optional: Default to false.' + type: boolean + subdomain: + description: If specified, the fully qualified Pod hostname will + be "...svc.". + If not specified, the pod will not have a domainname at all. + type: string + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs to terminate + gracefully. May be decreased in delete request. Value must be + non-negative integer. The value zero indicates stop immediately + via the kill signal (no opportunity to shut down). If this value + is nil, the default grace period will be used instead. The grace + period is the duration in seconds after the processes running + in the pod are sent a termination signal and the time when the + processes are forcibly halted with a kill signal. Set this value + longer than the expected cleanup time for your process. Defaults + to 30 seconds. + format: int64 + type: integer + tolerations: + description: If specified, the pod's tolerations. + items: + description: The pod this Toleration is attached to tolerates + any taint that matches the triple using + the matching operator . + properties: + effect: + description: Effect indicates the taint effect to match. + Empty means match all taint effects. When specified, allowed + values are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: Key is the taint key that the toleration applies + to. Empty means match all taint keys. If the key is empty, + operator must be Exists; this combination means to match + all values and all keys. + type: string + operator: + description: Operator represents a key's relationship to + the value. Valid operators are Exists and Equal. Defaults + to Equal. Exists is equivalent to wildcard for value, + so that a pod can tolerate all taints of a particular + category. + type: string + tolerationSeconds: + description: TolerationSeconds represents the period of + time the toleration (which must be of effect NoExecute, + otherwise this field is ignored) tolerates the taint. + By default, it is not set, which means tolerate the taint + forever (do not evict). Zero and negative values will + be treated as 0 (evict immediately) by the system. + format: int64 + type: integer + value: + description: Value is the taint value the toleration matches + to. If the operator is Exists, the value should be empty, + otherwise just a regular string. + type: string + type: object + type: array + topologySpreadConstraints: + description: TopologySpreadConstraints describes how a group of + pods ought to spread across topology domains. Scheduler will + schedule pods in a way which abides by the constraints. All + topologySpreadConstraints are ANDed. + items: + description: TopologySpreadConstraint specifies how to spread + matching pods among the given topology. + properties: + labelSelector: + description: LabelSelector is used to find matching pods. + Pods that match this label selector are counted to determine + the number of pods in their corresponding topology domain. + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. + A single {key,value} in the matchLabels map is equivalent + to an element of matchExpressions, whose key field + is "key", the operator is "In", and the values array + contains only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + description: "MatchLabelKeys is a set of pod label keys + to select the pods over which spreading will be calculated. + The keys are used to lookup values from the incoming pod + labels, those key-value labels are ANDed with labelSelector + to select the group of existing pods over which spreading + will be calculated for the incoming pod. The same key + is forbidden to exist in both MatchLabelKeys and LabelSelector. + MatchLabelKeys cannot be set when LabelSelector isn't + set. Keys that don't exist in the incoming pod labels + will be ignored. A null or empty list means only match + against labelSelector. \n This is a beta field and requires + the MatchLabelKeysInPodTopologySpread feature gate to + be enabled (enabled by default)." + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + description: 'MaxSkew describes the degree to which pods + may be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`, + it is the maximum permitted difference between the number + of matching pods in the target topology and the global + minimum. The global minimum is the minimum number of matching + pods in an eligible domain or zero if the number of eligible + domains is less than MinDomains. For example, in a 3-zone + cluster, MaxSkew is set to 1, and pods with the same labelSelector + spread as 2/2/1: In this case, the global minimum is 1. + | zone1 | zone2 | zone3 | | P P | P P | P | - + if MaxSkew is 1, incoming pod can only be scheduled to + zone3 to become 2/2/2; scheduling it onto zone1(zone2) + would make the ActualSkew(3-1) on zone1(zone2) violate + MaxSkew(1). - if MaxSkew is 2, incoming pod can be scheduled + onto any zone. When `whenUnsatisfiable=ScheduleAnyway`, + it is used to give higher precedence to topologies that + satisfy it. It''s a required field. Default value is 1 + and 0 is not allowed.' + format: int32 + type: integer + minDomains: + description: "MinDomains indicates a minimum number of eligible + domains. When the number of eligible domains with matching + topology keys is less than minDomains, Pod Topology Spread + treats \"global minimum\" as 0, and then the calculation + of Skew is performed. And when the number of eligible + domains with matching topology keys equals or greater + than minDomains, this value has no effect on scheduling. + As a result, when the number of eligible domains is less + than minDomains, scheduler won't schedule more than maxSkew + Pods to those domains. If value is nil, the constraint + behaves as if MinDomains is equal to 1. Valid values are + integers greater than 0. When value is not nil, WhenUnsatisfiable + must be DoNotSchedule. \n For example, in a 3-zone cluster, + MaxSkew is set to 2, MinDomains is set to 5 and pods with + the same labelSelector spread as 2/2/2: | zone1 | zone2 + | zone3 | | P P | P P | P P | The number of domains + is less than 5(MinDomains), so \"global minimum\" is treated + as 0. In this situation, new pod with the same labelSelector + cannot be scheduled, because computed skew will be 3(3 + - 0) if new Pod is scheduled to any of the three zones, + it will violate MaxSkew. \n This is a beta field and requires + the MinDomainsInPodTopologySpread feature gate to be enabled + (enabled by default)." + format: int32 + type: integer + nodeAffinityPolicy: + description: "NodeAffinityPolicy indicates how we will treat + Pod's nodeAffinity/nodeSelector when calculating pod topology + spread skew. Options are: - Honor: only nodes matching + nodeAffinity/nodeSelector are included in the calculations. + - Ignore: nodeAffinity/nodeSelector are ignored. All nodes + are included in the calculations. \n If this value is + nil, the behavior is equivalent to the Honor policy. This + is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread + feature flag." + type: string + nodeTaintsPolicy: + description: "NodeTaintsPolicy indicates how we will treat + node taints when calculating pod topology spread skew. + Options are: - Honor: nodes without taints, along with + tainted nodes for which the incoming pod has a toleration, + are included. - Ignore: node taints are ignored. All nodes + are included. \n If this value is nil, the behavior is + equivalent to the Ignore policy. This is a beta-level + feature default enabled by the NodeInclusionPolicyInPodTopologySpread + feature flag." + type: string + topologyKey: + description: TopologyKey is the key of node labels. Nodes + that have a label with this key and identical values are + considered to be in the same topology. We consider each + as a "bucket", and try to put balanced number + of pods into each bucket. We define a domain as a particular + instance of a topology. Also, we define an eligible domain + as a domain whose nodes meet the requirements of nodeAffinityPolicy + and nodeTaintsPolicy. e.g. If TopologyKey is "kubernetes.io/hostname", + each Node is a domain of that topology. And, if TopologyKey + is "topology.kubernetes.io/zone", each zone is a domain + of that topology. It's a required field. + type: string + whenUnsatisfiable: + description: 'WhenUnsatisfiable indicates how to deal with + a pod if it doesn''t satisfy the spread constraint. - + DoNotSchedule (default) tells the scheduler not to schedule + it. - ScheduleAnyway tells the scheduler to schedule the + pod in any location, but giving higher precedence to topologies + that would help reduce the skew. A constraint is considered + "Unsatisfiable" for an incoming pod if and only if every + possible node assignment for that pod would violate "MaxSkew" + on some topology. For example, in a 3-zone cluster, MaxSkew + is set to 1, and pods with the same labelSelector spread + as 3/1/1: | zone1 | zone2 | zone3 | | P P P | P | P | + If WhenUnsatisfiable is set to DoNotSchedule, incoming + pod can only be scheduled to zone2(zone3) to become 3/2/1(3/1/2) + as ActualSkew(2-1) on zone2(zone3) satisfies MaxSkew(1). + In other words, the cluster can still be imbalanced, but + scheduler won''t make it *more* imbalanced. It''s a required + field.' + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array + x-kubernetes-list-map-keys: + - topologyKey + - whenUnsatisfiable + x-kubernetes-list-type: map + volumes: + description: 'List of volumes that can be mounted by containers + belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes' + 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: 'fsType is the 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: 'partition is 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: 'readOnly value true will force the readOnly + setting in VolumeMounts. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: boolean + volumeID: + description: 'volumeID is 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: 'cachingMode is the Host Caching mode: + None, Read Only, Read Write.' + type: string + diskName: + description: diskName is the Name of the data disk in + the blob storage + type: string + diskURI: + description: diskURI is the URI of data disk in the + blob storage + type: string + fsType: + description: fsType is 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: 'kind expected values are 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: readOnly 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: readOnly defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretName: + description: secretName is the name of secret that + contains Azure Storage Account Name and Key + type: string + shareName: + description: shareName is the azure 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: 'monitors is 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: 'path is Optional: Used as the mounted + root, rather than the full Ceph tree, default is /' + type: string + readOnly: + description: 'readOnly is 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: 'secretFile is 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: 'secretRef is 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 + x-kubernetes-map-type: atomic + user: + description: 'user is 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: 'fsType is the 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: 'readOnly 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: 'secretRef is 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 + x-kubernetes-map-type: atomic + volumeID: + description: 'volumeID 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: 'defaultMode is optional: mode bits used + to set permissions on created files by default. Must + be an octal value between 0000 and 0777 or a decimal + value between 0 and 511. YAML accepts both octal and + decimal values, JSON requires decimal values for mode + bits. 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 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: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode bits used + to set permissions on this file. Must be an + octal value between 0000 and 0777 or a decimal + value between 0 and 511. YAML accepts both octal + and decimal values, JSON requires decimal values + for mode bits. 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: path is 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: optional specify whether the ConfigMap + or its keys must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + csi: + description: csi (Container Storage Interface) represents + ephemeral storage that is handled by certain external + CSI drivers (Beta 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: fsType 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 + x-kubernetes-map-type: atomic + readOnly: + description: readOnly 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 Optional: mode bits used + to set permissions on created files by default. Must + be an octal value between 0000 and 0777 or a decimal + value between 0 and 511. YAML accepts both octal and + decimal values, JSON requires decimal values for mode + bits. 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 + x-kubernetes-map-type: atomic + mode: + description: 'Optional: mode bits used to set + permissions on this file, must be an octal value + between 0000 and 0777 or a decimal value between + 0 and 511. YAML accepts both octal and decimal + values, JSON requires decimal values for mode + bits. 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 + x-kubernetes-map-type: atomic + 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: 'medium represents 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: 'sizeLimit is the 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: https://kubernetes.io/docs/concepts/storage/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 + ephemeral: + description: "ephemeral represents a volume that is handled + by a cluster storage driver. The volume's lifecycle is + tied to the pod that defines it - it will be created before + the pod starts, and deleted when the pod is removed. \n + Use this if: a) the volume is only needed while the pod + runs, b) features of normal volumes like restoring from + snapshot or capacity tracking are needed, c) the storage + driver is specified through a storage class, and d) the + storage driver supports dynamic volume provisioning through + a PersistentVolumeClaim (see EphemeralVolumeSource for + more information on the connection between this volume + type and PersistentVolumeClaim). \n Use PersistentVolumeClaim + or one of the vendor-specific APIs for volumes that persist + for longer than the lifecycle of an individual pod. \n + Use CSI for light-weight local ephemeral volumes if the + CSI driver is meant to be used that way - see the documentation + of the driver for more information. \n A pod can use both + types of ephemeral volumes and persistent volumes at the + same time." + properties: + volumeClaimTemplate: + description: "Will be used to create a stand-alone PVC + to provision the volume. The pod in which this EphemeralVolumeSource + is embedded will be the owner of the PVC, i.e. the + PVC will be deleted together with the pod. The name + of the PVC will be `-` where + `` is the name from the `PodSpec.Volumes` + array entry. Pod validation will reject the pod if + the concatenated name is not valid for a PVC (for + example, too long). \n An existing PVC with that name + that is not owned by the pod will *not* be used for + the pod to avoid using an unrelated volume by mistake. + Starting the pod is then blocked until the unrelated + PVC is removed. If such a pre-created PVC is meant + to be used by the pod, the PVC has to updated with + an owner reference to the pod once the pod exists. + Normally this should not be necessary, but it may + be useful when manually reconstructing a broken cluster. + \n This field is read-only and no changes will be + made by Kubernetes to the PVC after it has been created. + \n Required, must not be nil." + properties: + metadata: + description: May contain labels and annotations + that will be copied into the PVC when creating + it. No other fields are allowed and will be rejected + during validation. + properties: + annotations: + additionalProperties: + type: string + type: object + finalizers: + items: + type: string + type: array + labels: + additionalProperties: + type: string + type: object + name: + type: string + namespace: + type: string + type: object + spec: + description: The specification for the PersistentVolumeClaim. + The entire content is copied unchanged into the + PVC that gets created from this template. The + same fields as in a PersistentVolumeClaim are + also valid here. + properties: + accessModes: + description: 'accessModes contains the desired + access modes the volume should have. More + info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' + items: + type: string + type: array + dataSource: + description: 'dataSource field can be used to + specify either: * An existing VolumeSnapshot + object (snapshot.storage.k8s.io/VolumeSnapshot) + * An existing PVC (PersistentVolumeClaim) + If the provisioner or an external controller + can support the specified data source, it + will create a new volume based on the contents + of the specified data source. When the AnyVolumeDataSource + feature gate is enabled, dataSource contents + will be copied to dataSourceRef, and dataSourceRef + contents will be copied to dataSource when + dataSourceRef.namespace is not specified. + If the namespace is specified, then dataSourceRef + will not be copied to dataSource.' + properties: + apiGroup: + description: APIGroup is the group for the + resource being referenced. If APIGroup + is not specified, the specified Kind must + be in the core API group. For any other + third-party types, APIGroup is required. + type: string + kind: + description: Kind is the type of resource + being referenced + type: string + name: + description: Name is the name of resource + being referenced + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + dataSourceRef: + description: 'dataSourceRef specifies the object + from which to populate the volume with data, + if a non-empty volume is desired. This may + be any object from a non-empty API group (non + core object) or a PersistentVolumeClaim object. + When this field is specified, volume binding + will only succeed if the type of the specified + object matches some installed volume populator + or dynamic provisioner. This field will replace + the functionality of the dataSource field + and as such if both fields are non-empty, + they must have the same value. For backwards + compatibility, when namespace isn''t specified + in dataSourceRef, both fields (dataSource + and dataSourceRef) will be set to the same + value automatically if one of them is empty + and the other is non-empty. When namespace + is specified in dataSourceRef, dataSource + isn''t set to the same value and must be empty. + There are three important differences between + dataSource and dataSourceRef: * While dataSource + only allows two specific types of objects, + dataSourceRef allows any non-core object, + as well as PersistentVolumeClaim objects. + * While dataSource ignores disallowed values + (dropping them), dataSourceRef preserves all + values, and generates an error if a disallowed + value is specified. * While dataSource only + allows local objects, dataSourceRef allows + objects in any namespaces. (Beta) Using this + field requires the AnyVolumeDataSource feature + gate to be enabled. (Alpha) Using the namespace + field of dataSourceRef requires the CrossNamespaceVolumeDataSource + feature gate to be enabled.' + properties: + apiGroup: + description: APIGroup is the group for the + resource being referenced. If APIGroup + is not specified, the specified Kind must + be in the core API group. For any other + third-party types, APIGroup is required. + type: string + kind: + description: Kind is the type of resource + being referenced + type: string + name: + description: Name is the name of resource + being referenced + type: string + namespace: + description: Namespace is the namespace + of resource being referenced Note that + when a namespace is specified, a gateway.networking.k8s.io/ReferenceGrant + object is required in the referent namespace + to allow that namespace's owner to accept + the reference. See the ReferenceGrant + documentation for details. (Alpha) This + field requires the CrossNamespaceVolumeDataSource + feature gate to be enabled. + type: string + required: + - kind + - name + type: object + resources: + description: 'resources represents the minimum + resources the volume should have. If RecoverVolumeExpansionFailure + feature is enabled users are allowed to specify + resource requirements that are lower than + previous value but must still be higher than + capacity recorded in the status field of the + claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' + properties: + claims: + description: "Claims lists the names of + resources, defined in spec.resourceClaims, + that are used by this container. \n This + is an alpha field and requires enabling + the DynamicResourceAllocation feature + gate. \n This field is immutable. It can + only be set for containers." + items: + description: ResourceClaim references + one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name + of one entry in pod.spec.resourceClaims + of the Pod where this field is used. + It makes that resource available + inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + 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-resources-containers/' + 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. Requests cannot exceed Limits. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + selector: + description: selector is a label query over + volumes to consider for binding. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The requirements + are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + storageClassName: + description: 'storageClassName is the name of + the StorageClass required by the claim. More + info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' + type: string + volumeMode: + description: volumeMode defines what type of + volume is required by the claim. Value of + Filesystem is implied when not included in + claim spec. + type: string + volumeName: + description: volumeName is the binding reference + to the PersistentVolume backing this claim. + type: string + type: object + required: + - spec + type: object + 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: 'fsType is the 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: 'lun is Optional: FC target lun number' + format: int32 + type: integer + readOnly: + description: 'readOnly is Optional: Defaults to false + (read/write). ReadOnly here will force the ReadOnly + setting in VolumeMounts.' + type: boolean + targetWWNs: + description: 'targetWWNs is Optional: FC target worldwide + names (WWNs)' + items: + type: string + type: array + wwids: + description: 'wwids 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: fsType is the 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: 'options is Optional: this field holds + extra command options if any.' + type: object + readOnly: + description: 'readOnly is Optional: defaults to false + (read/write). ReadOnly here will force the ReadOnly + setting in VolumeMounts.' + type: boolean + secretRef: + description: 'secretRef is 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 + x-kubernetes-map-type: atomic + 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: datasetName is Name of the dataset stored + as metadata -> name on the dataset for Flocker should + be considered as deprecated + type: string + datasetUUID: + description: datasetUUID is the 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: 'fsType is 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: 'partition is 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: 'pdName is 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: directory is the 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 is the URL + type: string + revision: + description: revision is the 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: 'endpoints 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: chapAuthDiscovery defines whether support + iSCSI Discovery CHAP authentication + type: boolean + chapAuthSession: + description: chapAuthSession defines whether support + iSCSI Session CHAP authentication + type: boolean + fsType: + description: 'fsType is the 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: initiatorName is the custom iSCSI Initiator + Name. If initiatorName is specified with iscsiInterface + simultaneously, new iSCSI interface : will be created for the connection. + type: string + iqn: + description: iqn is the target iSCSI Qualified Name. + type: string + iscsiInterface: + description: iscsiInterface is the interface Name that + uses an iSCSI transport. Defaults to 'default' (tcp). + type: string + lun: + description: lun represents iSCSI Target Lun number. + format: int32 + type: integer + portals: + description: portals is the 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: secretRef is the 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 + x-kubernetes-map-type: atomic + targetPortal: + description: targetPortal is 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: 'name of the volume. 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: readOnly 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: fsType is the 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: pdID is the 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: readOnly 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: projected items for all in one resources secrets, + configmaps, and downward API + properties: + defaultMode: + description: defaultMode are the mode bits used to set + permissions on created files by default. Must be an + octal value between 0000 and 0777 or a decimal value + between 0 and 511. YAML accepts both octal and decimal + values, JSON requires decimal values for mode bits. + 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: sources is the list of volume projections + items: + description: Projection that may be projected along + with other supported volume types + properties: + configMap: + description: configMap information about the configMap + data to project + properties: + items: + description: items 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: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode + bits used to set permissions on this + file. Must be an octal value between + 0000 and 0777 or a decimal value between + 0 and 511. YAML accepts both octal + and decimal values, JSON requires + decimal values for mode bits. 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: path is 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: optional specify whether the + ConfigMap or its keys must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + downwardAPI: + description: downwardAPI 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 + x-kubernetes-map-type: atomic + mode: + description: 'Optional: mode bits used + to set permissions on this file, must + be an octal value between 0000 and + 0777 or a decimal value between 0 + and 511. YAML accepts both octal and + decimal values, JSON requires decimal + values for mode bits. 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 + x-kubernetes-map-type: atomic + required: + - path + type: object + type: array + type: object + secret: + description: secret information about the secret + data to project + properties: + items: + description: items 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: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode + bits used to set permissions on this + file. Must be an octal value between + 0000 and 0777 or a decimal value between + 0 and 511. YAML accepts both octal + and decimal values, JSON requires + decimal values for mode bits. 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: path is 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: optional field specify whether + the Secret or its key must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + serviceAccountToken: + description: serviceAccountToken is 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 + 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: 'fsType is the 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: 'image is 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: 'monitors is 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: 'pool is 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 + x-kubernetes-map-type: atomic + user: + description: 'user is 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: fsType is the 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: gateway is the host address of the ScaleIO + API Gateway. + type: string + protectionDomain: + description: protectionDomain is the name of the ScaleIO + Protection Domain for the configured storage. + type: string + readOnly: + description: readOnly 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 + x-kubernetes-map-type: atomic + sslEnabled: + description: sslEnabled Flag enable/disable SSL communication + with Gateway, default false + type: boolean + storageMode: + description: storageMode indicates whether the storage + for a volume should be ThickProvisioned or ThinProvisioned. + Default is ThinProvisioned. + type: string + storagePool: + description: storagePool is the ScaleIO Storage Pool + associated with the protection domain. + type: string + system: + description: system is the name of the storage system + as configured in ScaleIO. + type: string + volumeName: + description: volumeName is 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: 'defaultMode is Optional: mode bits used + to set permissions on created files by default. Must + be an octal value between 0000 and 0777 or a decimal + value between 0 and 511. YAML accepts both octal and + decimal values, JSON requires decimal values for mode + bits. 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 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: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode bits used + to set permissions on this file. Must be an + octal value between 0000 and 0777 or a decimal + value between 0 and 511. YAML accepts both octal + and decimal values, JSON requires decimal values + for mode bits. 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: path is 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: optional field specify whether the Secret + or its keys must be defined + type: boolean + secretName: + description: 'secretName is the 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: fsType is the 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: readOnly 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 + x-kubernetes-map-type: atomic + 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: fsType is 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: storagePolicyID is the storage Policy Based + Management (SPBM) profile ID associated with the StoragePolicyName. + type: string + storagePolicyName: + description: storagePolicyName is the storage Policy + Based Management (SPBM) profile name. + type: string + volumePath: + description: volumePath is the path that identifies + vSphere volume vmdk + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + required: + - containers + type: object + x-kubernetes-preserve-unknown-fields: true + scripts: + description: The scripts field provided by provider, and finally this + configTemplateRefs will be rendered into the user's own configuration + file according to the user's cluster. Cannot be updated. + items: + properties: + defaultMode: + description: 'defaultMode is optional: mode bits used to set + permissions on created files by default. Must be an octal + value between 0000 and 0777 or a decimal value between 0 and + 511. YAML accepts both octal and decimal values, JSON requires + decimal values for mode bits. 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 + name: + description: Specify the name of configuration template. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + namespace: + default: default + description: Specify the namespace of the referenced the configuration + template ConfigMap object. An empty namespace is equivalent + to the "default" namespace. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$ + type: string + templateRef: + description: Specify the name of the referenced the configuration + template ConfigMap object. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + volumeName: + description: volumeName is the volume name of PodTemplate, which + the configuration file produced through the configuration + template will be mounted to the corresponding volume. Must + be a DNS_LABEL name. The volume name must be defined in podSpec.containers[*].volumeMounts. + maxLength: 63 + pattern: ^[a-z]([a-z0-9\-]*[a-z0-9])?$ + type: string + required: + - name + - templateRef + - volumeName + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + serviceKind: + description: ServiceKind defines what kind of well-known service that + the component provides (e.g., MySQL, Redis, ETCD, case insensitive). + Cannot be updated. + maxLength: 32 + type: string + serviceRefDeclarations: + description: ServiceRefDeclarations is used to declare the service + reference of the current component. Cannot be updated. + items: + properties: + name: + description: The name of the service reference declaration. + The service reference can come from an external service that + is not part of KubeBlocks, or services provided by other KubeBlocks + Cluster objects. The specific type of service reference depends + on the binding declaration when creates a Cluster. + type: string + serviceRefDeclarationSpecs: + description: serviceRefDeclarationSpecs is a collection of service + descriptions for a service reference declaration. Each ServiceRefDeclarationSpec + defines a service Kind and Version. When multiple ServiceRefDeclarationSpecs + are defined, it indicates that the ServiceRefDeclaration can + be any one of the specified ServiceRefDeclarationSpecs. For + example, when the ServiceRefDeclaration is declared to require + an OLTP database, which can be either MySQL or PostgreSQL, + you can define a ServiceRefDeclarationSpec for MySQL and another + ServiceRefDeclarationSpec for PostgreSQL, when referencing + the service within the cluster, as long as the serviceKind + and serviceVersion match either MySQL or PostgreSQL, it can + be used. + items: + properties: + serviceKind: + description: service kind, indicating the type or nature + of the service. It should be well-known application + cluster type, e.g. {mysql, redis, mongodb}. The serviceKind + is case-insensitive and supports abbreviations for some + well-known databases. For example, both 'zk' and 'zookeeper' + will be considered as a ZooKeeper cluster, and 'pg', + 'postgres', 'postgresql' will all be considered as a + PostgreSQL cluster. + type: string + serviceVersion: + description: The service version of the service reference. + It is a regular expression that matches a version number + pattern. For example, `^8.0.8$`, `8.0.\d{1,2}$`, `^[v\-]*?(\d{1,2}\.){0,3}\d{1,2}$` + type: string + required: + - serviceKind + - serviceVersion + type: object + type: array + required: + - name + - serviceRefDeclarationSpecs + type: object + type: array + serviceVersion: + description: ServiceVersion defines the version of the well-known + service that the component provides. Cannot be updated. + maxLength: 32 + type: string + services: + description: Services defines endpoints that can be used to access + the component service to manage the component. In addition, a reserved + headless service will be created by default, with the name pattern + {clusterName}-{componentName}-headless. Cannot be updated. + items: + properties: + annotations: + additionalProperties: + type: string + description: 'If ServiceType is LoadBalancer, cloud provider + related parameters can be put here More info: https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer.' + type: object + generatePodOrdinalService: + default: false + description: 'GeneratePodOrdinalService indicates whether to + create a corresponding Service for each Pod of the selected + Component. If sets to true, a set of Service will be automatically + generated for each Pod. And Service.RoleSelector will be ignored. + They can be referred to by adding the PodOrdinal to the defined + ServiceName with named pattern -. + And the Service.Name will also be generated with named pattern + -. The PodOrdinal is zero-based, + and the number of generated Services is equal to the number + of replicas of the Component. For example, a Service might + be defined as follows: - name: my-service serviceName: my-service + generatePodOrdinalService: true spec: type: NodePort ports: + - name: http port: 80 targetPort: 8080 Assuming that the Component + has 3 replicas, then three services would be generated: my-service-0, + my-service-1, and my-service-2, each pointing to its respective + Pod.' + type: boolean + name: + description: Name defines the name of the service. otherwise, + it indicates the name of the service. Others can refer to + this service by its name. (e.g., connection credential) Cannot + be updated. + type: string + roleSelector: + description: RoleSelector extends the ServiceSpec.Selector by + allowing you to specify defined role as selector for the service. + if GeneratePodOrdinalService sets to true, RoleSelector will + be ignored. + type: string + serviceName: + description: 'ServiceName defines the name of the underlying + service object. If not specified, the default service name + with different patterns will be used: - : for + cluster-level services - -: + for component-level services Only one default service name + is allowed. Cannot be updated.' + type: string + spec: + description: Spec defines the behavior of a service. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + properties: + allocateLoadBalancerNodePorts: + description: allocateLoadBalancerNodePorts defines if NodePorts + will be automatically allocated for services with type + LoadBalancer. Default is "true". It may be set to "false" + if the cluster load-balancer does not rely on NodePorts. If + the caller requests specific NodePorts (by specifying + a value), those requests will be respected, regardless + of this field. This field may only be set for services + with type LoadBalancer and will be cleared if the type + is changed to any other type. + type: boolean + clusterIP: + description: 'clusterIP is the IP address of the service + and is usually assigned randomly. If an address is specified + manually, is in-range (as per system configuration), and + is not in use, it will be allocated to the service; otherwise + creation of the service will fail. This field may not + be changed through updates unless the type field is also + being changed to ExternalName (which requires this field + to be blank) or the type field is being changed from ExternalName + (in which case this field may optionally be specified, + as describe above). Valid values are "None", empty string + (""), or a valid IP address. Setting this to "None" makes + a "headless service" (no virtual IP), which is useful + when direct endpoint connections are preferred and proxying + is not required. Only applies to types ClusterIP, NodePort, + and LoadBalancer. If this field is specified when creating + a Service of type ExternalName, creation will fail. This + field will be wiped when updating a Service to type ExternalName. + More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies' + type: string + clusterIPs: + description: "ClusterIPs is a list of IP addresses assigned + to this service, and are usually assigned randomly. If + an address is specified manually, is in-range (as per + system configuration), and is not in use, it will be allocated + to the service; otherwise creation of the service will + fail. This field may not be changed through updates unless + the type field is also being changed to ExternalName (which + requires this field to be empty) or the type field is + being changed from ExternalName (in which case this field + may optionally be specified, as describe above). Valid + values are \"None\", empty string (\"\"), or a valid IP + address. Setting this to \"None\" makes a \"headless + service\" (no virtual IP), which is useful when direct + endpoint connections are preferred and proxying is not + required. Only applies to types ClusterIP, NodePort, + and LoadBalancer. If this field is specified when creating + a Service of type ExternalName, creation will fail. This + field will be wiped when updating a Service to type ExternalName. + \ If this field is not specified, it will be initialized + from the clusterIP field. If this field is specified, + clients must ensure that clusterIPs[0] and clusterIP have + the same value. \n This field may hold a maximum of two + entries (dual-stack IPs, in either order). These IPs must + correspond to the values of the ipFamilies field. Both + clusterIPs and ipFamilies are governed by the ipFamilyPolicy + field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies" + items: + type: string + type: array + x-kubernetes-list-type: atomic + externalIPs: + description: externalIPs is a list of IP addresses for which + nodes in the cluster will also accept traffic for this + service. These IPs are not managed by Kubernetes. The + user is responsible for ensuring that traffic arrives + at a node with this IP. A common example is external + load-balancers that are not part of the Kubernetes system. + items: + type: string + type: array + externalName: + description: externalName is the external reference that + discovery mechanisms will return as an alias for this + service (e.g. a DNS CNAME record). No proxying will be + involved. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) + and requires `type` to be "ExternalName". + type: string + externalTrafficPolicy: + description: externalTrafficPolicy describes how nodes distribute + service traffic they receive on one of the Service's "externally-facing" + addresses (NodePorts, ExternalIPs, and LoadBalancer IPs). + If set to "Local", the proxy will configure the service + in a way that assumes that external load balancers will + take care of balancing the service traffic between nodes, + and so each node will deliver traffic only to the node-local + endpoints of the service, without masquerading the client + source IP. (Traffic mistakenly sent to a node with no + endpoints will be dropped.) The default value, "Cluster", + uses the standard behavior of routing to all endpoints + evenly (possibly modified by topology and other features). + Note that traffic sent to an External IP or LoadBalancer + IP from within the cluster will always get "Cluster" semantics, + but clients sending to a NodePort from within the cluster + may need to take traffic policy into account when picking + a node. + type: string + healthCheckNodePort: + description: healthCheckNodePort specifies the healthcheck + nodePort for the service. This only applies when type + is set to LoadBalancer and externalTrafficPolicy is set + to Local. If a value is specified, is in-range, and is + not in use, it will be used. If not specified, a value + will be automatically allocated. External systems (e.g. + load-balancers) can use this port to determine if a given + node holds endpoints for this service or not. If this + field is specified when creating a Service which does + not need it, creation will fail. This field will be wiped + when updating a Service to no longer need it (e.g. changing + type). This field cannot be updated once set. + format: int32 + type: integer + internalTrafficPolicy: + description: InternalTrafficPolicy describes how nodes distribute + service traffic they receive on the ClusterIP. If set + to "Local", the proxy will assume that pods only want + to talk to endpoints of the service on the same node as + the pod, dropping the traffic if there are no local endpoints. + The default value, "Cluster", uses the standard behavior + of routing to all endpoints evenly (possibly modified + by topology and other features). + type: string + ipFamilies: + description: "IPFamilies is a list of IP families (e.g. + IPv4, IPv6) assigned to this service. This field is usually + assigned automatically based on cluster configuration + and the ipFamilyPolicy field. If this field is specified + manually, the requested family is available in the cluster, + and ipFamilyPolicy allows it, it will be used; otherwise + creation of the service will fail. This field is conditionally + mutable: it allows for adding or removing a secondary + IP family, but it does not allow changing the primary + IP family of the Service. Valid values are \"IPv4\" and + \"IPv6\". This field only applies to Services of types + ClusterIP, NodePort, and LoadBalancer, and does apply + to \"headless\" services. This field will be wiped when + updating a Service to type ExternalName. \n This field + may hold a maximum of two entries (dual-stack families, + in either order). These families must correspond to the + values of the clusterIPs field, if specified. Both clusterIPs + and ipFamilies are governed by the ipFamilyPolicy field." + items: + description: IPFamily represents the IP Family (IPv4 or + IPv6). This type is used to express the family of an + IP expressed by a type (e.g. service.spec.ipFamilies). + type: string + type: array + x-kubernetes-list-type: atomic + ipFamilyPolicy: + description: IPFamilyPolicy represents the dual-stack-ness + requested or required by this Service. If there is no + value provided, then this field will be set to SingleStack. + Services can be "SingleStack" (a single IP family), "PreferDualStack" + (two IP families on dual-stack configured clusters or + a single IP family on single-stack clusters), or "RequireDualStack" + (two IP families on dual-stack configured clusters, otherwise + fail). The ipFamilies and clusterIPs fields depend on + the value of this field. This field will be wiped when + updating a service to type ExternalName. + type: string + loadBalancerClass: + description: loadBalancerClass is the class of the load + balancer implementation this Service belongs to. If specified, + the value of this field must be a label-style identifier, + with an optional prefix, e.g. "internal-vip" or "example.com/internal-vip". + Unprefixed names are reserved for end-users. This field + can only be set when the Service type is 'LoadBalancer'. + If not set, the default load balancer implementation is + used, today this is typically done through the cloud provider + integration, but should apply for any default implementation. + If set, it is assumed that a load balancer implementation + is watching for Services with a matching class. Any default + load balancer implementation (e.g. cloud providers) should + ignore Services that set this field. This field can only + be set when creating or updating a Service to type 'LoadBalancer'. + Once set, it can not be changed. This field will be wiped + when a service is updated to a non 'LoadBalancer' type. + type: string + loadBalancerIP: + description: 'Only applies to Service Type: LoadBalancer. + This feature depends on whether the underlying cloud-provider + supports specifying the loadBalancerIP when a load balancer + is created. This field will be ignored if the cloud-provider + does not support the feature. Deprecated: This field was + under-specified and its meaning varies across implementations. + Using it is non-portable and it may not support dual-stack. + Users are encouraged to use implementation-specific annotations + when available.' + type: string + loadBalancerSourceRanges: + description: 'If specified and supported by the platform, + this will restrict traffic through the cloud-provider + load-balancer will be restricted to the specified client + IPs. This field will be ignored if the cloud-provider + does not support the feature." More info: https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/' + items: + type: string + type: array + ports: + description: 'The list of ports that are exposed by this + service. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies' + items: + description: ServicePort contains information on service's + port. + properties: + appProtocol: + description: "The application protocol for this port. + This is used as a hint for implementations to offer + richer behavior for protocols that they understand. + This field follows standard Kubernetes label syntax. + Valid values are either: \n * Un-prefixed protocol + names - reserved for IANA standard service names + (as per RFC-6335 and https://www.iana.org/assignments/service-names). + \n * Kubernetes-defined prefixed names: * 'kubernetes.io/h2c' + - HTTP/2 over cleartext as described in https://www.rfc-editor.org/rfc/rfc7540 + * 'kubernetes.io/ws' - WebSocket over cleartext + as described in https://www.rfc-editor.org/rfc/rfc6455 + * 'kubernetes.io/wss' - WebSocket over TLS as described + in https://www.rfc-editor.org/rfc/rfc6455 \n * Other + protocols should use implementation-defined prefixed + names such as mycompany.com/my-custom-protocol." + type: string + name: + description: The name of this port within the service. + This must be a DNS_LABEL. All ports within a ServiceSpec + must have unique names. When considering the endpoints + for a Service, this must match the 'name' field + in the EndpointPort. Optional if only one ServicePort + is defined on this service. + type: string + nodePort: + description: 'The port on each node on which this + service is exposed when type is NodePort or LoadBalancer. Usually + assigned by the system. If a value is specified, + in-range, and not in use it will be used, otherwise + the operation will fail. If not specified, a port + will be allocated if this Service requires one. If + this field is specified when creating a Service + which does not need it, creation will fail. This + field will be wiped when updating a Service to no + longer need it (e.g. changing type from NodePort + to ClusterIP). More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport' + format: int32 + type: integer + port: + description: The port that will be exposed by this + service. + format: int32 + type: integer + protocol: + default: TCP + description: The IP protocol for this port. Supports + "TCP", "UDP", and "SCTP". Default is TCP. + type: string + targetPort: + anyOf: + - type: integer + - type: string + description: 'Number or name of the port to access + on the pods targeted by the service. Number must + be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + If this is a string, it will be looked up as a named + port in the target Pod''s container ports. If this + is not specified, the value of the ''port'' field + is used (an identity map). This field is ignored + for services with clusterIP=None, and should be + omitted or set equal to the ''port'' field. More + info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service' + x-kubernetes-int-or-string: true + required: + - port + type: object + type: array + x-kubernetes-list-map-keys: + - port + - protocol + x-kubernetes-list-type: map + publishNotReadyAddresses: + description: publishNotReadyAddresses indicates that any + agent which deals with endpoints for this Service should + disregard any indications of ready/not-ready. The primary + use case for setting this field is for a StatefulSet's + Headless Service to propagate SRV DNS records for its + Pods for the purpose of peer discovery. The Kubernetes + controllers that generate Endpoints and EndpointSlice + resources for Services interpret this to mean that all + endpoints are considered "ready" even if the Pods themselves + are not. Agents which consume only Kubernetes generated + endpoints through the Endpoints or EndpointSlice resources + can safely assume this behavior. + type: boolean + selector: + additionalProperties: + type: string + description: 'Route service traffic to pods with label keys + and values matching this selector. If empty or not present, + the service is assumed to have an external process managing + its endpoints, which Kubernetes will not modify. Only + applies to types ClusterIP, NodePort, and LoadBalancer. + Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/' + type: object + x-kubernetes-map-type: atomic + sessionAffinity: + description: 'Supports "ClientIP" and "None". Used to maintain + session affinity. Enable client IP based session affinity. + Must be ClientIP or None. Defaults to None. More info: + https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies' + type: string + sessionAffinityConfig: + description: sessionAffinityConfig contains the configurations + of session affinity. + properties: + clientIP: + description: clientIP contains the configurations of + Client IP based session affinity. + properties: + timeoutSeconds: + description: timeoutSeconds specifies the seconds + of ClientIP type session sticky time. The value + must be >0 && <=86400(for 1 day) if ServiceAffinity + == "ClientIP". Default value is 10800(for 3 hours). + format: int32 + type: integer + type: object + type: object + type: + description: 'type determines how the Service is exposed. + Defaults to ClusterIP. Valid options are ExternalName, + ClusterIP, NodePort, and LoadBalancer. "ClusterIP" allocates + a cluster-internal IP address for load-balancing to endpoints. + Endpoints are determined by the selector or if that is + not specified, by manual construction of an Endpoints + object or EndpointSlice objects. If clusterIP is "None", + no virtual IP is allocated and the endpoints are published + as a set of endpoints rather than a virtual IP. "NodePort" + builds on ClusterIP and allocates a port on every node + which routes to the same endpoints as the clusterIP. "LoadBalancer" + builds on NodePort and creates an external load-balancer + (if supported in the current cloud) which routes to the + same endpoints as the clusterIP. "ExternalName" aliases + this service to the specified externalName. Several other + fields do not apply to ExternalName services. More info: + https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types' + type: string + type: object + required: + - name + type: object + type: array + systemAccounts: + description: 'SystemAccounts defines the pre-defined system accounts + required to manage the component. TODO(component): accounts KB required + Cannot be updated.' + items: + properties: + initAccount: + default: false + description: InitAccount indicates whether this is the unique + system initialization account (e.g., MySQL root). Only one + system init account is allowed. Cannot be updated. + type: boolean + name: + description: The name of the account. Others can refer to this + account by the name. Cannot be updated. + type: string + passwordGenerationPolicy: + description: PasswordGenerationPolicy defines the policy for + generating the account's password. Cannot be updated. + properties: + length: + default: 16 + description: length defines the length of password. + format: int32 + maximum: 32 + minimum: 8 + type: integer + letterCase: + default: MixedCases + description: letterCase defines to use lower-cases, upper-cases + or mixed-cases of letters. + type: string + numDigits: + default: 4 + description: numDigits defines number of digits. + format: int32 + maximum: 8 + minimum: 0 + type: integer + numSymbols: + default: 0 + description: numSymbols defines number of symbols. + format: int32 + maximum: 8 + minimum: 0 + type: integer + type: object + secretRef: + description: SecretRef specifies the secret from which data + will be copied to create the new account. Cannot be updated. + properties: + name: + description: name refers to the name of the secret. + type: string + namespace: + description: namespace refers to the namespace of the secret. + type: string + required: + - name + - namespace + type: object + statement: + description: Statement specifies the statement used to create + the account with required privileges. Cannot be updated. + type: string + required: + - name + type: object + type: array + updateStrategy: + default: Serial + description: UpdateStrategy defines the strategy for updating the + component instance. Cannot be updated. + enum: + - Serial + - BestEffortParallel + - Parallel + type: string + vars: + description: Vars represents user-defined variables. These variables + can be utilized as environment variables for Pods and Actions, or + to render the templates of config and script. When used as environment + variables, these variables are placed in front of the environment + variables declared in the Pod. Cannot be updated. + items: + description: EnvVar represents a variable present in the env of + Pod/Action or the template of config/script. + properties: + name: + description: Name of the variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded using + the previously defined variables in the current context. If + a variable cannot be resolved, the reference in the input + string will be unchanged. Double $$ are reduced to a single + $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless of whether + the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the 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 + x-kubernetes-map-type: atomic + credentialVarRef: + description: Selects a defined var of a Credential (SystemAccount). + properties: + compDef: + description: CompDef specifies the definition used by + the component that the referent object resident in. + type: string + name: + description: Name of the referent object. + type: string + optional: + description: Specify whether the object must be defined. + type: boolean + password: + description: VarOption defines whether a variable is + required or optional. + enum: + - Required + - Optional + type: string + username: + description: VarOption defines whether a variable is + required or optional. + enum: + - Required + - Optional + type: string + type: object + secretKeyRef: + description: Selects a key of a Secret. + 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 + x-kubernetes-map-type: atomic + serviceRefVarRef: + description: Selects a defined var of a ServiceRef. + properties: + compDef: + description: CompDef specifies the definition used by + the component that the referent object resident in. + type: string + endpoint: + description: VarOption defines whether a variable is + required or optional. + enum: + - Required + - Optional + type: string + name: + description: Name of the referent object. + type: string + optional: + description: Specify whether the object must be defined. + type: boolean + password: + description: VarOption defines whether a variable is + required or optional. + enum: + - Required + - Optional + type: string + port: + description: VarOption defines whether a variable is + required or optional. + enum: + - Required + - Optional + type: string + username: + description: VarOption defines whether a variable is + required or optional. + enum: + - Required + - Optional + type: string + type: object + serviceVarRef: + description: Selects a defined var of a Service. + properties: + compDef: + description: CompDef specifies the definition used by + the component that the referent object resident in. + type: string + generatePodOrdinalServiceVar: + default: false + description: 'GeneratePodOrdinalServiceVar indicates + whether to create a corresponding ServiceVars reference + variable for each Pod. If set to true, a set of ServiceVars + that can be referenced will be automatically generated + for each Pod Ordinal. They can be referred to by adding + the PodOrdinal to the defined name template with named + pattern $_. For example, + a ServiceVarRef might be defined as follows: - name: + MY_SERVICE_PORT valueFrom: serviceVarRef: compDef: + my-component-definition name: my-service optional: + true generatePodOrdinalServiceVar: true port: name: + redis-sentinel Assuming that the Component has 3 replicas, + then you can reference the port of existing services + named my-service-0, my-service-1, and my-service-2 + with $MY_SERVICE_PORT_0, $MY_SERVICE_PORT_1, and $MY_SERVICE_PORT_2, + respectively. It should be used in conjunction with + Service.GeneratePodOrdinalService.' + type: boolean + host: + description: VarOption defines whether a variable is + required or optional. + enum: + - Required + - Optional + type: string + name: + description: Name of the referent object. + type: string + nodePort: + properties: + name: + type: string + option: + description: VarOption defines whether a variable + is required or optional. + enum: + - Required + - Optional + type: string + type: object + optional: + description: Specify whether the object must be defined. + type: boolean + port: + properties: + name: + type: string + option: + description: VarOption defines whether a variable + is required or optional. + enum: + - Required + - Optional + type: string + type: object + type: object + type: object + required: + - name + type: object + type: array + volumes: + description: Volumes defines the persistent volumes needed by the + component. The users are responsible for providing these volumes + when creating a component instance. Cannot be updated. + items: + properties: + highWatermark: + default: 0 + description: HighWatermark defines the high watermark threshold + for the volume space usage. If there is any specified volumes + who's space usage is over the threshold, the pre-defined "LOCK" + action will be triggered to degrade the service to protect + volume from space exhaustion, such as to set the instance + as read-only. And after that, if all volumes' space usage + drops under the threshold later, the pre-defined "UNLOCK" + action will be performed to recover the service normally. + Cannot be updated. + maximum: 100 + minimum: 0 + type: integer + name: + description: 'The Name of the volume. Must be a DNS_LABEL and + unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + Cannot be updated.' + type: string + needSnapshot: + default: false + description: NeedSnapshot indicates whether the volume need + to snapshot when making a backup for the component. Cannot + be updated. + type: boolean + required: + - name + type: object + type: array + required: + - runtime + type: object + status: + description: ComponentDefinitionStatus defines the observed state of ComponentDefinition. + properties: + message: + description: Extra message for current phase. + type: string + observedGeneration: + description: ObservedGeneration is the most recent generation observed + for this ComponentDefinition. + format: int64 + type: integer + phase: + description: Phase valid values are ``, `Available`, 'Unavailable`. + Available is ComponentDefinition become available, and can be used + for co-related objects. + enum: + - Available + - Unavailable + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.12.1 + labels: + app.kubernetes.io/name: kubeblocks + name: componentresourceconstraints.apps.kubeblocks.io +spec: + group: apps.kubeblocks.io + names: + categories: + - kubeblocks + - all + kind: ComponentResourceConstraint + listKind: ComponentResourceConstraintList + plural: componentresourceconstraints + shortNames: + - crc + singular: componentresourceconstraint + scope: Cluster + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: ComponentResourceConstraint is the Schema for the componentresourceconstraints + 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: + type: object + spec: + description: ComponentResourceConstraintSpec defines the desired state + of ComponentResourceConstraint + properties: + componentSelector: + description: componentSelector is used to bind the resource constraint + to components based on ComponentDefinition API. + items: + properties: + componentDefRef: + description: In versions prior to KB 0.8.0, ComponentDefRef + is the name of the component definition in the ClusterDefinition. + In KB 0.8.0 and later versions, ComponentDefRef is the name + of ComponentDefinition. + type: string + rules: + description: rules are the constraint rules that will be applied + to the component. + items: + type: string + type: array + required: + - componentDefRef + - rules + type: object + type: array + x-kubernetes-list-map-keys: + - componentDefRef + x-kubernetes-list-type: map + rules: + description: Component resource constraint rules. + items: + properties: + cpu: + description: The constraint for vcpu cores. + properties: + max: + anyOf: + - type: integer + - type: string + description: The maximum count of vcpu cores, [Min, Max] + defines a range for valid vcpu cores, and the value in + this range must be multiple times of Step. It's useful + to define a large number of valid values without defining + them one by one. Please see the documentation for Step + for some examples. If Slots is specified, Max, Min, and + Step are ignored + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + min: + anyOf: + - type: integer + - type: string + description: The minimum count of vcpu cores, [Min, Max] + defines a range for valid vcpu cores, and the value in + this range must be multiple times of Step. It's useful + to define a large number of valid values without defining + them one by one. Please see the documentation for Step + for some examples. If Slots is specified, Max, Min, and + Step are ignored + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + slots: + description: The valid vcpu cores, it's useful if you want + to define valid vcpu cores explicitly. If Slots is specified, + Max, Min, and Step are ignored + 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 + type: array + step: + anyOf: + - type: integer + - type: string + description: 'The minimum granularity of vcpu cores, [Min, + Max] defines a range for valid vcpu cores and the value + in this range must be multiple times of Step. For example: + 1. Min is 2, Max is 8, Step is 2, and the valid vcpu core + is {2, 4, 6, 8}. 2. Min is 0.5, Max is 2, Step is 0.5, + and the valid vcpu core is {0.5, 1, 1.5, 2}.' + 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 + memory: + description: The constraint for memory size. + properties: + maxPerCPU: + anyOf: + - type: integer + - type: string + description: 'The maximum size of memory per vcpu core, + [MinPerCPU, MaxPerCPU] defines a range for valid memory + size per vcpu core. It is useful on GCP as the ratio between + the CPU and memory may be a range. If SizePerCPU is specified, + MinPerCPU and MaxPerCPU are ignored. Reference: https://cloud.google.com/compute/docs/general-purpose-machines#custom_machine_types' + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + minPerCPU: + anyOf: + - type: integer + - type: string + description: 'The minimum size of memory per vcpu core, + [MinPerCPU, MaxPerCPU] defines a range for valid memory + size per vcpu core. It is useful on GCP as the ratio between + the CPU and memory may be a range. If SizePerCPU is specified, + MinPerCPU and MaxPerCPU are ignored. Reference: https://cloud.google.com/compute/docs/general-purpose-machines#custom_machine_types' + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + sizePerCPU: + anyOf: + - type: integer + - type: string + description: 'The size of memory per vcpu core. For example: + 1Gi, 200Mi. If SizePerCPU is specified, MinPerCPU and + MaxPerCPU are ignore.' + 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 + name: + description: The name of the constraint. + type: string + storage: + description: The constraint for storage size. + properties: + max: + anyOf: + - type: integer + - type: string + default: 10Ti + description: The maximum size of storage. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + min: + anyOf: + - type: integer + - type: string + default: 20Gi + description: The minimum size of storage. + 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 + required: + - cpu + - memory + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + selector: + description: selector is used to bind the resource constraint to cluster + definitions based on ClusterDefinition API. + items: + properties: + clusterDefRef: + description: clusterDefRef is the name of the cluster definition. + type: string + components: + description: selector is used to bind the resource constraint + to components. + items: + properties: + componentDefRef: + description: In versions prior to KB 0.8.0, ComponentDefRef + is the name of the component definition in the ClusterDefinition. + In KB 0.8.0 and later versions, ComponentDefRef is the + name of ComponentDefinition. + type: string + rules: + description: rules are the constraint rules that will + be applied to the component. + items: + type: string + type: array + required: + - componentDefRef + - rules + type: object + type: array + x-kubernetes-list-map-keys: + - componentDefRef + x-kubernetes-list-type: map + required: + - clusterDefRef + - components + type: object + type: array + x-kubernetes-list-map-keys: + - clusterDefRef + x-kubernetes-list-type: map + required: + - rules + type: object + type: object + served: true + storage: true +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.12.1 + labels: + app.kubernetes.io/name: kubeblocks + name: components.apps.kubeblocks.io +spec: + group: apps.kubeblocks.io + names: + categories: + - kubeblocks + - all + kind: Component + listKind: ComponentList + plural: components + shortNames: + - cmp + singular: component + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: component definition + jsonPath: .spec.compDef + name: COMPONENT-DEFINITION + type: string + - description: status phase + jsonPath: .status.phase + name: STATUS + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: Component is the Schema for the components 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: + type: object + spec: + description: ComponentSpec defines the desired state of Component + properties: + affinity: + properties: + nodeLabels: + additionalProperties: + type: string + description: nodeLabels describes that pods must be scheduled + to the nodes with the specified node labels. + type: object + podAntiAffinity: + default: Preferred + description: podAntiAffinity describes the anti-affinity level + of pods within a component. Preferred means try spread pods + by `TopologyKeys`. Required means must spread pods by `TopologyKeys`. + enum: + - Preferred + - Required + type: string + tenancy: + default: SharedNode + description: tenancy describes how pods are distributed across + node. SharedNode means multiple pods may share the same node. + DedicatedNode means each pod runs on their own dedicated node. + enum: + - SharedNode + - DedicatedNode + type: string + topologyKeys: + description: topologyKey is the key of node labels. Nodes that + have a label with this key and identical values are considered + to be in the same topology. It's used as the topology domain + for pod anti-affinity and pod spread constraint. Some well-known + label keys, such as "kubernetes.io/hostname" and "topology.kubernetes.io/zone" + are often used as TopologyKey, as well as any other custom label + key. + items: + type: string + type: array + x-kubernetes-list-type: set + type: object + classDefRef: + description: classDefRef references the class defined in ComponentClassDefinition. + properties: + class: + description: Class refers to the name of the class that is defined + in the ComponentClassDefinition. + type: string + name: + description: Name refers to the name of the ComponentClassDefinition. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + required: + - class + type: object + compDef: + description: compDef is the name of the referenced componentDefinition. + type: string + configs: + items: + properties: + asEnvFrom: + description: 'asEnvFrom is optional: the list of containers + will be injected into EnvFrom.' + items: + type: string + type: array + x-kubernetes-list-type: set + constraintRef: + description: Specify the name of the referenced the configuration + constraints object. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + defaultMode: + description: 'defaultMode is optional: mode bits used to set + permissions on created files by default. Must be an octal + value between 0000 and 0777 or a decimal value between 0 and + 511. YAML accepts both octal and decimal values, JSON requires + decimal values for mode bits. 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 + keys: + description: Specify a list of keys. If empty, ConfigConstraint + takes effect for all keys in configmap. + items: + type: string + type: array + x-kubernetes-list-type: set + legacyRenderedConfigSpec: + description: 'lazyRenderedConfigSpec is optional: specify the + secondary rendered config spec.' + properties: + namespace: + default: default + description: Specify the namespace of the referenced the + configuration template ConfigMap object. An empty namespace + is equivalent to the "default" namespace. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$ + type: string + policy: + default: none + description: policy defines how to merge external imported + templates into component templates. + enum: + - patch + - replace + - none + type: string + templateRef: + description: Specify the name of the referenced the configuration + template ConfigMap object. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + required: + - templateRef + type: object + name: + description: Specify the name of configuration template. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + namespace: + default: default + description: Specify the namespace of the referenced the configuration + template ConfigMap object. An empty namespace is equivalent + to the "default" namespace. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$ + type: string + templateRef: + description: Specify the name of the referenced the configuration + template ConfigMap object. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + volumeName: + description: volumeName is the volume name of PodTemplate, which + the configuration file produced through the configuration + template will be mounted to the corresponding volume. Must + be a DNS_LABEL name. The volume name must be defined in podSpec.containers[*].volumeMounts. + maxLength: 63 + pattern: ^[a-z]([a-z0-9\-]*[a-z0-9])?$ + type: string + required: + - name + - templateRef + - volumeName + type: object + type: array + enabledLogs: + description: enabledLogs indicates which log file takes effect in + the database cluster. element is the log type which is defined in + ComponentDefinition logConfig.name, and will set relative variables + about this log type in database kernel. + items: + type: string + type: array + x-kubernetes-list-type: set + instances: + description: Instances defines the list of instance to be deleted + priorly + items: + type: string + type: array + monitor: + default: false + description: monitor is a switch to enable monitoring and is set as + false by default. KubeBlocks provides an extension mechanism to + support component level monitoring, which will scrape metrics auto + or manually from servers in component and export metrics to Time + Series Database. + type: boolean + nodes: + description: Nodes defines the list of nodes that pods can schedule + If the RsmTransformPolicy is specified as OneToMul,the list of nodes + will be used. If the list of nodes is empty, no specific node will + be assigned. However, if the list of node is filled, all pods will + be evenly scheduled across the nodes in the list. + items: + description: "NodeName is a type that holds a api.Node's Name identifier. + Being a type captures intent and helps make sure that the node + name is not confused with similar concepts (the hostname, the + cloud provider id, the cloud provider name etc) \n To clarify + the various types: \n - Node.Name is the Name field of the Node + in the API. This should be stored in a NodeName. Unfortunately, + because Name is part of ObjectMeta, we can't store it as a NodeName + at the API level. \n - Hostname is the hostname of the local machine + (from uname -n). However, some components allow the user to pass + in a --hostname-override flag, which will override this in most + places. In the absence of anything more meaningful, kubelet will + use Hostname as the Node.Name when it creates the Node. \n * The + cloudproviders have the own names: GCE has InstanceName, AWS has + InstanceId. \n For GCE, InstanceName is the Name of an Instance + object in the GCE API. On GCE, Instance.Name becomes the Hostname, + and thus it makes sense also to use it as the Node.Name. But + that is GCE specific, and it is up to the cloudprovider how to + do this mapping. \n For AWS, the InstanceID is not yet suitable + for use as a Node.Name, so we actually use the PrivateDnsName + for the Node.Name. And this is _not_ always the same as the hostname: + if we are using a custom DHCP domain it won't be." + type: string + type: array + replicas: + default: 1 + description: Component replicas. The default value is used in ClusterDefinition + spec if not specified. + format: int32 + minimum: 0 + type: integer + resources: + description: Resources requests and limits of workload. + properties: + claims: + description: "Claims lists the names of resources, defined in + spec.resourceClaims, that are used by this container. \n This + is an alpha field and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It can only be set + for containers." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry in pod.spec.resourceClaims + of the Pod where this field is used. It makes that resource + available inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + 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-resources-containers/' + 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. Requests cannot exceed Limits. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + x-kubernetes-preserve-unknown-fields: true + rsmTransformPolicy: + default: ToSts + description: 'RsmTransformPolicy defines the policy generate sts using + rsm. ToSts: rsm transform to statefulSet ToPod: rsm transform to + pods' + enum: + - ToPod + - ToSts + type: string + serviceAccountName: + description: serviceAccountName is the name of the ServiceAccount + that running component depends on. + type: string + serviceRefs: + description: 'serviceRefs define service references for the current + component. Based on the referenced services, they can be categorized + into two types: Service provided by external sources: These services + are provided by external sources and are not managed by KubeBlocks. + They can be Kubernetes-based or non-Kubernetes services. For external + services, you need to provide an additional ServiceDescriptor object + to establish the service binding. Service provided by other KubeBlocks + clusters: These services are provided by other KubeBlocks clusters. + You can bind to these services by specifying the name of the hosting + cluster. Each type of service reference requires specific configurations + and bindings to establish the connection and interaction with the + respective services. It should be noted that the ServiceRef has + cluster-level semantic consistency, meaning that within the same + Cluster, service references with the same ServiceRef.Name are considered + to be the same service. It is only allowed to bind to the same Cluster + or ServiceDescriptor.' + items: + properties: + cluster: + description: 'When referencing a service provided by other KubeBlocks + cluster, you need to provide the name of the Cluster being + referenced. By default, when other KubeBlocks Cluster are + referenced, the ClusterDefinition.spec.connectionCredential + secret corresponding to the referenced Cluster will be used + to bind to the current component. Currently, if a KubeBlocks + cluster is to be referenced, the connection credential secret + should include and correspond to the following fields: endpoint, + port, username, and password. Under this referencing approach, + the ServiceKind and ServiceVersion of service reference declaration + defined in the ClusterDefinition will not be validated. If + both Cluster and ServiceDescriptor are specified, the Cluster + takes precedence.' + type: string + name: + description: name of the service reference declaration. references + the serviceRefDeclaration name defined in clusterDefinition.componentDefs[*].serviceRefDeclarations[*].name + type: string + namespace: + description: namespace defines the namespace of the referenced + Cluster or the namespace of the referenced ServiceDescriptor + object. If not set, the referenced Cluster and ServiceDescriptor + will be searched in the namespace of the current cluster by + default. + type: string + serviceDescriptor: + description: serviceDescriptor defines the service descriptor + of the service provided by external sources. When referencing + a service provided by external sources, you need to provide + the ServiceDescriptor object name to establish the service + binding. And serviceDescriptor is the name of the ServiceDescriptor + object, furthermore, the ServiceDescriptor.spec.serviceKind + and ServiceDescriptor.spec.serviceVersion should match clusterDefinition.componentDefs[*].serviceRefDeclarations[*].serviceRefDeclarationSpecs[*].serviceKind + and the regular expression defines in clusterDefinition.componentDefs[*].serviceRefDeclarations[*].serviceRefDeclarationSpecs[*].serviceVersion. + If both Cluster and ServiceDescriptor are specified, the Cluster + takes precedence. + type: string + required: + - name + type: object + type: array + tlsConfig: + properties: + enable: + default: false + type: boolean + issuer: + description: Issuer defines Tls certs issuer + properties: + name: + default: KubeBlocks + description: 'Name of issuer. Options supported: - KubeBlocks + - Certificates signed by KubeBlocks Operator. - UserProvided + - User provided own CA-signed certificates.' + enum: + - KubeBlocks + - UserProvided + type: string + secretRef: + description: secretRef. TLS certs Secret reference required + when from is UserProvided + properties: + ca: + description: CA cert key in Secret + type: string + cert: + description: Cert key in Secret + type: string + key: + description: Key of TLS private key in Secret + type: string + name: + description: Name of the Secret + type: string + required: + - ca + - cert + - key + - name + type: object + required: + - name + type: object + type: object + tolerations: + items: + description: The pod this Toleration is attached to tolerates any + taint that matches the triple using the matching + operator . + properties: + effect: + description: Effect indicates the taint effect to match. Empty + means match all taint effects. When specified, allowed values + are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: Key is the taint key that the toleration applies + to. Empty means match all taint keys. If the key is empty, + operator must be Exists; this combination means to match all + values and all keys. + type: string + operator: + description: Operator represents a key's relationship to the + value. Valid operators are Exists and Equal. Defaults to Equal. + Exists is equivalent to wildcard for value, so that a pod + can tolerate all taints of a particular category. + type: string + tolerationSeconds: + description: TolerationSeconds represents the period of time + the toleration (which must be of effect NoExecute, otherwise + this field is ignored) tolerates the taint. By default, it + is not set, which means tolerate the taint forever (do not + evict). Zero and negative values will be treated as 0 (evict + immediately) by the system. + format: int64 + type: integer + value: + description: Value is the taint value the toleration matches + to. If the operator is Exists, the value should be empty, + otherwise just a regular string. + type: string + type: object + type: array + updateStrategy: + description: UpdateStrategy defines Cluster Component update strategy. + enum: + - Serial + - BestEffortParallel + - Parallel + type: string + volumeClaimTemplates: + description: VolumeClaimTemplates information for statefulset.spec.volumeClaimTemplates. + items: + properties: + name: + description: Reference `ClusterDefinition.spec.componentDefs.containers.volumeMounts.name`. + type: string + spec: + description: spec defines the desired characteristics of a volume + requested by a pod author. + properties: + accessModes: + description: 'accessModes contains the desired access modes + the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1.' + items: + type: string + type: array + x-kubernetes-preserve-unknown-fields: true + resources: + description: 'resources represents the minimum resources + the volume should have. If RecoverVolumeExpansionFailure + feature is enabled users are allowed to specify resource + requirements that are lower than previous value but must + still be higher than capacity recorded in the status field + of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources.' + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the + DynamicResourceAllocation feature gate. \n This field + is immutable. It can only be set for containers." + items: + description: ResourceClaim references one entry in + PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry + in pod.spec.resourceClaims of the Pod where + this field is used. It makes that resource available + inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + 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-resources-containers/' + 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. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + x-kubernetes-preserve-unknown-fields: true + storageClassName: + description: 'storageClassName is the name of the StorageClass + required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1.' + type: string + volumeMode: + description: volumeMode defines what type of volume is required + by the claim. + type: string + type: object + required: + - name + type: object + type: array + required: + - compDef + - replicas + type: object + status: + description: ComponentStatus defines the observed state of Component + properties: + conditions: + description: Describe current state of component API Resource, like + warning. + items: + description: "Condition contains details for one aspect of the current + state of this API Resource. --- This struct is intended for direct + use as an array at the field path .status.conditions. For example, + \n type FooStatus struct{ // Represents the observations of a + foo's current state. // Known .status.conditions.type are: \"Available\", + \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge + // +listType=map // +listMapKey=type Conditions []metav1.Condition + `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" + protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" + properties: + lastTransitionTime: + description: lastTransitionTime is the last time the condition + transitioned from one status to another. This should be when + the underlying condition changed. If that is not known, then + using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: message is a human readable message indicating + details about the transition. This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: observedGeneration represents the .metadata.generation + that the condition was set based upon. For instance, if .metadata.generation + is currently 12, but the .status.conditions[x].observedGeneration + is 9, the condition is out of date with respect to the current + state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: reason contains a programmatic identifier indicating + the reason for the condition's last transition. Producers + of specific condition types may define expected values and + meanings for this field, and whether the values are considered + a guaranteed API. The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + --- Many .condition.type values are consistent across resources + like Available, but because arbitrary conditions can be useful + (see .node.status.conditions), the ability to deconflict is + important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + message: + additionalProperties: + type: string + description: message records the component details message in current + phase. Keys are podName or deployName or statefulSetName. The format + is `ObjectKind/Name`. + type: object + observedGeneration: + description: observedGeneration is the most recent generation observed + for this Component. It corresponds to the Cluster's generation, + which is updated on mutation by the API Server. + format: int64 + type: integer + phase: + description: 'phase describes the phase of the component and the detail + information of the phases are as following: Creating: `Creating` + is a special `Updating` with previous phase `empty`(means "") or + `Creating`. Running: component replicas > 0 and all pod specs are + latest with a Running state. Updating: component replicas > 0 and + has no failed pods. the component is being updated. Abnormal: component + replicas > 0 but having some failed pods. the component basically + works but in a fragile state. Failed: component replicas > 0 but + having some failed pods. the component doesn''t work anymore. Stopping: + component replicas = 0 and has terminating pods. Stopped: component + replicas = 0 and all pods have been deleted. Deleting: the component + is being deleted.' + enum: + - Creating + - Running + - Updating + - Stopping + - Stopped + - Deleting + - Failed + - Abnormal + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.12.1 + labels: + app.kubernetes.io/name: kubeblocks + name: configconstraints.apps.kubeblocks.io +spec: + group: apps.kubeblocks.io + names: + categories: + - kubeblocks + kind: ConfigConstraint + listKind: ConfigConstraintList + plural: configconstraints + shortNames: + - cc + singular: configconstraint + scope: Cluster + versions: + - additionalPrinterColumns: + - description: status phase + jsonPath: .status.phase + name: PHASE + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: ConfigConstraint is the Schema for the configconstraint 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: + type: object + spec: + description: ConfigConstraintSpec defines the desired state of ConfigConstraint + properties: + cfgSchemaTopLevelName: + description: cfgSchemaTopLevelName is cue type name, which generates + openapi schema. + type: string + configurationSchema: + description: configurationSchema imposes restrictions on database + parameter's rule. + properties: + cue: + description: cue that to let provider verify user configuration + through cue language. + type: string + schema: + description: schema provides a way for providers to validate the + changed parameters through json. + x-kubernetes-preserve-unknown-fields: true + type: object + downwardAPIOptions: + description: downwardAPIOptions is used to watch pod fields. + items: + properties: + command: + description: command used to execute for downwrad api. + items: + type: string + type: array + 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 + x-kubernetes-map-type: atomic + mode: + description: 'Optional: mode bits used to set permissions + on this file, must be an octal value between 0000 and + 0777 or a decimal value between 0 and 511. YAML accepts + both octal and decimal values, JSON requires decimal + values for mode bits. 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 + x-kubernetes-map-type: atomic + required: + - path + type: object + type: array + mountPoint: + description: mountPoint is the mount point of the scripts file. + maxLength: 128 + type: string + name: + description: Specify the name of the field. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + required: + - items + - mountPoint + - name + type: object + type: array + dynamicParameters: + description: dynamicParameters, list of DynamicParameter, modifications + of them trigger a config dynamic reload without process restart. + items: + type: string + type: array + x-kubernetes-list-type: set + formatterConfig: + description: formatterConfig describes the format of the configuration + file, the controller 1. parses configuration file 2. analyzes the + modified parameters 3. applies corresponding policies. + properties: + format: + description: "The configuration file format. Valid values are + ini, xml, yaml, json, hcl, dotenv, properties and toml. \n ini: + a configuration file that consists of a text-based content with + a structure and syntax comprising key–value pairs for properties, + reference wiki: https://en.wikipedia.org/wiki/INI_file xml: + reference wiki: https://en.wikipedia.org/wiki/XML yaml: a configuration + file support for complex data types and structures. json: reference + wiki: https://en.wikipedia.org/wiki/JSON hcl: : The HashiCorp + Configuration Language (HCL) is a configuration language authored + by HashiCorp, reference url: https://www.linode.com/docs/guides/introduction-to-hcl/ + dotenv: this was a plain text file with simple key–value pairs, + reference wiki: https://en.wikipedia.org/wiki/Configuration_file#MS-DOS + properties: a file extension mainly used in Java, reference + wiki: https://en.wikipedia.org/wiki/.properties toml: reference + wiki: https://en.wikipedia.org/wiki/TOML props-plus: a file + extension mainly used in Java, support CamelCase(e.g: brokerMaxConnectionsPerIp)" + enum: + - xml + - ini + - yaml + - json + - hcl + - dotenv + - toml + - properties + - redis + - props-plus + type: string + iniConfig: + description: iniConfig represents the ini options. + properties: + sectionName: + description: sectionName describes ini section. + type: string + type: object + required: + - format + type: object + immutableParameters: + description: immutableParameters describes parameters that prohibit + user from modification. + items: + type: string + type: array + x-kubernetes-list-type: set + reloadOptions: + description: reloadOptions indicates whether the process supports + reload. if set, the controller will determine the behavior of the + engine instance based on the configuration templates, restart or + reload depending on whether any parameters in the StaticParameters + have been modified. + properties: + autoTrigger: + description: autoTrigger performs the reload command. + properties: + processName: + description: processName is process name + type: string + type: object + shellTrigger: + description: shellTrigger performs the reload command. + properties: + command: + description: command used to execute for reload. + items: + type: string + type: array + sync: + description: Specify synchronize updates parameters to the + config manager. + type: boolean + required: + - command + type: object + tplScriptTrigger: + description: goTplTrigger performs the reload command. + properties: + namespace: + default: default + description: Specify the namespace of the referenced the tpl + script ConfigMap object. An empty namespace is equivalent + to the "default" namespace. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$ + type: string + scriptConfigMapRef: + description: scriptConfigMapRef used to execute for reload. + type: string + sync: + description: Specify synchronize updates parameters to the + config manager. + type: boolean + required: + - scriptConfigMapRef + type: object + unixSignalTrigger: + description: unixSignalTrigger used to reload by sending a signal. + properties: + processName: + description: processName is process name, sends unix signal + to proc. + type: string + signal: + description: 'signal is valid for unix signal. e.g: SIGHUP + url: ../../pkg/configuration/configmap/handler.go:allUnixSignals' + enum: + - SIGHUP + - SIGINT + - SIGQUIT + - SIGILL + - SIGTRAP + - SIGABRT + - SIGBUS + - SIGFPE + - SIGKILL + - SIGUSR1 + - SIGSEGV + - SIGUSR2 + - SIGPIPE + - SIGALRM + - SIGTERM + - SIGSTKFLT + - SIGCHLD + - SIGCONT + - SIGSTOP + - SIGTSTP + - SIGTTIN + - SIGTTOU + - SIGURG + - SIGXCPU + - SIGXFSZ + - SIGVTALRM + - SIGPROF + - SIGWINCH + - SIGIO + - SIGPWR + - SIGSYS + type: string + required: + - processName + - signal + type: object + type: object + scriptConfigs: + description: scriptConfigs, list of ScriptConfig, witch these scripts + can be used by volume trigger,downward trigger, or tool image + items: + properties: + namespace: + default: default + description: Specify the namespace of the referenced the tpl + script ConfigMap object. An empty namespace is equivalent + to the "default" namespace. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$ + type: string + scriptConfigMapRef: + description: scriptConfigMapRef used to execute for reload. + type: string + required: + - scriptConfigMapRef + type: object + type: array + x-kubernetes-list-map-keys: + - scriptConfigMapRef + x-kubernetes-list-type: map + selector: + description: selector is used to match the label on the pod, for example, + a pod of the primary is match on the patroni cluster. + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. + The requirements are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. A single + {key,value} in the matchLabels map is equivalent to an element + of matchExpressions, whose key field is "key", the operator + is "In", and the values array contains only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + staticParameters: + description: staticParameters, list of StaticParameter, modifications + of them trigger a process restart. + items: + type: string + type: array + x-kubernetes-list-type: set + toolsImageSpec: + description: toolConfig used to config init container. + properties: + mountPoint: + description: mountPoint is the mount point of the scripts file. + maxLength: 128 + type: string + toolConfigs: + description: toolConfig used to config init container. + items: + properties: + command: + description: exec used to execute for init containers. + items: + type: string + type: array + image: + description: tools Container image name. + type: string + name: + description: Specify the name of initContainer. Must be + a DNS_LABEL name. + maxLength: 63 + pattern: ^[a-z]([a-z0-9\-]*[a-z0-9])?$ + type: string + required: + - command + type: object + type: array + required: + - mountPoint + type: object + required: + - formatterConfig + type: object + status: + description: ConfigConstraintStatus defines the observed state of ConfigConstraint. + properties: + message: + description: message field describes the reasons of abnormal status. + type: string + observedGeneration: + description: observedGeneration is the latest generation observed + for this ClusterDefinition. It refers to the ConfigConstraint's + generation, which is updated by the API Server. + format: int64 + type: integer + phase: + description: phase is status of configuration template, when set to + CCAvailablePhase, it can be referenced by ClusterDefinition or ClusterVersion. + enum: + - Available + - Unavailable + - Deleting + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.12.1 + labels: + app.kubernetes.io/name: kubeblocks + name: configurations.apps.kubeblocks.io +spec: + group: apps.kubeblocks.io + names: + kind: Configuration + listKind: ConfigurationList + plural: configurations + singular: configuration + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: Configuration is the Schema for the configurations 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: + type: object + spec: + description: ConfigurationSpec defines the desired state of Configuration + properties: + clusterRef: + description: clusterRef references Cluster name. + type: string + x-kubernetes-validations: + - message: forbidden to update spec.clusterRef + rule: self == oldSelf + componentName: + description: componentName is cluster component name. + type: string + x-kubernetes-validations: + - message: forbidden to update spec.clusterRef + rule: self == oldSelf + configItemDetails: + description: customConfigurationItems describes user-defined config + template. + items: + properties: + configFileParams: + additionalProperties: + properties: + content: + description: fileContent indicates the configuration file + content. + type: string + parameters: + additionalProperties: + type: string + description: updated parameters for a single configuration + file. + type: object + type: object + description: configFileParams is used to set the parameters + to be updated. + type: object + configSpec: + description: configSpec is used to set the configuration template. + properties: + asEnvFrom: + description: 'asEnvFrom is optional: the list of containers + will be injected into EnvFrom.' + items: + type: string + type: array + x-kubernetes-list-type: set + constraintRef: + description: Specify the name of the referenced the configuration + constraints object. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + defaultMode: + description: 'defaultMode is optional: mode bits used to + set permissions on created files by default. Must be an + octal value between 0000 and 0777 or a decimal value between + 0 and 511. YAML accepts both octal and decimal values, + JSON requires decimal values for mode bits. 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 + keys: + description: Specify a list of keys. If empty, ConfigConstraint + takes effect for all keys in configmap. + items: + type: string + type: array + x-kubernetes-list-type: set + legacyRenderedConfigSpec: + description: 'lazyRenderedConfigSpec is optional: specify + the secondary rendered config spec.' + properties: + namespace: + default: default + description: Specify the namespace of the referenced + the configuration template ConfigMap object. An empty + namespace is equivalent to the "default" namespace. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$ + type: string + policy: + default: none + description: policy defines how to merge external imported + templates into component templates. + enum: + - patch + - replace + - none + type: string + templateRef: + description: Specify the name of the referenced the + configuration template ConfigMap object. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + required: + - templateRef + type: object + name: + description: Specify the name of configuration template. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + namespace: + default: default + description: Specify the namespace of the referenced the + configuration template ConfigMap object. An empty namespace + is equivalent to the "default" namespace. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$ + type: string + templateRef: + description: Specify the name of the referenced the configuration + template ConfigMap object. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + volumeName: + description: volumeName is the volume name of PodTemplate, + which the configuration file produced through the configuration + template will be mounted to the corresponding volume. + Must be a DNS_LABEL name. The volume name must be defined + in podSpec.containers[*].volumeMounts. + maxLength: 63 + pattern: ^[a-z]([a-z0-9\-]*[a-z0-9])?$ + type: string + required: + - name + - templateRef + - volumeName + type: object + importTemplateRef: + description: Specify the configuration template. + properties: + namespace: + default: default + description: Specify the namespace of the referenced the + configuration template ConfigMap object. An empty namespace + is equivalent to the "default" namespace. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$ + type: string + policy: + default: none + description: policy defines how to merge external imported + templates into component templates. + enum: + - patch + - replace + - none + type: string + templateRef: + description: Specify the name of the referenced the configuration + template ConfigMap object. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + required: + - templateRef + type: object + name: + description: Specify the name of configuration template. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + payload: + description: Payload holds the configuration-related rerender. + type: object + x-kubernetes-preserve-unknown-fields: true + version: + description: 'Deprecated: Please use payload instead. version + is the version of configuration template.' + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + required: + - clusterRef + - componentName + type: object + status: + description: ConfigurationStatus defines the observed state of Configuration + properties: + conditions: + description: conditions describes opsRequest detail status. + items: + description: "Condition contains details for one aspect of the current + state of this API Resource. --- This struct is intended for direct + use as an array at the field path .status.conditions. For example, + \n type FooStatus struct{ // Represents the observations of a + foo's current state. // Known .status.conditions.type are: \"Available\", + \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge + // +listType=map // +listMapKey=type Conditions []metav1.Condition + `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" + protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" + properties: + lastTransitionTime: + description: lastTransitionTime is the last time the condition + transitioned from one status to another. This should be when + the underlying condition changed. If that is not known, then + using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: message is a human readable message indicating + details about the transition. This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: observedGeneration represents the .metadata.generation + that the condition was set based upon. For instance, if .metadata.generation + is currently 12, but the .status.conditions[x].observedGeneration + is 9, the condition is out of date with respect to the current + state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: reason contains a programmatic identifier indicating + the reason for the condition's last transition. Producers + of specific condition types may define expected values and + meanings for this field, and whether the values are considered + a guaranteed API. The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + --- Many .condition.type values are consistent across resources + like Available, but because arbitrary conditions can be useful + (see .node.status.conditions), the ability to deconflict is + important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + configurationStatus: + description: configurationStatus describes the status of the component + reconfiguring. + items: + properties: + lastDoneRevision: + description: lastDoneRevision is the last done revision of configurationItem. + type: string + message: + description: message field describes the reasons of abnormal + status. + type: string + name: + description: name is a config template name. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + phase: + description: phase is status of configurationItem. + enum: + - Creating + - Init + - Running + - Pending + - Merged + - MergeFailed + - FailedAndPause + - Upgrading + - Deleting + - FailedAndRetry + - Finished + type: string + reconcileDetail: + description: reconcileDetail describes the details of the configuration + change execution. + properties: + currentRevision: + description: currentRevision is the current revision of + configurationItem. + type: string + errMessage: + description: errMessage is the error message when the configuration + change execution fails. + type: string + execResult: + description: execResult is the result of the latest execution. + type: string + expectedCount: + default: -1 + description: expectedCount is the number of pods that need + to be executed for configuration changes. + format: int32 + type: integer + policy: + description: policy is the policy of the latest execution. + type: string + succeedCount: + default: -1 + description: succeedCount is the number of pods for which + configuration changes were successfully executed. + format: int32 + type: integer + type: object + updateRevision: + description: updateRevision is the update revision of configurationItem. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + message: + description: message field describes the reasons of abnormal status. + type: string + observedGeneration: + description: observedGeneration is the latest generation observed + for this ClusterDefinition. It refers to the ConfigConstraint's + generation, which is updated by the API Server. + format: int64 + type: integer + required: + - configurationStatus + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.12.1 + labels: + app.kubernetes.io/name: kubeblocks + name: opsdefinitions.apps.kubeblocks.io +spec: + group: apps.kubeblocks.io + names: + categories: + - kubeblocks + - all + kind: OpsDefinition + listKind: OpsDefinitionList + plural: opsdefinitions + shortNames: + - od + singular: opsdefinition + scope: Cluster + versions: + - additionalPrinterColumns: + - description: OpsDefinition status phase. + jsonPath: .status.phase + name: STATUS + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: OpsDefinition is the Schema for the opsdefinitions 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: + type: object + spec: + description: OpsDefinitionSpec defines the desired state of OpsDefinition + properties: + componentDefinitionRefs: + description: componentDefinitionRefs indicates which types of componentDefinitions + are supported by the operation, and can refer some vars of the componentDefinition. + if it is set, the component that does not meet the conditions will + be intercepted. + items: + properties: + accountName: + description: the account name of the component. will inject + the account username and password to KB_ACCOUNT_USERNAME and + KB_ACCOUNT_PASSWORD in env of the job. + type: string + name: + description: refer to componentDefinition name. + maxLength: 32 + type: string + serviceName: + description: reference the services[*].name. will map the service + name and ports to KB_COMP_SVC_NAME and KB_COMP_SVC_PORT_ + in env of the job. portName will replace the characters '-' + to '_' and convert to uppercase. + type: string + varsRef: + description: varsRef defines the envs that need to be referenced + from the target component pod, and will inject to job's containers. + if it is set, will ignore the global "varsRef". + properties: + podSelectionStrategy: + default: PreferredAvailable + description: 'podSelectionStrategy how to select the target + component pod for variable references based on the strategy. + - PreferredAvailable: prioritize the selection of available + pod. - Available: only select available pod. if not found, + terminating the operation.' + enum: + - Available + - PreferredAvailable + type: string + vars: + description: List of environment variables to set in the + job's container. + items: + properties: + name: + description: Name of the variable. Must be a C_IDENTIFIER. + type: string + valueFrom: + description: Source for the variable's value. Cannot + be used if value is not empty. + properties: + envVarRef: + description: 'envVarRef defines which container + and env that the variable references from. source: + "env" or "envFrom" of the container.' + properties: + containerName: + description: container name which defines + in componentDefinition or is injected by + kubeBlocks controller. if not specified, + will use the first container by default. + type: string + envName: + description: env name, it will . + type: string + required: + - envName + type: object + type: object + required: + - name + - valueFrom + type: object + minItems: 1 + type: array + required: + - podSelectionStrategy + type: object + required: + - name + type: object + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + jobSpec: + description: jobSpec describes the job spec for the operation. + properties: + activeDeadlineSeconds: + description: Specifies the duration in seconds relative to the + startTime that the job may be continuously active before the + system tries to terminate it; value must be positive integer. + If a Job is suspended (at creation or through an update), this + timer will effectively be stopped and reset when the Job is + resumed again. + format: int64 + type: integer + backoffLimit: + description: Specifies the number of retries before marking this + job failed. Defaults to 6 + format: int32 + type: integer + backoffLimitPerIndex: + description: Specifies the limit for the number of retries within + an index before marking this index as failed. When enabled the + number of failures per index is kept in the pod's batch.kubernetes.io/job-index-failure-count + annotation. It can only be set when Job's completionMode=Indexed, + and the Pod's restart policy is Never. The field is immutable. + This field is alpha-level. It can be used when the `JobBackoffLimitPerIndex` + feature gate is enabled (disabled by default). + format: int32 + type: integer + completionMode: + description: "completionMode specifies how Pod completions are + tracked. It can be `NonIndexed` (default) or `Indexed`. \n `NonIndexed` + means that the Job is considered complete when there have been + .spec.completions successfully completed Pods. Each Pod completion + is homologous to each other. \n `Indexed` means that the Pods + of a Job get an associated completion index from 0 to (.spec.completions + - 1), available in the annotation batch.kubernetes.io/job-completion-index. + The Job is considered complete when there is one successfully + completed Pod for each index. When value is `Indexed`, .spec.completions + must be specified and `.spec.parallelism` must be less than + or equal to 10^5. In addition, The Pod name takes the form `$(job-name)-$(index)-$(random-string)`, + the Pod hostname takes the form `$(job-name)-$(index)`. \n More + completion modes can be added in the future. If the Job controller + observes a mode that it doesn't recognize, which is possible + during upgrades due to version skew, the controller skips updates + for the Job." + type: string + completions: + description: 'Specifies the desired number of successfully finished + pods the job should be run with. Setting to null means that + the success of any pod signals the success of all pods, and + allows parallelism to have any positive value. Setting to 1 + means that parallelism is limited to 1 and the success of that + pod signals the success of the job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/' + format: int32 + type: integer + manualSelector: + description: 'manualSelector controls generation of pod labels + and pod selectors. Leave `manualSelector` unset unless you are + certain what you are doing. When false or unset, the system + pick labels unique to this job and appends those labels to the + pod template. When true, the user is responsible for picking + unique labels and specifying the selector. Failure to pick + a unique label may cause this and other jobs to not function + correctly. However, You may see `manualSelector=true` in jobs + that were created with the old `extensions/v1beta1` API. More + info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#specifying-your-own-pod-selector' + type: boolean + maxFailedIndexes: + description: Specifies the maximal number of failed indexes before + marking the Job as failed, when backoffLimitPerIndex is set. + Once the number of failed indexes exceeds this number the entire + Job is marked as Failed and its execution is terminated. When + left as null the job continues execution of all of its indexes + and is marked with the `Complete` Job condition. It can only + be specified when backoffLimitPerIndex is set. It can be null + or up to completions. It is required and must be less than or + equal to 10^4 when is completions greater than 10^5. This field + is alpha-level. It can be used when the `JobBackoffLimitPerIndex` + feature gate is enabled (disabled by default). + format: int32 + type: integer + parallelism: + description: 'Specifies the maximum desired number of pods the + job should run at any given time. The actual number of pods + running in steady state will be less than this number when ((.spec.completions + - .status.successful) < .spec.parallelism), i.e. when the work + left to do is less than max parallelism. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/' + format: int32 + type: integer + podFailurePolicy: + description: "Specifies the policy of handling failed pods. In + particular, it allows to specify the set of actions and conditions + which need to be satisfied to take the associated action. If + empty, the default behaviour applies - the counter of failed + pods, represented by the jobs's .status.failed field, is incremented + and it is checked against the backoffLimit. This field cannot + be used in combination with restartPolicy=OnFailure. \n This + field is beta-level. It can be used when the `JobPodFailurePolicy` + feature gate is enabled (enabled by default)." + properties: + rules: + description: A list of pod failure policy rules. The rules + are evaluated in order. Once a rule matches a Pod failure, + the remaining of the rules are ignored. When no rule matches + the Pod failure, the default handling applies - the counter + of pod failures is incremented and it is checked against + the backoffLimit. At most 20 elements are allowed. + items: + description: PodFailurePolicyRule describes how a pod failure + is handled when the requirements are met. One of onExitCodes + and onPodConditions, but not both, can be used in each + rule. + properties: + action: + description: "Specifies the action taken on a pod failure + when the requirements are satisfied. Possible values + are: \n - FailJob: indicates that the pod's job is + marked as Failed and all running pods are terminated. + - FailIndex: indicates that the pod's index is marked + as Failed and will not be restarted. This value is + alpha-level. It can be used when the `JobBackoffLimitPerIndex` + feature gate is enabled (disabled by default). - Ignore: + indicates that the counter towards the .backoffLimit + is not incremented and a replacement pod is created. + - Count: indicates that the pod is handled in the + default way - the counter towards the .backoffLimit + is incremented. Additional values are considered to + be added in the future. Clients should react to an + unknown action by skipping the rule." + type: string + onExitCodes: + description: Represents the requirement on the container + exit codes. + properties: + containerName: + description: Restricts the check for exit codes + to the container with the specified name. When + null, the rule applies to all containers. When + specified, it should match one the container or + initContainer names in the pod template. + type: string + operator: + description: "Represents the relationship between + the container exit code(s) and the specified values. + Containers completed with success (exit code 0) + are excluded from the requirement check. Possible + values are: \n - In: the requirement is satisfied + if at least one container exit code (might be + multiple if there are multiple containers not + restricted by the 'containerName' field) is in + the set of specified values. - NotIn: the requirement + is satisfied if at least one container exit code + (might be multiple if there are multiple containers + not restricted by the 'containerName' field) is + not in the set of specified values. Additional + values are considered to be added in the future. + Clients should react to an unknown operator by + assuming the requirement is not satisfied." + type: string + values: + description: Specifies the set of values. Each returned + container exit code (might be multiple in case + of multiple containers) is checked against this + set of values with respect to the operator. The + list of values must be ordered and must not contain + duplicates. Value '0' cannot be used for the In + operator. At least one element is required. At + most 255 elements are allowed. + items: + format: int32 + type: integer + type: array + x-kubernetes-list-type: set + required: + - operator + - values + type: object + onPodConditions: + description: Represents the requirement on the pod conditions. + The requirement is represented as a list of pod condition + patterns. The requirement is satisfied if at least + one pattern matches an actual pod condition. At most + 20 elements are allowed. + items: + description: PodFailurePolicyOnPodConditionsPattern + describes a pattern for matching an actual pod condition + type. + properties: + status: + description: Specifies the required Pod condition + status. To match a pod condition it is required + that the specified status equals the pod condition + status. Defaults to True. + type: string + type: + description: Specifies the required Pod condition + type. To match a pod condition it is required + that specified type equals the pod condition + type. + type: string + required: + - status + - type + type: object + type: array + x-kubernetes-list-type: atomic + required: + - action + type: object + type: array + x-kubernetes-list-type: atomic + required: + - rules + type: object + podReplacementPolicy: + description: "podReplacementPolicy specifies when to create replacement + Pods. Possible values are: - TerminatingOrFailed means that + we recreate pods when they are terminating (has a metadata.deletionTimestamp) + or failed. - Failed means to wait until a previously created + Pod is fully terminated (has phase Failed or Succeeded) before + creating a replacement Pod. \n When using podFailurePolicy, + Failed is the the only allowed value. TerminatingOrFailed and + Failed are allowed values when podFailurePolicy is not in use. + This is an alpha field. Enable JobPodReplacementPolicy to be + able to use this field." + type: string + selector: + description: 'A label query over pods that should match the pod + count. Normally, the system sets this field for you. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors' + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. A + single {key,value} in the matchLabels map is equivalent + to an element of matchExpressions, whose key field is "key", + the operator is "In", and the values array contains only + "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + suspend: + description: suspend specifies whether the Job controller should + create Pods or not. If a Job is created with suspend set to + true, no Pods are created by the Job controller. If a Job is + suspended after creation (i.e. the flag goes from false to true), + the Job controller will delete all active Pods associated with + this Job. Users must design their workload to gracefully handle + this. Suspending a Job will reset the StartTime field of the + Job, effectively resetting the ActiveDeadlineSeconds timer too. + Defaults to false. + type: boolean + template: + description: 'Describes the pod that will be created when executing + a job. The only allowed template.spec.restartPolicy values are + "Never" or "OnFailure". More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/' + properties: + metadata: + description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata' + properties: + annotations: + additionalProperties: + type: string + type: object + finalizers: + items: + type: string + type: array + labels: + additionalProperties: + type: string + type: object + name: + type: string + namespace: + type: string + type: object + spec: + description: 'Specification of the desired behavior of the + pod. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status' + properties: + activeDeadlineSeconds: + description: Optional duration in seconds the pod may + be active on the node relative to StartTime before the + system will actively try to mark it failed and kill + associated containers. Value must be a positive integer. + format: int64 + type: integer + affinity: + description: If specified, the pod's scheduling constraints + properties: + nodeAffinity: + description: Describes node affinity scheduling rules + for the pod. + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule + pods to nodes that satisfy the affinity expressions + specified by this field, but it may choose a + node that violates one or more of the expressions. + The node that is most preferred is the one with + the greatest sum of weights, i.e. for each node + that meets all of the scheduling requirements + (resource request, requiredDuringScheduling + affinity expressions, etc.), compute a sum by + iterating through the elements of this field + and adding "weight" to the sum if the node matches + the corresponding matchExpressions; the node(s) + with the highest sum are the most preferred. + items: + description: An empty preferred scheduling term + matches all objects with implicit weight 0 + (i.e. it's a no-op). A null preferred scheduling + term matches no objects (i.e. is also a no-op). + properties: + preference: + description: A node selector term, associated + with the corresponding weight. + properties: + matchExpressions: + description: A list of node selector + requirements by node's labels. + items: + description: A node selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: The label key that + the selector applies to. + type: string + operator: + description: Represents a key's + relationship to a set of values. + Valid operators are In, NotIn, + Exists, DoesNotExist. Gt, and + Lt. + type: string + values: + description: 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. + If the operator is Gt or Lt, + the values array must have a + single element, which will be + interpreted as an integer. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + description: A list of node selector + requirements by node's fields. + items: + description: A node selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: The label key that + the selector applies to. + type: string + operator: + description: Represents a key's + relationship to a set of values. + Valid operators are In, NotIn, + Exists, DoesNotExist. Gt, and + Lt. + type: string + values: + description: 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. + If the operator is Gt or Lt, + the values array must have a + single element, which will be + interpreted as an integer. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + x-kubernetes-map-type: atomic + weight: + description: Weight associated with matching + the corresponding nodeSelectorTerm, in + the range 1-100. + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the affinity requirements specified + by this field are not met at scheduling time, + the pod will not be scheduled onto the node. + If the affinity requirements specified by this + field cease to be met at some point during pod + execution (e.g. due to an update), the system + may or may not try to eventually evict the pod + from its node. + properties: + nodeSelectorTerms: + description: Required. A list of node selector + terms. The terms are ORed. + items: + description: A null or empty node selector + term matches no objects. The requirements + of them are ANDed. The TopologySelectorTerm + type implements a subset of the NodeSelectorTerm. + properties: + matchExpressions: + description: A list of node selector + requirements by node's labels. + items: + description: A node selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: The label key that + the selector applies to. + type: string + operator: + description: Represents a key's + relationship to a set of values. + Valid operators are In, NotIn, + Exists, DoesNotExist. Gt, and + Lt. + type: string + values: + description: 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. + If the operator is Gt or Lt, + the values array must have a + single element, which will be + interpreted as an integer. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + description: A list of node selector + requirements by node's fields. + items: + description: A node selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: The label key that + the selector applies to. + type: string + operator: + description: Represents a key's + relationship to a set of values. + Valid operators are In, NotIn, + Exists, DoesNotExist. Gt, and + Lt. + type: string + values: + description: 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. + If the operator is Gt or Lt, + the values array must have a + single element, which will be + interpreted as an integer. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + x-kubernetes-map-type: atomic + type: array + required: + - nodeSelectorTerms + type: object + x-kubernetes-map-type: atomic + type: object + podAffinity: + description: Describes pod affinity scheduling rules + (e.g. co-locate this pod in the same node, zone, + etc. as some other pod(s)). + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule + pods to nodes that satisfy the affinity expressions + specified by this field, but it may choose a + node that violates one or more of the expressions. + The node that is most preferred is the one with + the greatest sum of weights, i.e. for each node + that meets all of the scheduling requirements + (resource request, requiredDuringScheduling + affinity expressions, etc.), compute a sum by + iterating through the elements of this field + and adding "weight" to the sum if the node has + pods which matches the corresponding podAffinityTerm; + the node(s) with the highest sum are the most + preferred. + items: + description: The weights of all of the matched + WeightedPodAffinityTerm fields are added per-node + to find the most preferred node(s) + properties: + podAffinityTerm: + description: Required. A pod affinity term, + associated with the corresponding weight. + properties: + labelSelector: + description: A label query over a set + of resources, in this case pods. + properties: + matchExpressions: + description: matchExpressions is + a list of label selector requirements. + The requirements are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map + of {key,value} pairs. A single + {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator is + "In", and the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaceSelector: + description: A label query over the + set of namespaces that the term applies + to. The term is applied to the union + of the namespaces selected by this + field and the ones listed in the namespaces + field. null selector and null or empty + namespaces list means "this pod's + namespace". An empty selector ({}) + matches all namespaces. + properties: + matchExpressions: + description: matchExpressions is + a list of label selector requirements. + The requirements are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map + of {key,value} pairs. A single + {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator is + "In", and the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a + static list of namespace names that + the term applies to. The term is applied + to the union of the namespaces listed + in this field and the ones selected + by namespaceSelector. null or empty + namespaces list and null namespaceSelector + means "this pod's namespace". + items: + type: string + type: array + topologyKey: + description: This pod should be co-located + (affinity) or not co-located (anti-affinity) + with the pods matching the labelSelector + in the specified namespaces, where + co-located is defined as running on + a node whose value of the label with + key topologyKey matches that of any + node on which any of the selected + pods is running. Empty topologyKey + is not allowed. + type: string + required: + - topologyKey + type: object + weight: + description: weight associated with matching + the corresponding podAffinityTerm, in + the range 1-100. + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the affinity requirements specified + by this field are not met at scheduling time, + the pod will not be scheduled onto the node. + If the affinity requirements specified by this + field cease to be met at some point during pod + execution (e.g. due to a pod label update), + the system may or may not try to eventually + evict the pod from its node. When there are + multiple elements, the lists of nodes corresponding + to each podAffinityTerm are intersected, i.e. + all terms must be satisfied. + items: + description: Defines a set of pods (namely those + matching the labelSelector relative to the + given namespace(s)) that this pod should be + co-located (affinity) or not co-located (anti-affinity) + with, where co-located is defined as running + on a node whose value of the label with key + matches that of any node on + which a pod of the set of pods is running + properties: + labelSelector: + description: A label query over a set of + resources, in this case pods. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of + {key,value} pairs. A single {key,value} + in the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are + ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaceSelector: + description: A label query over the set + of namespaces that the term applies to. + The term is applied to the union of the + namespaces selected by this field and + the ones listed in the namespaces field. + null selector and null or empty namespaces + list means "this pod's namespace". An + empty selector ({}) matches all namespaces. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of + {key,value} pairs. A single {key,value} + in the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are + ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static + list of namespace names that the term + applies to. The term is applied to the + union of the namespaces listed in this + field and the ones selected by namespaceSelector. + null or empty namespaces list and null + namespaceSelector means "this pod's namespace". + items: + type: string + type: array + topologyKey: + description: This pod should be co-located + (affinity) or not co-located (anti-affinity) + with the pods matching the labelSelector + in the specified namespaces, where co-located + is defined as running on a node whose + value of the label with key topologyKey + matches that of any node on which any + of the selected pods is running. Empty + topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + type: array + type: object + podAntiAffinity: + description: Describes pod anti-affinity scheduling + rules (e.g. avoid putting this pod in the same node, + zone, etc. as some other pod(s)). + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule + pods to nodes that satisfy the anti-affinity + expressions specified by this field, but it + may choose a node that violates one or more + of the expressions. The node that is most preferred + is the one with the greatest sum of weights, + i.e. for each node that meets all of the scheduling + requirements (resource request, requiredDuringScheduling + anti-affinity expressions, etc.), compute a + sum by iterating through the elements of this + field and adding "weight" to the sum if the + node has pods which matches the corresponding + podAffinityTerm; the node(s) with the highest + sum are the most preferred. + items: + description: The weights of all of the matched + WeightedPodAffinityTerm fields are added per-node + to find the most preferred node(s) + properties: + podAffinityTerm: + description: Required. A pod affinity term, + associated with the corresponding weight. + properties: + labelSelector: + description: A label query over a set + of resources, in this case pods. + properties: + matchExpressions: + description: matchExpressions is + a list of label selector requirements. + The requirements are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map + of {key,value} pairs. A single + {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator is + "In", and the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaceSelector: + description: A label query over the + set of namespaces that the term applies + to. The term is applied to the union + of the namespaces selected by this + field and the ones listed in the namespaces + field. null selector and null or empty + namespaces list means "this pod's + namespace". An empty selector ({}) + matches all namespaces. + properties: + matchExpressions: + description: matchExpressions is + a list of label selector requirements. + The requirements are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map + of {key,value} pairs. A single + {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator is + "In", and the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a + static list of namespace names that + the term applies to. The term is applied + to the union of the namespaces listed + in this field and the ones selected + by namespaceSelector. null or empty + namespaces list and null namespaceSelector + means "this pod's namespace". + items: + type: string + type: array + topologyKey: + description: This pod should be co-located + (affinity) or not co-located (anti-affinity) + with the pods matching the labelSelector + in the specified namespaces, where + co-located is defined as running on + a node whose value of the label with + key topologyKey matches that of any + node on which any of the selected + pods is running. Empty topologyKey + is not allowed. + type: string + required: + - topologyKey + type: object + weight: + description: weight associated with matching + the corresponding podAffinityTerm, in + the range 1-100. + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the anti-affinity requirements + specified by this field are not met at scheduling + time, the pod will not be scheduled onto the + node. If the anti-affinity requirements specified + by this field cease to be met at some point + during pod execution (e.g. due to a pod label + update), the system may or may not try to eventually + evict the pod from its node. When there are + multiple elements, the lists of nodes corresponding + to each podAffinityTerm are intersected, i.e. + all terms must be satisfied. + items: + description: Defines a set of pods (namely those + matching the labelSelector relative to the + given namespace(s)) that this pod should be + co-located (affinity) or not co-located (anti-affinity) + with, where co-located is defined as running + on a node whose value of the label with key + matches that of any node on + which a pod of the set of pods is running + properties: + labelSelector: + description: A label query over a set of + resources, in this case pods. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of + {key,value} pairs. A single {key,value} + in the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are + ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaceSelector: + description: A label query over the set + of namespaces that the term applies to. + The term is applied to the union of the + namespaces selected by this field and + the ones listed in the namespaces field. + null selector and null or empty namespaces + list means "this pod's namespace". An + empty selector ({}) matches all namespaces. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of + {key,value} pairs. A single {key,value} + in the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are + ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static + list of namespace names that the term + applies to. The term is applied to the + union of the namespaces listed in this + field and the ones selected by namespaceSelector. + null or empty namespaces list and null + namespaceSelector means "this pod's namespace". + items: + type: string + type: array + topologyKey: + description: This pod should be co-located + (affinity) or not co-located (anti-affinity) + with the pods matching the labelSelector + in the specified namespaces, where co-located + is defined as running on a node whose + value of the label with key topologyKey + matches that of any node on which any + of the selected pods is running. Empty + topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + type: array + type: object + type: object + automountServiceAccountToken: + description: AutomountServiceAccountToken indicates whether + a service account token should be automatically mounted. + type: boolean + containers: + description: List of containers belonging to the pod. + Containers cannot currently be added or removed. There + must be at least one container in a Pod. Cannot be updated. + items: + description: A single application container that you + want to run within a pod. + properties: + args: + description: 'Arguments to the entrypoint. The container + image''s CMD is used if this is not provided. + Variable references $(VAR_NAME) are expanded using + the container''s environment. If a variable cannot + be resolved, the reference in the input string + will be unchanged. Double $$ are reduced to a + single $, which allows for escaping the $(VAR_NAME) + syntax: i.e. "$$(VAR_NAME)" will produce the string + literal "$(VAR_NAME)". Escaped references will + never be expanded, regardless of whether the variable + exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + command: + description: 'Entrypoint array. Not executed within + a shell. The container image''s ENTRYPOINT is + used if this is not provided. Variable references + $(VAR_NAME) are expanded using the container''s + environment. If a variable cannot be resolved, + the reference in the input string will be unchanged. + Double $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" + will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. Cannot + be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + 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 previously 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. Double + $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal + "$(VAR_NAME)". Escaped references will never + be expanded, regardless of whether the variable + exists or not. 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + type: object + type: array + image: + description: 'Container 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: 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. This will be canonicalized + upon output, so case-variant + names will be understood as + the same header. + 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: Deprecated. TCPSocket is NOT + supported as a LifecycleHandler and kept + for the backward compatibility. There + are no validation of this field and lifecycle + hooks will fail in runtime when tcp handler + is specified. + 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 Pod''s termination grace + period countdown begins before the PreStop + hook is executed. Regardless of the outcome + of the handler, the container will eventually + terminate within the Pod''s termination grace + period (unless delayed by finalizers). 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: 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. This will be canonicalized + upon output, so case-variant + names will be understood as + the same header. + 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: Deprecated. TCPSocket is NOT + supported as a LifecycleHandler and kept + for the backward compatibility. There + are no validation of this field and lifecycle + hooks will fail in runtime when tcp handler + is specified. + 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: 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 + grpc: + description: GRPC specifies an action involving + a GRPC port. + properties: + port: + description: Port number of the gRPC service. + Number must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the + service to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default + behavior is defined by gRPC." + type: string + required: + - port + 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. + This will be canonicalized upon + output, so case-variant names will + be understood as the same header. + 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. + 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 + terminationGracePeriodSeconds: + description: Optional duration in seconds the + pod needs to terminate gracefully upon probe + failure. The grace period is the duration + in seconds after the processes running in + the pod are sent a termination signal and + the time when the processes are forcibly halted + with a kill signal. Set this value longer + than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds + will be used. Otherwise, this value overrides + the value provided by the pod spec. Value + must be non-negative integer. The value zero + indicates stop immediately via the kill signal + (no opportunity to shut down). This is a beta + field and requires enabling ProbeTerminationGracePeriod + feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds + is used if unset. + format: int64 + type: integer + 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. + 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. Modifying + this array with strategic merge patch may corrupt + the data. For more information See https://github.com/kubernetes/kubernetes/issues/108255. + 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: 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 + grpc: + description: GRPC specifies an action involving + a GRPC port. + properties: + port: + description: Port number of the gRPC service. + Number must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the + service to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default + behavior is defined by gRPC." + type: string + required: + - port + 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. + This will be canonicalized upon + output, so case-variant names will + be understood as the same header. + 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. + 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 + terminationGracePeriodSeconds: + description: Optional duration in seconds the + pod needs to terminate gracefully upon probe + failure. The grace period is the duration + in seconds after the processes running in + the pod are sent a termination signal and + the time when the processes are forcibly halted + with a kill signal. Set this value longer + than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds + will be used. Otherwise, this value overrides + the value provided by the pod spec. Value + must be non-negative integer. The value zero + indicates stop immediately via the kill signal + (no opportunity to shut down). This is a beta + field and requires enabling ProbeTerminationGracePeriod + feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds + is used if unset. + format: int64 + type: integer + 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 + resizePolicy: + description: Resources resize policy for the container. + items: + description: ContainerResizePolicy represents + resource resize policy for the container. + properties: + resourceName: + description: 'Name of the resource to which + this resource resize policy applies. Supported + values: cpu, memory.' + type: string + restartPolicy: + description: Restart policy to apply when + specified resource is resized. If not specified, + it defaults to NotRequired. + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + description: 'Compute Resources required by this + container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + properties: + claims: + description: "Claims lists the names of resources, + defined in spec.resourceClaims, that are used + by this container. \n This is an alpha field + and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. + It can only be set for containers." + items: + description: ResourceClaim references one + entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name + of one entry in pod.spec.resourceClaims + of the Pod where this field is used. + It makes that resource available inside + a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + 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-resources-containers/' + 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. Requests + cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + restartPolicy: + description: 'RestartPolicy defines the restart + behavior of individual containers in a pod. This + field may only be set for init containers, and + the only allowed value is "Always". For non-init + containers or when this field is not specified, + the restart behavior is defined by the Pod''s + restart policy and the container type. Setting + the RestartPolicy as "Always" for the init container + will have the following effect: this init container + will be continually restarted on exit until all + regular containers have terminated. Once all regular + containers have completed, all init containers + with restartPolicy "Always" will be shut down. + This lifecycle differs from normal init containers + and is often referred to as a "sidecar" container. + Although this init container still starts in the + init container sequence, it does not wait for + the container to complete before proceeding to + the next init container. Instead, the next init + container starts immediately after this init container + is started, or after any startupProbe has successfully + completed.' + type: string + securityContext: + description: 'SecurityContext defines the security + options the container should be run with. If set, + the fields of SecurityContext override the equivalent + fields of PodSecurityContext. 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 Note that + this field cannot be set when spec.os.name + is windows.' + type: boolean + capabilities: + description: The capabilities to add/drop when + running containers. Defaults to the default + set of capabilities granted by the container + runtime. Note that this field cannot be set + when spec.os.name is windows. + 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. Note that this field cannot be set + when spec.os.name is windows. + 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. Note that this field cannot + be set when spec.os.name is windows. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only + root filesystem. Default is false. Note that + this field cannot be set when spec.os.name + is windows. + 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. Note that this field cannot be + set when spec.os.name is windows. + 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. + Note that this field cannot be set when spec.os.name + is windows. + 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. Note that this field cannot be + set when spec.os.name is windows. + 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 + seccompProfile: + description: The seccomp options to use by this + container. If seccomp options are provided + at both the pod & container level, the container + options override the pod options. Note that + this field cannot be set when spec.os.name + is windows. + properties: + localhostProfile: + description: localhostProfile indicates + a profile defined in a file on the node + should be used. The profile must be preconfigured + on the node to work. Must be a descending + path, relative to the kubelet's configured + seccomp profile location. Must be set + if type is "Localhost". Must NOT be set + for any other type. + type: string + type: + description: "type indicates which kind + of seccomp profile will be applied. Valid + options are: \n Localhost - a profile + defined in a file on the node should be + used. RuntimeDefault - the container runtime + default profile should be used. Unconfined + - no profile should be applied." + type: string + required: + - type + 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. Note that this field cannot be + set when spec.os.name is linux. + 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. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the + name of the GMSA credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a + container should be run as a 'Host Process' + container. All of a Pod's containers must + have the same effective HostProcess value + (it is not allowed to have a mix of HostProcess + containers and non-HostProcess containers). + In addition, if HostProcess is true then + HostNetwork must also be set to true. + type: boolean + 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. + 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. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: 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 + grpc: + description: GRPC specifies an action involving + a GRPC port. + properties: + port: + description: Port number of the gRPC service. + Number must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the + service to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default + behavior is defined by gRPC." + type: string + required: + - port + 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. + This will be canonicalized upon + output, so case-variant names will + be understood as the same header. + 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. + 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 + terminationGracePeriodSeconds: + description: Optional duration in seconds the + pod needs to terminate gracefully upon probe + failure. The grace period is the duration + in seconds after the processes running in + the pod are sent a termination signal and + the time when the processes are forcibly halted + with a kill signal. Set this value longer + than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds + will be used. Otherwise, this value overrides + the value provided by the pod spec. Value + must be non-negative integer. The value zero + indicates stop immediately via the kill signal + (no opportunity to shut down). This is a beta + field and requires enabling ProbeTerminationGracePeriod + feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds + is used if unset. + format: int64 + type: integer + 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. + 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 + type: array + dnsConfig: + description: Specifies the DNS parameters of a pod. Parameters + specified here will be merged to the generated DNS configuration + based on DNSPolicy. + properties: + nameservers: + description: A list of DNS name server IP addresses. + This will be appended to the base nameservers generated + from DNSPolicy. Duplicated nameservers will be removed. + items: + type: string + type: array + options: + description: A list of DNS resolver options. This + will be merged with the base options generated from + DNSPolicy. Duplicated entries will be removed. Resolution + options given in Options will override those that + appear in the base DNSPolicy. + items: + description: PodDNSConfigOption defines DNS resolver + options of a pod. + properties: + name: + description: Required. + type: string + value: + type: string + type: object + type: array + searches: + description: A list of DNS search domains for host-name + lookup. This will be appended to the base search + paths generated from DNSPolicy. Duplicated search + paths will be removed. + items: + type: string + type: array + type: object + dnsPolicy: + description: Set DNS policy for the pod. Defaults to "ClusterFirst". + Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', + 'Default' or 'None'. DNS parameters given in DNSConfig + will be merged with the policy selected with DNSPolicy. + To have DNS options set along with hostNetwork, you + have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. + type: string + enableServiceLinks: + description: 'EnableServiceLinks indicates whether information + about services should be injected into pod''s environment + variables, matching the syntax of Docker links. Optional: + Defaults to true.' + type: boolean + ephemeralContainers: + description: List of ephemeral containers run in this + pod. Ephemeral containers may be run in an existing + pod to perform user-initiated actions such as debugging. + This list cannot be specified when creating a pod, and + it cannot be modified by updating the pod spec. In order + to add an ephemeral container to an existing pod, use + the pod's ephemeralcontainers subresource. + items: + description: "An EphemeralContainer is a temporary container + that you may add to an existing Pod for user-initiated + activities such as debugging. Ephemeral containers + have no resource or scheduling guarantees, and they + will not be restarted when they exit or when a Pod + is removed or restarted. The kubelet may evict a Pod + if an ephemeral container causes the Pod to exceed + its resource allocation. \n To add an ephemeral container, + use the ephemeralcontainers subresource of an existing + Pod. Ephemeral containers may not be removed or restarted." + properties: + args: + description: 'Arguments to the entrypoint. The image''s + CMD is used if this is not provided. Variable + references $(VAR_NAME) are expanded using the + container''s environment. If a variable cannot + be resolved, the reference in the input string + will be unchanged. Double $$ are reduced to a + single $, which allows for escaping the $(VAR_NAME) + syntax: i.e. "$$(VAR_NAME)" will produce the string + literal "$(VAR_NAME)". Escaped references will + never be expanded, regardless of whether the variable + exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + command: + description: 'Entrypoint array. Not executed within + a shell. The image''s ENTRYPOINT is used if this + is not provided. Variable references $(VAR_NAME) + are expanded using the container''s environment. + If a variable cannot be resolved, the reference + in the input string will be unchanged. Double + $$ are reduced to a single $, which allows for + escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" + will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. Cannot + be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + 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 previously 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. Double + $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal + "$(VAR_NAME)". Escaped references will never + be expanded, regardless of whether the variable + exists or not. 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + type: object + type: array + image: + description: 'Container image name. More info: https://kubernetes.io/docs/concepts/containers/images' + 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: Lifecycle is not allowed for ephemeral + containers. + 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: 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. This will be canonicalized + upon output, so case-variant + names will be understood as + the same header. + 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: Deprecated. TCPSocket is NOT + supported as a LifecycleHandler and kept + for the backward compatibility. There + are no validation of this field and lifecycle + hooks will fail in runtime when tcp handler + is specified. + 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 Pod''s termination grace + period countdown begins before the PreStop + hook is executed. Regardless of the outcome + of the handler, the container will eventually + terminate within the Pod''s termination grace + period (unless delayed by finalizers). 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: 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. This will be canonicalized + upon output, so case-variant + names will be understood as + the same header. + 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: Deprecated. TCPSocket is NOT + supported as a LifecycleHandler and kept + for the backward compatibility. There + are no validation of this field and lifecycle + hooks will fail in runtime when tcp handler + is specified. + 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: Probes are not allowed for ephemeral + containers. + properties: + exec: + description: 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 + grpc: + description: GRPC specifies an action involving + a GRPC port. + properties: + port: + description: Port number of the gRPC service. + Number must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the + service to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default + behavior is defined by gRPC." + type: string + required: + - port + 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. + This will be canonicalized upon + output, so case-variant names will + be understood as the same header. + 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. + 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 + terminationGracePeriodSeconds: + description: Optional duration in seconds the + pod needs to terminate gracefully upon probe + failure. The grace period is the duration + in seconds after the processes running in + the pod are sent a termination signal and + the time when the processes are forcibly halted + with a kill signal. Set this value longer + than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds + will be used. Otherwise, this value overrides + the value provided by the pod spec. Value + must be non-negative integer. The value zero + indicates stop immediately via the kill signal + (no opportunity to shut down). This is a beta + field and requires enabling ProbeTerminationGracePeriod + feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds + is used if unset. + format: int64 + type: integer + 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 ephemeral container specified + as a DNS_LABEL. This name must be unique among + all containers, init containers and ephemeral + containers. + type: string + ports: + description: Ports are not allowed for ephemeral + containers. + 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: Probes are not allowed for ephemeral + containers. + properties: + exec: + description: 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 + grpc: + description: GRPC specifies an action involving + a GRPC port. + properties: + port: + description: Port number of the gRPC service. + Number must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the + service to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default + behavior is defined by gRPC." + type: string + required: + - port + 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. + This will be canonicalized upon + output, so case-variant names will + be understood as the same header. + 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. + 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 + terminationGracePeriodSeconds: + description: Optional duration in seconds the + pod needs to terminate gracefully upon probe + failure. The grace period is the duration + in seconds after the processes running in + the pod are sent a termination signal and + the time when the processes are forcibly halted + with a kill signal. Set this value longer + than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds + will be used. Otherwise, this value overrides + the value provided by the pod spec. Value + must be non-negative integer. The value zero + indicates stop immediately via the kill signal + (no opportunity to shut down). This is a beta + field and requires enabling ProbeTerminationGracePeriod + feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds + is used if unset. + format: int64 + type: integer + 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 + resizePolicy: + description: Resources resize policy for the container. + items: + description: ContainerResizePolicy represents + resource resize policy for the container. + properties: + resourceName: + description: 'Name of the resource to which + this resource resize policy applies. Supported + values: cpu, memory.' + type: string + restartPolicy: + description: Restart policy to apply when + specified resource is resized. If not specified, + it defaults to NotRequired. + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + description: Resources are not allowed for ephemeral + containers. Ephemeral containers use spare resources + already allocated to the pod. + properties: + claims: + description: "Claims lists the names of resources, + defined in spec.resourceClaims, that are used + by this container. \n This is an alpha field + and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. + It can only be set for containers." + items: + description: ResourceClaim references one + entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name + of one entry in pod.spec.resourceClaims + of the Pod where this field is used. + It makes that resource available inside + a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + 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-resources-containers/' + 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. Requests + cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + restartPolicy: + description: Restart policy for the container to + manage the restart behavior of each container + within a pod. This may only be set for init containers. + You cannot set this field on ephemeral containers. + type: string + securityContext: + description: 'Optional: SecurityContext defines + the security options the ephemeral container should + be run with. If set, the fields of SecurityContext + override the equivalent fields of PodSecurityContext.' + 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 Note that + this field cannot be set when spec.os.name + is windows.' + type: boolean + capabilities: + description: The capabilities to add/drop when + running containers. Defaults to the default + set of capabilities granted by the container + runtime. Note that this field cannot be set + when spec.os.name is windows. + 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. Note that this field cannot be set + when spec.os.name is windows. + 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. Note that this field cannot + be set when spec.os.name is windows. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only + root filesystem. Default is false. Note that + this field cannot be set when spec.os.name + is windows. + 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. Note that this field cannot be + set when spec.os.name is windows. + 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. + Note that this field cannot be set when spec.os.name + is windows. + 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. Note that this field cannot be + set when spec.os.name is windows. + 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 + seccompProfile: + description: The seccomp options to use by this + container. If seccomp options are provided + at both the pod & container level, the container + options override the pod options. Note that + this field cannot be set when spec.os.name + is windows. + properties: + localhostProfile: + description: localhostProfile indicates + a profile defined in a file on the node + should be used. The profile must be preconfigured + on the node to work. Must be a descending + path, relative to the kubelet's configured + seccomp profile location. Must be set + if type is "Localhost". Must NOT be set + for any other type. + type: string + type: + description: "type indicates which kind + of seccomp profile will be applied. Valid + options are: \n Localhost - a profile + defined in a file on the node should be + used. RuntimeDefault - the container runtime + default profile should be used. Unconfined + - no profile should be applied." + type: string + required: + - type + 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. Note that this field cannot be + set when spec.os.name is linux. + 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. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the + name of the GMSA credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a + container should be run as a 'Host Process' + container. All of a Pod's containers must + have the same effective HostProcess value + (it is not allowed to have a mix of HostProcess + containers and non-HostProcess containers). + In addition, if HostProcess is true then + HostNetwork must also be set to true. + type: boolean + 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. + type: string + type: object + type: object + startupProbe: + description: Probes are not allowed for ephemeral + containers. + properties: + exec: + description: 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 + grpc: + description: GRPC specifies an action involving + a GRPC port. + properties: + port: + description: Port number of the gRPC service. + Number must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the + service to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default + behavior is defined by gRPC." + type: string + required: + - port + 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. + This will be canonicalized upon + output, so case-variant names will + be understood as the same header. + 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. + 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 + terminationGracePeriodSeconds: + description: Optional duration in seconds the + pod needs to terminate gracefully upon probe + failure. The grace period is the duration + in seconds after the processes running in + the pod are sent a termination signal and + the time when the processes are forcibly halted + with a kill signal. Set this value longer + than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds + will be used. Otherwise, this value overrides + the value provided by the pod spec. Value + must be non-negative integer. The value zero + indicates stop immediately via the kill signal + (no opportunity to shut down). This is a beta + field and requires enabling ProbeTerminationGracePeriod + feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds + is used if unset. + format: int64 + type: integer + 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 + targetContainerName: + description: "If set, the name of the container + from PodSpec that this ephemeral container targets. + The ephemeral container will be run in the namespaces + (IPC, PID, etc) of this container. If not set + then the ephemeral container uses the namespaces + configured in the Pod spec. \n The container runtime + must implement support for this feature. If the + runtime does not support namespace targeting then + the result of setting this field is undefined." + type: string + 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. + 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. Subpath mounts are not allowed for + ephemeral containers. 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 + type: array + hostAliases: + description: HostAliases is an optional list of hosts + and IPs that will be injected into the pod's hosts file + if specified. This is only valid for non-hostNetwork + pods. + items: + description: HostAlias holds the mapping between IP + and hostnames that will be injected as an entry in + the pod's hosts file. + properties: + hostnames: + description: Hostnames for the above IP address. + items: + type: string + type: array + ip: + description: IP address of the host file entry. + type: string + type: object + type: array + hostIPC: + description: 'Use the host''s ipc namespace. Optional: + Default to false.' + type: boolean + hostNetwork: + description: Host networking requested for this pod. Use + the host's network namespace. If this option is set, + the ports that will be used must be specified. Default + to false. + type: boolean + hostPID: + description: 'Use the host''s pid namespace. Optional: + Default to false.' + type: boolean + hostUsers: + description: 'Use the host''s user namespace. Optional: + Default to true. If set to true or not present, the + pod will be run in the host user namespace, useful for + when the pod needs a feature only available to the host + user namespace, such as loading a kernel module with + CAP_SYS_MODULE. When set to false, a new userns is created + for the pod. Setting false is useful for mitigating + container breakout vulnerabilities even allowing users + to run their containers as root without actually having + root privileges on the host. This field is alpha-level + and is only honored by servers that enable the UserNamespacesSupport + feature.' + type: boolean + hostname: + description: Specifies the hostname of the Pod If not + specified, the pod's hostname will be set to a system-defined + value. + type: string + imagePullSecrets: + description: 'ImagePullSecrets is an optional list of + references to secrets in the same namespace to use for + pulling any of the images used by this PodSpec. If specified, + these secrets will be passed to individual puller implementations + for them to use. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod' + items: + description: LocalObjectReference contains enough information + to let you locate the referenced object inside the + same namespace. + 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 + x-kubernetes-map-type: atomic + type: array + initContainers: + description: 'List of initialization containers belonging + to the pod. Init containers are executed in order prior + to containers being started. If any init container fails, + the pod is considered to have failed and is handled + according to its restartPolicy. The name for an init + container or normal container must be unique among all + containers. Init containers may not have Lifecycle actions, + Readiness probes, Liveness probes, or Startup probes. + The resourceRequirements of an init container are taken + into account during scheduling by finding the highest + request/limit for each resource type, and then using + the max of of that value or the sum of the normal containers. + Limits are applied to init containers in a similar fashion. + Init containers cannot currently be added or removed. + Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/' + items: + description: A single application container that you + want to run within a pod. + properties: + args: + description: 'Arguments to the entrypoint. The container + image''s CMD is used if this is not provided. + Variable references $(VAR_NAME) are expanded using + the container''s environment. If a variable cannot + be resolved, the reference in the input string + will be unchanged. Double $$ are reduced to a + single $, which allows for escaping the $(VAR_NAME) + syntax: i.e. "$$(VAR_NAME)" will produce the string + literal "$(VAR_NAME)". Escaped references will + never be expanded, regardless of whether the variable + exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + command: + description: 'Entrypoint array. Not executed within + a shell. The container image''s ENTRYPOINT is + used if this is not provided. Variable references + $(VAR_NAME) are expanded using the container''s + environment. If a variable cannot be resolved, + the reference in the input string will be unchanged. + Double $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" + will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. Cannot + be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + 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 previously 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. Double + $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal + "$(VAR_NAME)". Escaped references will never + be expanded, regardless of whether the variable + exists or not. 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + type: object + type: array + image: + description: 'Container 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: 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. This will be canonicalized + upon output, so case-variant + names will be understood as + the same header. + 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: Deprecated. TCPSocket is NOT + supported as a LifecycleHandler and kept + for the backward compatibility. There + are no validation of this field and lifecycle + hooks will fail in runtime when tcp handler + is specified. + 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 Pod''s termination grace + period countdown begins before the PreStop + hook is executed. Regardless of the outcome + of the handler, the container will eventually + terminate within the Pod''s termination grace + period (unless delayed by finalizers). 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: 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. This will be canonicalized + upon output, so case-variant + names will be understood as + the same header. + 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: Deprecated. TCPSocket is NOT + supported as a LifecycleHandler and kept + for the backward compatibility. There + are no validation of this field and lifecycle + hooks will fail in runtime when tcp handler + is specified. + 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: 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 + grpc: + description: GRPC specifies an action involving + a GRPC port. + properties: + port: + description: Port number of the gRPC service. + Number must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the + service to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default + behavior is defined by gRPC." + type: string + required: + - port + 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. + This will be canonicalized upon + output, so case-variant names will + be understood as the same header. + 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. + 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 + terminationGracePeriodSeconds: + description: Optional duration in seconds the + pod needs to terminate gracefully upon probe + failure. The grace period is the duration + in seconds after the processes running in + the pod are sent a termination signal and + the time when the processes are forcibly halted + with a kill signal. Set this value longer + than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds + will be used. Otherwise, this value overrides + the value provided by the pod spec. Value + must be non-negative integer. The value zero + indicates stop immediately via the kill signal + (no opportunity to shut down). This is a beta + field and requires enabling ProbeTerminationGracePeriod + feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds + is used if unset. + format: int64 + type: integer + 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. + 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. Modifying + this array with strategic merge patch may corrupt + the data. For more information See https://github.com/kubernetes/kubernetes/issues/108255. + 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: 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 + grpc: + description: GRPC specifies an action involving + a GRPC port. + properties: + port: + description: Port number of the gRPC service. + Number must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the + service to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default + behavior is defined by gRPC." + type: string + required: + - port + 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. + This will be canonicalized upon + output, so case-variant names will + be understood as the same header. + 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. + 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 + terminationGracePeriodSeconds: + description: Optional duration in seconds the + pod needs to terminate gracefully upon probe + failure. The grace period is the duration + in seconds after the processes running in + the pod are sent a termination signal and + the time when the processes are forcibly halted + with a kill signal. Set this value longer + than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds + will be used. Otherwise, this value overrides + the value provided by the pod spec. Value + must be non-negative integer. The value zero + indicates stop immediately via the kill signal + (no opportunity to shut down). This is a beta + field and requires enabling ProbeTerminationGracePeriod + feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds + is used if unset. + format: int64 + type: integer + 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 + resizePolicy: + description: Resources resize policy for the container. + items: + description: ContainerResizePolicy represents + resource resize policy for the container. + properties: + resourceName: + description: 'Name of the resource to which + this resource resize policy applies. Supported + values: cpu, memory.' + type: string + restartPolicy: + description: Restart policy to apply when + specified resource is resized. If not specified, + it defaults to NotRequired. + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + description: 'Compute Resources required by this + container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + properties: + claims: + description: "Claims lists the names of resources, + defined in spec.resourceClaims, that are used + by this container. \n This is an alpha field + and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. + It can only be set for containers." + items: + description: ResourceClaim references one + entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name + of one entry in pod.spec.resourceClaims + of the Pod where this field is used. + It makes that resource available inside + a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + 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-resources-containers/' + 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. Requests + cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + restartPolicy: + description: 'RestartPolicy defines the restart + behavior of individual containers in a pod. This + field may only be set for init containers, and + the only allowed value is "Always". For non-init + containers or when this field is not specified, + the restart behavior is defined by the Pod''s + restart policy and the container type. Setting + the RestartPolicy as "Always" for the init container + will have the following effect: this init container + will be continually restarted on exit until all + regular containers have terminated. Once all regular + containers have completed, all init containers + with restartPolicy "Always" will be shut down. + This lifecycle differs from normal init containers + and is often referred to as a "sidecar" container. + Although this init container still starts in the + init container sequence, it does not wait for + the container to complete before proceeding to + the next init container. Instead, the next init + container starts immediately after this init container + is started, or after any startupProbe has successfully + completed.' + type: string + securityContext: + description: 'SecurityContext defines the security + options the container should be run with. If set, + the fields of SecurityContext override the equivalent + fields of PodSecurityContext. 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 Note that + this field cannot be set when spec.os.name + is windows.' + type: boolean + capabilities: + description: The capabilities to add/drop when + running containers. Defaults to the default + set of capabilities granted by the container + runtime. Note that this field cannot be set + when spec.os.name is windows. + 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. Note that this field cannot be set + when spec.os.name is windows. + 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. Note that this field cannot + be set when spec.os.name is windows. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only + root filesystem. Default is false. Note that + this field cannot be set when spec.os.name + is windows. + 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. Note that this field cannot be + set when spec.os.name is windows. + 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. + Note that this field cannot be set when spec.os.name + is windows. + 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. Note that this field cannot be + set when spec.os.name is windows. + 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 + seccompProfile: + description: The seccomp options to use by this + container. If seccomp options are provided + at both the pod & container level, the container + options override the pod options. Note that + this field cannot be set when spec.os.name + is windows. + properties: + localhostProfile: + description: localhostProfile indicates + a profile defined in a file on the node + should be used. The profile must be preconfigured + on the node to work. Must be a descending + path, relative to the kubelet's configured + seccomp profile location. Must be set + if type is "Localhost". Must NOT be set + for any other type. + type: string + type: + description: "type indicates which kind + of seccomp profile will be applied. Valid + options are: \n Localhost - a profile + defined in a file on the node should be + used. RuntimeDefault - the container runtime + default profile should be used. Unconfined + - no profile should be applied." + type: string + required: + - type + 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. Note that this field cannot be + set when spec.os.name is linux. + 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. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the + name of the GMSA credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a + container should be run as a 'Host Process' + container. All of a Pod's containers must + have the same effective HostProcess value + (it is not allowed to have a mix of HostProcess + containers and non-HostProcess containers). + In addition, if HostProcess is true then + HostNetwork must also be set to true. + type: boolean + 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. + 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. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: 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 + grpc: + description: GRPC specifies an action involving + a GRPC port. + properties: + port: + description: Port number of the gRPC service. + Number must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the + service to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default + behavior is defined by gRPC." + type: string + required: + - port + 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. + This will be canonicalized upon + output, so case-variant names will + be understood as the same header. + 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. + 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 + terminationGracePeriodSeconds: + description: Optional duration in seconds the + pod needs to terminate gracefully upon probe + failure. The grace period is the duration + in seconds after the processes running in + the pod are sent a termination signal and + the time when the processes are forcibly halted + with a kill signal. Set this value longer + than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds + will be used. Otherwise, this value overrides + the value provided by the pod spec. Value + must be non-negative integer. The value zero + indicates stop immediately via the kill signal + (no opportunity to shut down). This is a beta + field and requires enabling ProbeTerminationGracePeriod + feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds + is used if unset. + format: int64 + type: integer + 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. + 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 + type: array + nodeName: + description: NodeName is a request to schedule this pod + onto a specific node. If it is non-empty, the scheduler + simply schedules this pod onto that node, assuming that + it fits resource requirements. + type: string + nodeSelector: + additionalProperties: + type: string + description: 'NodeSelector is a selector which must be + true for the pod to fit on a node. Selector which must + match a node''s labels for the pod to be scheduled on + that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/' + type: object + x-kubernetes-map-type: atomic + os: + description: "Specifies the OS of the containers in the + pod. Some pod and container fields are restricted if + this is set. \n If the OS field is set to linux, the + following fields must be unset: -securityContext.windowsOptions + \n If the OS field is set to windows, following fields + must be unset: - spec.hostPID - spec.hostIPC - spec.hostUsers + - spec.securityContext.seLinuxOptions - spec.securityContext.seccompProfile + - spec.securityContext.fsGroup - spec.securityContext.fsGroupChangePolicy + - spec.securityContext.sysctls - spec.shareProcessNamespace + - spec.securityContext.runAsUser - spec.securityContext.runAsGroup + - spec.securityContext.supplementalGroups - spec.containers[*].securityContext.seLinuxOptions + - spec.containers[*].securityContext.seccompProfile + - spec.containers[*].securityContext.capabilities - + spec.containers[*].securityContext.readOnlyRootFilesystem + - spec.containers[*].securityContext.privileged - spec.containers[*].securityContext.allowPrivilegeEscalation + - spec.containers[*].securityContext.procMount - spec.containers[*].securityContext.runAsUser + - spec.containers[*].securityContext.runAsGroup" + properties: + name: + description: 'Name is the name of the operating system. + The currently supported values are linux and windows. + Additional value may be defined in future and can + be one of: https://github.com/opencontainers/runtime-spec/blob/master/config.md#platform-specific-configuration + Clients should expect to handle additional values + and treat unrecognized values in this field as os: + null' + type: string + required: + - name + type: object + overhead: + 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: 'Overhead represents the resource overhead + associated with running a pod for a given RuntimeClass. + This field will be autopopulated at admission time by + the RuntimeClass admission controller. If the RuntimeClass + admission controller is enabled, overhead must not be + set in Pod create requests. The RuntimeClass admission + controller will reject Pod create requests which have + the overhead already set. If RuntimeClass is configured + and selected in the PodSpec, Overhead will be set to + the value defined in the corresponding RuntimeClass, + otherwise it will remain unset and treated as zero. + More info: https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md' + type: object + preemptionPolicy: + description: PreemptionPolicy is the Policy for preempting + pods with lower priority. One of Never, PreemptLowerPriority. + Defaults to PreemptLowerPriority if unset. + type: string + priority: + description: The priority value. Various system components + use this field to find the priority of the pod. When + Priority Admission Controller is enabled, it prevents + users from setting this field. The admission controller + populates this field from PriorityClassName. The higher + the value, the higher the priority. + format: int32 + type: integer + priorityClassName: + description: If specified, indicates the pod's priority. + "system-node-critical" and "system-cluster-critical" + are two special keywords which indicate the highest + priorities with the former being the highest priority. + Any other name must be defined by creating a PriorityClass + object with that name. If not specified, the pod priority + will be default or zero if there is no default. + type: string + readinessGates: + description: 'If specified, all readiness gates will be + evaluated for pod readiness. A pod is ready when all + its containers are ready AND all conditions specified + in the readiness gates have status equal to "True" More + info: https://git.k8s.io/enhancements/keps/sig-network/580-pod-readiness-gates' + items: + description: PodReadinessGate contains the reference + to a pod condition + properties: + conditionType: + description: ConditionType refers to a condition + in the pod's condition list with matching type. + type: string + required: + - conditionType + type: object + type: array + resourceClaims: + description: "ResourceClaims defines which ResourceClaims + must be allocated and reserved before the Pod is allowed + to start. The resources will be made available to those + containers which consume them by name. \n This is an + alpha field and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable." + items: + description: PodResourceClaim references exactly one + ResourceClaim through a ClaimSource. It adds a name + to it that uniquely identifies the ResourceClaim inside + the Pod. Containers that need access to the ResourceClaim + reference it with this name. + properties: + name: + description: Name uniquely identifies this resource + claim inside the pod. This must be a DNS_LABEL. + type: string + source: + description: Source describes where to find the + ResourceClaim. + properties: + resourceClaimName: + description: ResourceClaimName is the name of + a ResourceClaim object in the same namespace + as this pod. + type: string + resourceClaimTemplateName: + description: "ResourceClaimTemplateName is the + name of a ResourceClaimTemplate object in + the same namespace as this pod. \n The template + will be used to create a new ResourceClaim, + which will be bound to this pod. When this + pod is deleted, the ResourceClaim will also + be deleted. The pod name and resource name, + along with a generated component, will be + used to form a unique name for the ResourceClaim, + which will be recorded in pod.status.resourceClaimStatuses. + \n This field is immutable and no changes + will be made to the corresponding ResourceClaim + by the control plane after creating the ResourceClaim." + type: string + type: object + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + restartPolicy: + description: 'Restart policy for all containers within + the pod. One of Always, OnFailure, Never. In some contexts, + only a subset of those values may be permitted. Default + to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy' + type: string + runtimeClassName: + description: 'RuntimeClassName refers to a RuntimeClass + object in the node.k8s.io group, which should be used + to run this pod. If no RuntimeClass resource matches + the named class, the pod will not be run. If unset or + empty, the "legacy" RuntimeClass will be used, which + is an implicit class with an empty definition that uses + the default runtime handler. More info: https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class' + type: string + schedulerName: + description: If specified, the pod will be dispatched + by specified scheduler. If not specified, the pod will + be dispatched by default scheduler. + type: string + schedulingGates: + description: "SchedulingGates is an opaque list of values + that if specified will block scheduling the pod. If + schedulingGates is not empty, the pod will stay in the + SchedulingGated state and the scheduler will not attempt + to schedule the pod. \n SchedulingGates can only be + set at pod creation time, and be removed only afterwards. + \n This is a beta feature enabled by the PodSchedulingReadiness + feature gate." + items: + description: PodSchedulingGate is associated to a Pod + to guard its scheduling. + properties: + name: + description: Name of the scheduling gate. Each scheduling + gate must have a unique name field. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + securityContext: + description: 'SecurityContext holds pod-level security + attributes and common container settings. Optional: + Defaults to empty. See type description for default + values of each field.' + properties: + fsGroup: + description: "A special supplemental group that applies + to all containers in a pod. Some volume types allow + the Kubelet to change the ownership of that volume + to be owned by the pod: \n 1. The owning GID will + be the FSGroup 2. The setgid bit is set (new files + created in the volume will be owned by FSGroup) + 3. The permission bits are OR'd with rw-rw---- \n + If unset, the Kubelet will not modify the ownership + and permissions of any volume. Note that this field + cannot be set when spec.os.name is windows." + format: int64 + type: integer + fsGroupChangePolicy: + description: 'fsGroupChangePolicy defines behavior + of changing ownership and permission of the volume + before being exposed inside Pod. This field will + only apply to volume types which support fsGroup + based ownership(and permissions). It will have no + effect on ephemeral volume types such as: secret, + configmaps and emptydir. Valid values are "OnRootMismatch" + and "Always". If not specified, "Always" is used. + Note that this field cannot be set when spec.os.name + is windows.' + type: string + runAsGroup: + description: The GID to run the entrypoint of the + container process. Uses runtime default if unset. + May also be set in SecurityContext. If set in both + SecurityContext and PodSecurityContext, the value + specified in SecurityContext takes precedence for + that container. Note that this field cannot be set + when spec.os.name is windows. + 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 SecurityContext. 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 + SecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence for that container. Note that this + field cannot be set when spec.os.name is windows. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to + all containers. If unspecified, the container runtime + will allocate a random SELinux context for each + container. May also be set in SecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence + for that container. Note that this field cannot + be set when spec.os.name is windows. + 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 + seccompProfile: + description: The seccomp options to use by the containers + in this pod. Note that this field cannot be set + when spec.os.name is windows. + properties: + localhostProfile: + description: localhostProfile indicates a profile + defined in a file on the node should be used. + The profile must be preconfigured on the node + to work. Must be a descending path, relative + to the kubelet's configured seccomp profile + location. Must be set if type is "Localhost". + Must NOT be set for any other type. + type: string + type: + description: "type indicates which kind of seccomp + profile will be applied. Valid options are: + \n Localhost - a profile defined in a file on + the node should be used. RuntimeDefault - the + container runtime default profile should be + used. Unconfined - no profile should be applied." + type: string + required: + - type + type: object + supplementalGroups: + description: A list of groups applied to the first + process run in each container, in addition to the + container's primary GID, the fsGroup (if specified), + and group memberships defined in the container image + for the uid of the container process. If unspecified, + no additional groups are added to any container. + Note that group memberships defined in the container + image for the uid of the container process are still + effective, even if they are not included in this + list. Note that this field cannot be set when spec.os.name + is windows. + items: + format: int64 + type: integer + type: array + sysctls: + description: Sysctls hold a list of namespaced sysctls + used for the pod. Pods with unsupported sysctls + (by the container runtime) might fail to launch. + Note that this field cannot be set when spec.os.name + is windows. + items: + description: Sysctl defines a kernel parameter to + be set + properties: + name: + description: Name of a property to set + type: string + value: + description: Value of a property to set + type: string + required: + - name + - value + type: object + type: array + windowsOptions: + description: The Windows specific settings applied + to all containers. If unspecified, the options within + a container's SecurityContext will be used. If set + in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name + is linux. + 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. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name + of the GMSA credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container + should be run as a 'Host Process' container. + All of a Pod's containers must have the same + effective HostProcess value (it is not allowed + to have a mix of HostProcess containers and + non-HostProcess containers). In addition, if + HostProcess is true then HostNetwork must also + be set to true. + type: boolean + 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. + type: string + type: object + type: object + serviceAccount: + description: 'DeprecatedServiceAccount is a depreciated + alias for ServiceAccountName. Deprecated: Use serviceAccountName + instead.' + type: string + serviceAccountName: + description: 'ServiceAccountName is the name of the ServiceAccount + to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/' + type: string + setHostnameAsFQDN: + description: If true the pod's hostname will be configured + as the pod's FQDN, rather than the leaf name (the default). + In Linux containers, this means setting the FQDN in + the hostname field of the kernel (the nodename field + of struct utsname). In Windows containers, this means + setting the registry value of hostname for the registry + key HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters + to FQDN. If a pod does not have FQDN, this has no effect. + Default to false. + type: boolean + shareProcessNamespace: + description: 'Share a single process namespace between + all of the containers in a pod. When this is set containers + will be able to view and signal processes from other + containers in the same pod, and the first process in + each container will not be assigned PID 1. HostPID and + ShareProcessNamespace cannot both be set. Optional: + Default to false.' + type: boolean + subdomain: + description: If specified, the fully qualified Pod hostname + will be "...svc.". If not specified, the pod will not have a + domainname at all. + type: string + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs + to terminate gracefully. May be decreased in delete + request. Value must be non-negative integer. The value + zero indicates stop immediately via the kill signal + (no opportunity to shut down). If this value is nil, + the default grace period will be used instead. The grace + period is the duration in seconds after the processes + running in the pod are sent a termination signal and + the time when the processes are forcibly halted with + a kill signal. Set this value longer than the expected + cleanup time for your process. Defaults to 30 seconds. + format: int64 + type: integer + tolerations: + description: If specified, the pod's tolerations. + items: + description: The pod this Toleration is attached to + tolerates any taint that matches the triple + using the matching operator . + properties: + effect: + description: Effect indicates the taint effect to + match. Empty means match all taint effects. When + specified, allowed values are NoSchedule, PreferNoSchedule + and NoExecute. + type: string + key: + description: Key is the taint key that the toleration + applies to. Empty means match all taint keys. + If the key is empty, operator must be Exists; + this combination means to match all values and + all keys. + type: string + operator: + description: Operator represents a key's relationship + to the value. Valid operators are Exists and Equal. + Defaults to Equal. Exists is equivalent to wildcard + for value, so that a pod can tolerate all taints + of a particular category. + type: string + tolerationSeconds: + description: TolerationSeconds represents the period + of time the toleration (which must be of effect + NoExecute, otherwise this field is ignored) tolerates + the taint. By default, it is not set, which means + tolerate the taint forever (do not evict). Zero + and negative values will be treated as 0 (evict + immediately) by the system. + format: int64 + type: integer + value: + description: Value is the taint value the toleration + matches to. If the operator is Exists, the value + should be empty, otherwise just a regular string. + type: string + type: object + type: array + topologySpreadConstraints: + description: TopologySpreadConstraints describes how a + group of pods ought to spread across topology domains. + Scheduler will schedule pods in a way which abides by + the constraints. All topologySpreadConstraints are ANDed. + items: + description: TopologySpreadConstraint specifies how + to spread matching pods among the given topology. + properties: + labelSelector: + description: LabelSelector is used to find matching + pods. Pods that match this label selector are + counted to determine the number of pods in their + corresponding topology domain. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + description: "MatchLabelKeys is a set of pod label + keys to select the pods over which spreading will + be calculated. The keys are used to lookup values + from the incoming pod labels, those key-value + labels are ANDed with labelSelector to select + the group of existing pods over which spreading + will be calculated for the incoming pod. The same + key is forbidden to exist in both MatchLabelKeys + and LabelSelector. MatchLabelKeys cannot be set + when LabelSelector isn't set. Keys that don't + exist in the incoming pod labels will be ignored. + A null or empty list means only match against + labelSelector. \n This is a beta field and requires + the MatchLabelKeysInPodTopologySpread feature + gate to be enabled (enabled by default)." + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + description: 'MaxSkew describes the degree to which + pods may be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`, + it is the maximum permitted difference between + the number of matching pods in the target topology + and the global minimum. The global minimum is + the minimum number of matching pods in an eligible + domain or zero if the number of eligible domains + is less than MinDomains. For example, in a 3-zone + cluster, MaxSkew is set to 1, and pods with the + same labelSelector spread as 2/2/1: In this case, + the global minimum is 1. | zone1 | zone2 | zone3 + | | P P | P P | P | - if MaxSkew is 1, + incoming pod can only be scheduled to zone3 to + become 2/2/2; scheduling it onto zone1(zone2) + would make the ActualSkew(3-1) on zone1(zone2) + violate MaxSkew(1). - if MaxSkew is 2, incoming + pod can be scheduled onto any zone. When `whenUnsatisfiable=ScheduleAnyway`, + it is used to give higher precedence to topologies + that satisfy it. It''s a required field. Default + value is 1 and 0 is not allowed.' + format: int32 + type: integer + minDomains: + description: "MinDomains indicates a minimum number + of eligible domains. When the number of eligible + domains with matching topology keys is less than + minDomains, Pod Topology Spread treats \"global + minimum\" as 0, and then the calculation of Skew + is performed. And when the number of eligible + domains with matching topology keys equals or + greater than minDomains, this value has no effect + on scheduling. As a result, when the number of + eligible domains is less than minDomains, scheduler + won't schedule more than maxSkew Pods to those + domains. If value is nil, the constraint behaves + as if MinDomains is equal to 1. Valid values are + integers greater than 0. When value is not nil, + WhenUnsatisfiable must be DoNotSchedule. \n For + example, in a 3-zone cluster, MaxSkew is set to + 2, MinDomains is set to 5 and pods with the same + labelSelector spread as 2/2/2: | zone1 | zone2 + | zone3 | | P P | P P | P P | The number + of domains is less than 5(MinDomains), so \"global + minimum\" is treated as 0. In this situation, + new pod with the same labelSelector cannot be + scheduled, because computed skew will be 3(3 - + 0) if new Pod is scheduled to any of the three + zones, it will violate MaxSkew. \n This is a beta + field and requires the MinDomainsInPodTopologySpread + feature gate to be enabled (enabled by default)." + format: int32 + type: integer + nodeAffinityPolicy: + description: "NodeAffinityPolicy indicates how we + will treat Pod's nodeAffinity/nodeSelector when + calculating pod topology spread skew. Options + are: - Honor: only nodes matching nodeAffinity/nodeSelector + are included in the calculations. - Ignore: nodeAffinity/nodeSelector + are ignored. All nodes are included in the calculations. + \n If this value is nil, the behavior is equivalent + to the Honor policy. This is a beta-level feature + default enabled by the NodeInclusionPolicyInPodTopologySpread + feature flag." + type: string + nodeTaintsPolicy: + description: "NodeTaintsPolicy indicates how we + will treat node taints when calculating pod topology + spread skew. Options are: - Honor: nodes without + taints, along with tainted nodes for which the + incoming pod has a toleration, are included. - + Ignore: node taints are ignored. All nodes are + included. \n If this value is nil, the behavior + is equivalent to the Ignore policy. This is a + beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread + feature flag." + type: string + topologyKey: + description: TopologyKey is the key of node labels. + Nodes that have a label with this key and identical + values are considered to be in the same topology. + We consider each as a "bucket", and + try to put balanced number of pods into each bucket. + We define a domain as a particular instance of + a topology. Also, we define an eligible domain + as a domain whose nodes meet the requirements + of nodeAffinityPolicy and nodeTaintsPolicy. e.g. + If TopologyKey is "kubernetes.io/hostname", each + Node is a domain of that topology. And, if TopologyKey + is "topology.kubernetes.io/zone", each zone is + a domain of that topology. It's a required field. + type: string + whenUnsatisfiable: + description: 'WhenUnsatisfiable indicates how to + deal with a pod if it doesn''t satisfy the spread + constraint. - DoNotSchedule (default) tells the + scheduler not to schedule it. - ScheduleAnyway + tells the scheduler to schedule the pod in any + location, but giving higher precedence to topologies + that would help reduce the skew. A constraint + is considered "Unsatisfiable" for an incoming + pod if and only if every possible node assignment + for that pod would violate "MaxSkew" on some topology. + For example, in a 3-zone cluster, MaxSkew is set + to 1, and pods with the same labelSelector spread + as 3/1/1: | zone1 | zone2 | zone3 | | P P P | P | P | + If WhenUnsatisfiable is set to DoNotSchedule, + incoming pod can only be scheduled to zone2(zone3) + to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) + satisfies MaxSkew(1). In other words, the cluster + can still be imbalanced, but scheduler won''t + make it *more* imbalanced. It''s a required field.' + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array + x-kubernetes-list-map-keys: + - topologyKey + - whenUnsatisfiable + x-kubernetes-list-type: map + volumes: + description: 'List of volumes that can be mounted by containers + belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes' + 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: 'fsType is the 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: 'partition is 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: 'readOnly value true will force + the readOnly setting in VolumeMounts. More + info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: boolean + volumeID: + description: 'volumeID is 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: 'cachingMode is the Host Caching + mode: None, Read Only, Read Write.' + type: string + diskName: + description: diskName is the Name of the data + disk in the blob storage + type: string + diskURI: + description: diskURI is the URI of data disk + in the blob storage + type: string + fsType: + description: fsType is 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: 'kind expected values are 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: readOnly 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: readOnly defaults to false (read/write). + ReadOnly here will force the ReadOnly setting + in VolumeMounts. + type: boolean + secretName: + description: secretName is the name of secret + that contains Azure Storage Account Name and + Key + type: string + shareName: + description: shareName is the azure 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: 'monitors is 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: 'path is Optional: Used as the + mounted root, rather than the full Ceph tree, + default is /' + type: string + readOnly: + description: 'readOnly is 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: 'secretFile is 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: 'secretRef is 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 + x-kubernetes-map-type: atomic + user: + description: 'user is 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: 'fsType is the 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: 'readOnly 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: 'secretRef is 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 + x-kubernetes-map-type: atomic + volumeID: + description: 'volumeID 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: 'defaultMode is optional: mode + bits used to set permissions on created files + by default. Must be an octal value between + 0000 and 0777 or a decimal value between 0 + and 511. YAML accepts both octal and decimal + values, JSON requires decimal values for mode + bits. 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 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: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode bits + used to set permissions on this file. + Must be an octal value between 0000 + and 0777 or a decimal value between + 0 and 511. YAML accepts both octal and + decimal values, JSON requires decimal + values for mode bits. 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: path is 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: optional specify whether the ConfigMap + or its keys must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + csi: + description: csi (Container Storage Interface) represents + ephemeral storage that is handled by certain external + CSI drivers (Beta 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: fsType 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 + x-kubernetes-map-type: atomic + readOnly: + description: readOnly 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 Optional: + mode bits used to set permissions on created + files by default. Must be an octal value between + 0000 and 0777 or a decimal value between 0 + and 511. YAML accepts both octal and decimal + values, JSON requires decimal values for mode + bits. 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 + x-kubernetes-map-type: atomic + mode: + description: 'Optional: mode bits used + to set permissions on this file, must + be an octal value between 0000 and 0777 + or a decimal value between 0 and 511. + YAML accepts both octal and decimal + values, JSON requires decimal values + for mode bits. 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 + x-kubernetes-map-type: atomic + 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: 'medium represents 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: 'sizeLimit is the 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: https://kubernetes.io/docs/concepts/storage/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 + ephemeral: + description: "ephemeral represents a volume that + is handled by a cluster storage driver. The volume's + lifecycle is tied to the pod that defines it - + it will be created before the pod starts, and + deleted when the pod is removed. \n Use this if: + a) the volume is only needed while the pod runs, + b) features of normal volumes like restoring from + snapshot or capacity tracking are needed, c) the + storage driver is specified through a storage + class, and d) the storage driver supports dynamic + volume provisioning through a PersistentVolumeClaim + (see EphemeralVolumeSource for more information + on the connection between this volume type and + PersistentVolumeClaim). \n Use PersistentVolumeClaim + or one of the vendor-specific APIs for volumes + that persist for longer than the lifecycle of + an individual pod. \n Use CSI for light-weight + local ephemeral volumes if the CSI driver is meant + to be used that way - see the documentation of + the driver for more information. \n A pod can + use both types of ephemeral volumes and persistent + volumes at the same time." + properties: + volumeClaimTemplate: + description: "Will be used to create a stand-alone + PVC to provision the volume. The pod in which + this EphemeralVolumeSource is embedded will + be the owner of the PVC, i.e. the PVC will + be deleted together with the pod. The name + of the PVC will be `-` + where `` is the name from the + `PodSpec.Volumes` array entry. Pod validation + will reject the pod if the concatenated name + is not valid for a PVC (for example, too long). + \n An existing PVC with that name that is + not owned by the pod will *not* be used for + the pod to avoid using an unrelated volume + by mistake. Starting the pod is then blocked + until the unrelated PVC is removed. If such + a pre-created PVC is meant to be used by the + pod, the PVC has to updated with an owner + reference to the pod once the pod exists. + Normally this should not be necessary, but + it may be useful when manually reconstructing + a broken cluster. \n This field is read-only + and no changes will be made by Kubernetes + to the PVC after it has been created. \n Required, + must not be nil." + properties: + metadata: + description: May contain labels and annotations + that will be copied into the PVC when + creating it. No other fields are allowed + and will be rejected during validation. + properties: + annotations: + additionalProperties: + type: string + type: object + finalizers: + items: + type: string + type: array + labels: + additionalProperties: + type: string + type: object + name: + type: string + namespace: + type: string + type: object + spec: + description: The specification for the PersistentVolumeClaim. + The entire content is copied unchanged + into the PVC that gets created from this + template. The same fields as in a PersistentVolumeClaim + are also valid here. + properties: + accessModes: + description: 'accessModes contains the + desired access modes the volume should + have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' + items: + type: string + type: array + dataSource: + description: 'dataSource field can be + used to specify either: * An existing + VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) + * An existing PVC (PersistentVolumeClaim) + If the provisioner or an external + controller can support the specified + data source, it will create a new + volume based on the contents of the + specified data source. When the AnyVolumeDataSource + feature gate is enabled, dataSource + contents will be copied to dataSourceRef, + and dataSourceRef contents will be + copied to dataSource when dataSourceRef.namespace + is not specified. If the namespace + is specified, then dataSourceRef will + not be copied to dataSource.' + properties: + apiGroup: + description: APIGroup is the group + for the resource being referenced. + If APIGroup is not specified, + the specified Kind must be in + the core API group. For any other + third-party types, APIGroup is + required. + type: string + kind: + description: Kind is the type of + resource being referenced + type: string + name: + description: Name is the name of + resource being referenced + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + dataSourceRef: + description: 'dataSourceRef specifies + the object from which to populate + the volume with data, if a non-empty + volume is desired. This may be any + object from a non-empty API group + (non core object) or a PersistentVolumeClaim + object. When this field is specified, + volume binding will only succeed if + the type of the specified object matches + some installed volume populator or + dynamic provisioner. This field will + replace the functionality of the dataSource + field and as such if both fields are + non-empty, they must have the same + value. For backwards compatibility, + when namespace isn''t specified in + dataSourceRef, both fields (dataSource + and dataSourceRef) will be set to + the same value automatically if one + of them is empty and the other is + non-empty. When namespace is specified + in dataSourceRef, dataSource isn''t + set to the same value and must be + empty. There are three important differences + between dataSource and dataSourceRef: + * While dataSource only allows two + specific types of objects, dataSourceRef + allows any non-core object, as well + as PersistentVolumeClaim objects. + * While dataSource ignores disallowed + values (dropping them), dataSourceRef + preserves all values, and generates + an error if a disallowed value is + specified. * While dataSource only + allows local objects, dataSourceRef + allows objects in any namespaces. + (Beta) Using this field requires the + AnyVolumeDataSource feature gate to + be enabled. (Alpha) Using the namespace + field of dataSourceRef requires the + CrossNamespaceVolumeDataSource feature + gate to be enabled.' + properties: + apiGroup: + description: APIGroup is the group + for the resource being referenced. + If APIGroup is not specified, + the specified Kind must be in + the core API group. For any other + third-party types, APIGroup is + required. + type: string + kind: + description: Kind is the type of + resource being referenced + type: string + name: + description: Name is the name of + resource being referenced + type: string + namespace: + description: Namespace is the namespace + of resource being referenced Note + that when a namespace is specified, + a gateway.networking.k8s.io/ReferenceGrant + object is required in the referent + namespace to allow that namespace's + owner to accept the reference. + See the ReferenceGrant documentation + for details. (Alpha) This field + requires the CrossNamespaceVolumeDataSource + feature gate to be enabled. + type: string + required: + - kind + - name + type: object + resources: + description: 'resources represents the + minimum resources the volume should + have. If RecoverVolumeExpansionFailure + feature is enabled users are allowed + to specify resource requirements that + are lower than previous value but + must still be higher than capacity + recorded in the status field of the + claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' + properties: + claims: + description: "Claims lists the names + of resources, defined in spec.resourceClaims, + that are used by this container. + \n This is an alpha field and + requires enabling the DynamicResourceAllocation + feature gate. \n This field is + immutable. It can only be set + for containers." + items: + description: ResourceClaim references + one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match + the name of one entry in + pod.spec.resourceClaims + of the Pod where this field + is used. It makes that resource + available inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + 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-resources-containers/' + 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. + Requests cannot exceed Limits. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + selector: + description: selector is a label query + over volumes to consider for binding. + properties: + matchExpressions: + description: matchExpressions is + a list of label selector requirements. + The requirements are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map + of {key,value} pairs. A single + {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator is + "In", and the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + storageClassName: + description: 'storageClassName is the + name of the StorageClass required + by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' + type: string + volumeMode: + description: volumeMode defines what + type of volume is required by the + claim. Value of Filesystem is implied + when not included in claim spec. + type: string + volumeName: + description: volumeName is the binding + reference to the PersistentVolume + backing this claim. + type: string + type: object + required: + - spec + type: object + 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: 'fsType is the 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: 'lun is Optional: FC target lun + number' + format: int32 + type: integer + readOnly: + description: 'readOnly is Optional: Defaults + to false (read/write). ReadOnly here will + force the ReadOnly setting in VolumeMounts.' + type: boolean + targetWWNs: + description: 'targetWWNs is Optional: FC target + worldwide names (WWNs)' + items: + type: string + type: array + wwids: + description: 'wwids 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: fsType is the 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: 'options is Optional: this field + holds extra command options if any.' + type: object + readOnly: + description: 'readOnly is Optional: defaults + to false (read/write). ReadOnly here will + force the ReadOnly setting in VolumeMounts.' + type: boolean + secretRef: + description: 'secretRef is 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 + x-kubernetes-map-type: atomic + 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: datasetName is Name of the dataset + stored as metadata -> name on the dataset + for Flocker should be considered as deprecated + type: string + datasetUUID: + description: datasetUUID is the 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: 'fsType is 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: 'partition is 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: 'pdName is 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: directory is the 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 is the URL + type: string + revision: + description: revision is the 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: 'endpoints 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: chapAuthDiscovery defines whether + support iSCSI Discovery CHAP authentication + type: boolean + chapAuthSession: + description: chapAuthSession defines whether + support iSCSI Session CHAP authentication + type: boolean + fsType: + description: 'fsType is the 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: initiatorName is the custom iSCSI + Initiator Name. If initiatorName is specified + with iscsiInterface simultaneously, new iSCSI + interface : will + be created for the connection. + type: string + iqn: + description: iqn is the target iSCSI Qualified + Name. + type: string + iscsiInterface: + description: iscsiInterface is the interface + Name that uses an iSCSI transport. Defaults + to 'default' (tcp). + type: string + lun: + description: lun represents iSCSI Target Lun + number. + format: int32 + type: integer + portals: + description: portals is the 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: secretRef is the 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 + x-kubernetes-map-type: atomic + targetPortal: + description: targetPortal is 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: 'name of the volume. 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: readOnly 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: fsType is the 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: pdID is the 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: readOnly 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: projected items for all in one resources + secrets, configmaps, and downward API + properties: + defaultMode: + description: defaultMode are the mode bits used + to set permissions on created files by default. + Must be an octal value between 0000 and 0777 + or a decimal value between 0 and 511. YAML + accepts both octal and decimal values, JSON + requires decimal values for mode bits. 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: sources is the list of volume projections + items: + description: Projection that may be projected + along with other supported volume types + properties: + configMap: + description: configMap information about + the configMap data to project + properties: + items: + description: items 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: key is the key + to project. + type: string + mode: + description: 'mode is Optional: + mode bits used to set permissions + on this file. Must be an octal + value between 0000 and 0777 + or a decimal value between + 0 and 511. YAML accepts both + octal and decimal values, + JSON requires decimal values + for mode bits. 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: path is 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: optional specify whether + the ConfigMap or its keys must be + defined + type: boolean + type: object + x-kubernetes-map-type: atomic + downwardAPI: + description: downwardAPI 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 + x-kubernetes-map-type: atomic + mode: + description: 'Optional: mode + bits used to set permissions + on this file, must be an octal + value between 0000 and 0777 + or a decimal value between + 0 and 511. YAML accepts both + octal and decimal values, + JSON requires decimal values + for mode bits. 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 + x-kubernetes-map-type: atomic + required: + - path + type: object + type: array + type: object + secret: + description: secret information about + the secret data to project + properties: + items: + description: items 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: key is the key + to project. + type: string + mode: + description: 'mode is Optional: + mode bits used to set permissions + on this file. Must be an octal + value between 0000 and 0777 + or a decimal value between + 0 and 511. YAML accepts both + octal and decimal values, + JSON requires decimal values + for mode bits. 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: path is 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: optional field specify + whether the Secret or its key must + be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + serviceAccountToken: + description: serviceAccountToken is 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 + 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: 'fsType is the 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: 'image is 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: 'monitors is 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: 'pool is 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 + x-kubernetes-map-type: atomic + user: + description: 'user is 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: fsType is the 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: gateway is the host address of + the ScaleIO API Gateway. + type: string + protectionDomain: + description: protectionDomain is the name of + the ScaleIO Protection Domain for the configured + storage. + type: string + readOnly: + description: readOnly 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 + x-kubernetes-map-type: atomic + sslEnabled: + description: sslEnabled Flag enable/disable + SSL communication with Gateway, default false + type: boolean + storageMode: + description: storageMode indicates whether the + storage for a volume should be ThickProvisioned + or ThinProvisioned. Default is ThinProvisioned. + type: string + storagePool: + description: storagePool is the ScaleIO Storage + Pool associated with the protection domain. + type: string + system: + description: system is the name of the storage + system as configured in ScaleIO. + type: string + volumeName: + description: volumeName is 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: 'defaultMode is Optional: mode + bits used to set permissions on created files + by default. Must be an octal value between + 0000 and 0777 or a decimal value between 0 + and 511. YAML accepts both octal and decimal + values, JSON requires decimal values for mode + bits. 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 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: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode bits + used to set permissions on this file. + Must be an octal value between 0000 + and 0777 or a decimal value between + 0 and 511. YAML accepts both octal and + decimal values, JSON requires decimal + values for mode bits. 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: path is 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: optional field specify whether + the Secret or its keys must be defined + type: boolean + secretName: + description: 'secretName is the 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: fsType is the 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: readOnly 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 + x-kubernetes-map-type: atomic + 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: fsType is 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: storagePolicyID is the storage + Policy Based Management (SPBM) profile ID + associated with the StoragePolicyName. + type: string + storagePolicyName: + description: storagePolicyName is the storage + Policy Based Management (SPBM) profile name. + type: string + volumePath: + description: volumePath is the path that identifies + vSphere volume vmdk + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + required: + - containers + type: object + type: object + ttlSecondsAfterFinished: + description: ttlSecondsAfterFinished limits the lifetime of a + Job that has finished execution (either Complete or Failed). + If this field is set, ttlSecondsAfterFinished after the Job + finishes, it is eligible to be automatically deleted. When the + Job is being deleted, its lifecycle guarantees (e.g. finalizers) + will be honored. If this field is unset, the Job won't be automatically + deleted. If this field is set to zero, the Job becomes eligible + to be deleted immediately after it finishes. + format: int32 + type: integer + required: + - template + type: object + parametersSchema: + description: parametersSchema describes the schema used for validation, + pruning, and defaulting. + properties: + openAPIV3Schema: + description: 'openAPIV3Schema is the OpenAPI v3 schema to use + for parameter schema. supported properties types: - string - + number - integer - array: only supported the item with string + type.' + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + preConditions: + description: preCondition if it meets the requirements to run the + job for the operation. + items: + properties: + exec: + description: a job will be run to execute preCondition. and + the operation will be executed when the exec job is succeed. + properties: + args: + description: container args. + items: + type: string + type: array + command: + description: container commands. + items: + type: string + type: array + env: + description: container env. + 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 previously 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. + Double $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" + will produce the string literal "$(VAR_NAME)". Escaped + references will never be expanded, regardless of + whether the variable exists or not. 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + image: + description: image name. + type: string + required: + - image + type: object + rule: + description: condition declares how the operation can be executed. + properties: + expression: + description: 'expression declares how the operation can + be executed using go template expression. it should return + "true" or "false", built-in objects: - "params" are input + parameters. - "cluster" is referenced cluster object. + - "component" is referenced the component Object.' + type: string + message: + description: report the message if the rule is not matched. + type: string + required: + - expression + - message + type: object + type: object + x-kubernetes-validations: + - message: at least one exists for rule and exec. + rule: has(self.rule) || has(self.exec) + type: array + varsRef: + description: varsRef defines the envs that need to be referenced from + the target component pod, and will inject to job's containers. + properties: + podSelectionStrategy: + default: PreferredAvailable + description: 'podSelectionStrategy how to select the target component + pod for variable references based on the strategy. - PreferredAvailable: + prioritize the selection of available pod. - Available: only + select available pod. if not found, terminating the operation.' + enum: + - Available + - PreferredAvailable + type: string + vars: + description: List of environment variables to set in the job's + container. + items: + properties: + name: + description: Name of the variable. Must be a C_IDENTIFIER. + type: string + valueFrom: + description: Source for the variable's value. Cannot be + used if value is not empty. + properties: + envVarRef: + description: 'envVarRef defines which container and + env that the variable references from. source: "env" + or "envFrom" of the container.' + properties: + containerName: + description: container name which defines in componentDefinition + or is injected by kubeBlocks controller. if not + specified, will use the first container by default. + type: string + envName: + description: env name, it will . + type: string + required: + - envName + type: object + type: object + required: + - name + - valueFrom + type: object + minItems: 1 + type: array + required: + - podSelectionStrategy + type: object + required: + - jobSpec + type: object + status: + description: OpsDefinitionStatus defines the observed state of OpsDefinition + properties: + message: + description: Extra message for current phase. + type: string + observedGeneration: + description: ObservedGeneration is the most recent generation observed + for this OpsDefinition. + format: int64 + type: integer + phase: + description: Phase valid values are ``, `Available`, 'Unavailable`. + Available is OpsDefinition become available, and can be used for + co-related objects. + enum: + - Available + - Unavailable + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.12.1 + labels: + app.kubernetes.io/name: kubeblocks + name: opsrequests.apps.kubeblocks.io +spec: + group: apps.kubeblocks.io + names: + categories: + - kubeblocks + - all + kind: OpsRequest + listKind: OpsRequestList + plural: opsrequests + shortNames: + - ops + singular: opsrequest + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: Operation request type. + jsonPath: .spec.type + name: TYPE + type: string + - description: Operand cluster. + jsonPath: .spec.clusterRef + name: CLUSTER + type: string + - description: Operation status phase. + jsonPath: .status.phase + name: STATUS + type: string + - description: Operation processing progress. + jsonPath: .status.progress + name: PROGRESS + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: OpsRequest is the Schema for the opsrequests 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: + type: object + spec: + description: OpsRequestSpec defines the desired state of OpsRequest + properties: + backupSpec: + description: backupSpec defines how to backup the cluster. + properties: + backupMethod: + description: Backup method name that is defined in backupPolicy. + type: string + backupName: + description: backupName is the name of the backup. + type: string + backupPolicyName: + description: Which backupPolicy is applied to perform this backup + type: string + deletionPolicy: + default: Delete + description: deletionPolicy determines whether the backup contents + stored in backup repository should be deleted when the backup + custom resource is deleted. Supported values are "Retain" and + "Delete". "Retain" means that the backup content and its physical + snapshot on backup repository are kept. "Delete" means that + the backup content and its physical snapshot on backup repository + are deleted. + enum: + - Delete + - Retain + type: string + parentBackupName: + description: if backupType is incremental, parentBackupName is + required. + type: string + retentionPeriod: + description: "retentionPeriod determines a duration up to which + the backup should be kept. Controller will remove all backups + that are older than the RetentionPeriod. For example, RetentionPeriod + of `30d` will keep only the backups of last 30 days. Sample + duration format: - years: \t2y - months: \t6mo - days: \t\t30d + - hours: \t12h - minutes: \t30m You can also combine the above + durations. For example: 30d12h30m. If not set, the backup will + be kept forever." + type: string + type: object + cancel: + description: 'cancel defines the action to cancel the Pending/Creating/Running + opsRequest, supported types: [VerticalScaling, HorizontalScaling]. + once cancel is set to true, this opsRequest will be canceled and + modifying this property again will not take effect.' + type: boolean + clusterRef: + description: clusterRef references cluster object. + type: string + x-kubernetes-validations: + - message: forbidden to update spec.clusterRef + rule: self == oldSelf + customSpec: + properties: + componentName: + description: cluster component name. + type: string + opsDefinitionRef: + description: reference a opsDefinition + type: string + params: + description: the input for this operation declared in the opsDefinition.spec.parametersSchema. + will create corresponding jobs for each array element. if the + param type is array, the format must be "v1,v2,v3". + items: + additionalProperties: + type: string + type: object + type: array + required: + - componentName + - opsDefinitionRef + type: object + expose: + description: expose defines services the component needs to expose. + items: + properties: + componentName: + description: componentName cluster component name. + type: string + services: + description: Setting the list of services to be exposed or removed. + items: + properties: + annotations: + additionalProperties: + type: string + description: 'If ServiceType is LoadBalancer, cloud provider + related parameters can be put here More info: https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer.' + type: object + name: + description: Name defines the name of the service. otherwise, + it indicates the name of the service. Others can refer + to this service by its name. (e.g., connection credential) + Cannot be updated. + type: string + ports: + description: 'The list of ports that are exposed by this + service. If Ports are not provided, the default Services + Ports defined in the ClusterDefinition or ComponentDefinition + that are neither of NodePort nor LoadBalancer service + type will be used. If there is no corresponding Service + defined in the ClusterDefinition or ComponentDefinition, + the expose operation will fail. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies' + items: + description: ServicePort contains information on service's + port. + properties: + appProtocol: + description: "The application protocol for this + port. This is used as a hint for implementations + to offer richer behavior for protocols that they + understand. This field follows standard Kubernetes + label syntax. Valid values are either: \n * Un-prefixed + protocol names - reserved for IANA standard service + names (as per RFC-6335 and https://www.iana.org/assignments/service-names). + \n * Kubernetes-defined prefixed names: * 'kubernetes.io/h2c' + - HTTP/2 over cleartext as described in https://www.rfc-editor.org/rfc/rfc7540 + * 'kubernetes.io/ws' - WebSocket over cleartext + as described in https://www.rfc-editor.org/rfc/rfc6455 + * 'kubernetes.io/wss' - WebSocket over TLS as + described in https://www.rfc-editor.org/rfc/rfc6455 + \n * Other protocols should use implementation-defined + prefixed names such as mycompany.com/my-custom-protocol." + type: string + name: + description: The name of this port within the service. + This must be a DNS_LABEL. All ports within a ServiceSpec + must have unique names. When considering the endpoints + for a Service, this must match the 'name' field + in the EndpointPort. Optional if only one ServicePort + is defined on this service. + type: string + nodePort: + description: 'The port on each node on which this + service is exposed when type is NodePort or LoadBalancer. Usually + assigned by the system. If a value is specified, + in-range, and not in use it will be used, otherwise + the operation will fail. If not specified, a + port will be allocated if this Service requires + one. If this field is specified when creating + a Service which does not need it, creation will + fail. This field will be wiped when updating a + Service to no longer need it (e.g. changing type + from NodePort to ClusterIP). More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport' + format: int32 + type: integer + port: + description: The port that will be exposed by this + service. + format: int32 + type: integer + protocol: + default: TCP + description: The IP protocol for this port. Supports + "TCP", "UDP", and "SCTP". Default is TCP. + type: string + targetPort: + anyOf: + - type: integer + - type: string + description: 'Number or name of the port to access + on the pods targeted by the service. Number must + be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + If this is a string, it will be looked up as a + named port in the target Pod''s container ports. + If this is not specified, the value of the ''port'' + field is used (an identity map). This field is + ignored for services with clusterIP=None, and + should be omitted or set equal to the ''port'' + field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service' + x-kubernetes-int-or-string: true + required: + - port + type: object + type: array + x-kubernetes-list-map-keys: + - port + - protocol + x-kubernetes-list-type: map + roleSelector: + description: RoleSelector extends the ServiceSpec.Selector + by allowing you to specify defined role as selector + for the service. + type: string + selector: + additionalProperties: + type: string + description: 'Route service traffic to pods with label + keys and values matching this selector. If empty or + not present, the service is assumed to have an external + process managing its endpoints, which Kubernetes will + not modify. Only applies to types ClusterIP, NodePort, + and LoadBalancer. Ignored if type is ExternalName. More + info: https://kubernetes.io/docs/concepts/services-networking/service/' + type: object + x-kubernetes-map-type: atomic + serviceType: + description: 'type determines how the Service is exposed. + Defaults to ClusterIP. Valid options are ExternalName, + ClusterIP, NodePort, and LoadBalancer. "ClusterIP" allocates + a cluster-internal IP address for load-balancing to + endpoints. Endpoints are determined by the selector + or if that is not specified, by manual construction + of an Endpoints object or EndpointSlice objects. If + clusterIP is "None", no virtual IP is allocated and + the endpoints are published as a set of endpoints rather + than a virtual IP. "NodePort" builds on ClusterIP and + allocates a port on every node which routes to the same + endpoints as the clusterIP. "LoadBalancer" builds on + NodePort and creates an external load-balancer (if supported + in the current cloud) which routes to the same endpoints + as the clusterIP. "ExternalName" aliases this service + to the specified externalName. Several other fields + do not apply to ExternalName services. More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types' + type: string + required: + - name + type: object + type: array + switch: + description: switch defines the switch of expose operation. + if switch is set to Enable, the service will be exposed. if + switch is set to Disable, the service will be removed. + enum: + - Enable + - Disable + type: string + required: + - componentName + - services + - switch + type: object + type: array + x-kubernetes-list-map-keys: + - componentName + x-kubernetes-list-type: map + x-kubernetes-validations: + - message: forbidden to update spec.expose + rule: self == oldSelf + horizontalScaling: + description: horizontalScaling defines what component need to horizontal + scale the specified replicas. + items: + description: HorizontalScaling defines the variables of horizontal + scaling operation + properties: + componentName: + description: componentName cluster component name. + type: string + instances: + description: 'Instances defines the name of instance that rsm + scale down priorly. If the RsmTransformPolicy is specified + as ToPod and expected replicas is less than current replicas, + the list of Instances will be used. current replicas - expected + replicas > len(Instances): Scale down from the list of Instances + priorly, the others will select from NodeAssignment. current + replicas - expected replicas < len(Instances): Scale down + from the list of Instances. current replicas - expected replicas + < len(Instances): Scale down from a part of Instances.' + items: + type: string + type: array + nodes: + description: Nodes defines the list of nodes that pods can schedule + when scale up If the RsmTransformPolicy is specified as ToPod + and expected replicas is more than current replicas,the list + of Nodes will be used. If the list of Nodes is empty, no specific + node will be assigned. However, if the list of Nodes is filled, + all pods will be evenly scheduled across the Nodes in the + list when scale up. + items: + description: "NodeName is a type that holds a api.Node's Name + identifier. Being a type captures intent and helps make + sure that the node name is not confused with similar concepts + (the hostname, the cloud provider id, the cloud provider + name etc) \n To clarify the various types: \n - Node.Name + is the Name field of the Node in the API. This should be + stored in a NodeName. Unfortunately, because Name is part + of ObjectMeta, we can't store it as a NodeName at the API + level. \n - Hostname is the hostname of the local machine + (from uname -n). However, some components allow the user + to pass in a --hostname-override flag, which will override + this in most places. In the absence of anything more meaningful, + kubelet will use Hostname as the Node.Name when it creates + the Node. \n * The cloudproviders have the own names: GCE + has InstanceName, AWS has InstanceId. \n For GCE, InstanceName + is the Name of an Instance object in the GCE API. On GCE, + Instance.Name becomes the Hostname, and thus it makes sense + also to use it as the Node.Name. But that is GCE specific, + and it is up to the cloudprovider how to do this mapping. + \n For AWS, the InstanceID is not yet suitable for use as + a Node.Name, so we actually use the PrivateDnsName for the + Node.Name. And this is _not_ always the same as the hostname: + if we are using a custom DHCP domain it won't be." + type: string + type: array + replicas: + description: replicas for the workloads. + format: int32 + minimum: 0 + type: integer + required: + - componentName + - replicas + type: object + type: array + x-kubernetes-list-map-keys: + - componentName + x-kubernetes-list-type: map + x-kubernetes-validations: + - message: forbidden to update spec.horizontalScaling + rule: self == oldSelf + reconfigure: + description: reconfigure defines the variables that need to input + when updating configuration. + properties: + componentName: + description: componentName cluster component name. + type: string + configurations: + description: configurations defines which components perform the + operation. + items: + properties: + keys: + description: keys is used to set the parameters to be updated. + items: + properties: + fileContent: + description: fileContent indicates the configuration + file content. update whole file. + type: string + key: + description: key indicates the key name of ConfigMap. + type: string + parameters: + description: Setting the list of parameters for a + single configuration file. update specified the + parameters. + items: + properties: + key: + description: key is name of the parameter to + be updated. + type: string + value: + description: parameter values to be updated. + if set nil, the parameter defined by the key + field will be deleted from the configuration + file. + type: string + required: + - key + type: object + type: array + required: + - key + type: object + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - key + x-kubernetes-list-type: map + name: + description: name is a config template name. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + policy: + description: policy defines the upgrade policy. + enum: + - simple + - parallel + - rolling + - autoReload + - operatorSyncUpdate + type: string + required: + - keys + - name + type: object + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + required: + - componentName + - configurations + type: object + x-kubernetes-validations: + - message: forbidden to update spec.reconfigure + rule: self == oldSelf + - message: Value can not be empty + rule: self.configurations.size() > 0 + reconfigures: + description: reconfigure defines the variables that need to input + when updating configuration. + items: + description: Reconfigure defines the variables that need to input + when updating configuration. + properties: + componentName: + description: componentName cluster component name. + type: string + configurations: + description: configurations defines which components perform + the operation. + items: + properties: + keys: + description: keys is used to set the parameters to be + updated. + items: + properties: + fileContent: + description: fileContent indicates the configuration + file content. update whole file. + type: string + key: + description: key indicates the key name of ConfigMap. + type: string + parameters: + description: Setting the list of parameters for + a single configuration file. update specified + the parameters. + items: + properties: + key: + description: key is name of the parameter + to be updated. + type: string + value: + description: parameter values to be updated. + if set nil, the parameter defined by the + key field will be deleted from the configuration + file. + type: string + required: + - key + type: object + type: array + required: + - key + type: object + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - key + x-kubernetes-list-type: map + name: + description: name is a config template name. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + policy: + description: policy defines the upgrade policy. + enum: + - simple + - parallel + - rolling + - autoReload + - operatorSyncUpdate + type: string + required: + - keys + - name + type: object + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + required: + - componentName + - configurations + type: object + type: array + x-kubernetes-list-map-keys: + - componentName + x-kubernetes-list-type: map + restart: + description: restart the specified components. + items: + description: ComponentOps defines the common variables of component + scope operations. + properties: + componentName: + description: componentName cluster component name. + type: string + required: + - componentName + type: object + type: array + x-kubernetes-list-map-keys: + - componentName + x-kubernetes-list-type: map + x-kubernetes-validations: + - message: forbidden to update spec.restart + rule: self == oldSelf + restoreFrom: + description: cluster RestoreFrom backup or point in time + properties: + backup: + description: use the backup name and component name for restore, + support for multiple components' recovery. + items: + properties: + ref: + description: specify a reference backup to restore + properties: + name: + description: specified the name + type: string + namespace: + description: specified the namespace + type: string + type: object + type: object + type: array + pointInTime: + description: specified the point in time to recovery + properties: + ref: + description: specify a reference source cluster to restore + properties: + name: + description: specified the name + type: string + namespace: + description: specified the namespace + type: string + type: object + time: + description: specify the time point to restore, with UTC as + the time zone. + format: date-time + type: string + type: object + type: object + x-kubernetes-validations: + - message: forbidden to update spec.restoreFrom + rule: self == oldSelf + restoreSpec: + description: restoreSpec defines how to restore the cluster. + properties: + backupName: + description: backupName is the name of the backup. + type: string + effectiveCommonComponentDef: + description: effectiveCommonComponentDef describes this backup + will be restored for all components which refer to common ComponentDefinition. + type: boolean + restoreTimeStr: + description: restoreTime point in time to restore + type: string + volumeRestorePolicy: + default: Parallel + description: 'the volume claim restore policy, support values: + [Serial, Parallel]' + enum: + - Serial + - Parallel + type: string + required: + - backupName + type: object + scriptSpec: + description: scriptSpec defines the script to be executed. + properties: + componentName: + description: componentName cluster component name. + type: string + image: + description: exec command with image, by default use the image + of kubeblocks-datascript. + type: string + script: + description: script defines the script to be executed. + items: + type: string + type: array + x-kubernetes-validations: + - message: forbidden to update spec.scriptSpec.script + rule: self == oldSelf + scriptFrom: + description: scriptFrom defines the script to be executed from + configMap or secret. + properties: + configMapRef: + description: configMapRef defines the configMap to be executed. + items: + description: Selects a key from 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 + x-kubernetes-map-type: atomic + type: array + x-kubernetes-validations: + - message: forbidden to update spec.scriptSpec.scriptFrom.configMapRef + rule: self == oldSelf + secretRef: + description: secretRef defines the secret to be executed. + items: + description: SecretKeySelector selects a key of a Secret. + 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 + x-kubernetes-map-type: atomic + type: array + x-kubernetes-validations: + - message: forbidden to update spec.scriptSpec.scriptFrom.secretRef + rule: self == oldSelf + type: object + x-kubernetes-validations: + - message: forbidden to update spec.scriptSpec.scriptFrom + rule: self == oldSelf + secret: + description: secret defines the secret to be used to execute the + script. If not specified, the default cluster root credential + secret will be used. + properties: + name: + description: name is the name of the secret. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + passwordKey: + default: password + description: passwordKey field is used to specify the password + of the secret. + type: string + usernameKey: + default: username + description: usernameKey field is used to specify the username + of the secret. + type: string + required: + - name + type: object + selector: + description: KubeBlocks, by default, will execute the script on + the primary pod, with role=leader. There are some exceptions, + such as Redis, which does not synchronize accounts info between + primary and secondary. In this case, we need to execute the + script on all pods, matching the selector. selector indicates + the components on which the script is executed. + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. A + single {key,value} in the matchLabels map is equivalent + to an element of matchExpressions, whose key field is "key", + the operator is "In", and the values array contains only + "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + x-kubernetes-validations: + - message: forbidden to update spec.scriptSpec.script.selector + rule: self == oldSelf + required: + - componentName + type: object + switchover: + description: switchover the specified components. + items: + properties: + componentName: + description: componentName cluster component name. + type: string + instanceName: + description: instanceName is used to specify the candidate primary + or leader instanceName for switchover. If instanceName is + set to "*", it means that no specific primary or leader is + specified for the switchover, and the switchoverAction defined + in clusterDefinition.componentDefs[x].switchoverSpec.withoutCandidate + will be executed, It is required that clusterDefinition.componentDefs[x].switchoverSpec.withoutCandidate + is not empty. If instanceName is set to a valid instanceName + other than "*", it means that a specific candidate primary + or leader is specified for the switchover. the value of instanceName + can be obtained using `kbcli cluster list-instances`, any + other value is invalid. In this case, the `switchoverAction` + defined in clusterDefinition.componentDefs[x].switchoverSpec.withCandidate + will be executed, and it is required that clusterDefinition.componentDefs[x].switchoverSpec.withCandidate + is not empty. + type: string + required: + - componentName + - instanceName + type: object + type: array + x-kubernetes-list-map-keys: + - componentName + x-kubernetes-list-type: map + x-kubernetes-validations: + - message: forbidden to update spec.switchover + rule: self == oldSelf + ttlSecondsAfterSucceed: + description: ttlSecondsAfterSucceed OpsRequest will be deleted after + TTLSecondsAfterSucceed second when OpsRequest.status.phase is Succeed. + format: int32 + type: integer + ttlSecondsBeforeAbort: + default: 0 + description: ttlSecondsBeforeAbort OpsRequest will wait at most TTLSecondsBeforeAbort + seconds for start-conditions to be met. If not specified, the default + value is 0, which means that the start-conditions must be met immediately. + format: int32 + type: integer + type: + description: type defines the operation type. + enum: + - Upgrade + - VerticalScaling + - VolumeExpansion + - HorizontalScaling + - Restart + - Reconfiguring + - Start + - Stop + - Expose + - Switchover + - DataScript + - Backup + - Restore + - Custom + type: string + x-kubernetes-validations: + - message: forbidden to update spec.type + rule: self == oldSelf + upgrade: + description: upgrade specifies the cluster version by specifying clusterVersionRef. + properties: + clusterVersionRef: + description: clusterVersionRef references ClusterVersion name. + type: string + required: + - clusterVersionRef + type: object + x-kubernetes-validations: + - message: forbidden to update spec.upgrade + rule: self == oldSelf + verticalScaling: + description: verticalScaling defines what component need to vertical + scale the specified compute resources. + items: + description: VerticalScaling defines the variables that need to + input when scaling compute resources. + properties: + claims: + description: "Claims lists the names of resources, defined in + spec.resourceClaims, that are used by this container. \n This + is an alpha field and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It can only be set + for containers." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry in + pod.spec.resourceClaims of the Pod where this field + is used. It makes that resource available inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + classDefRef: + description: classDefRef reference class defined in ComponentClassDefinition. + properties: + class: + description: Class refers to the name of the class that + is defined in the ComponentClassDefinition. + type: string + name: + description: Name refers to the name of the ComponentClassDefinition. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + required: + - class + type: object + componentName: + description: componentName cluster component name. + type: string + 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-resources-containers/' + 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. Requests cannot exceed + Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + required: + - componentName + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + x-kubernetes-list-map-keys: + - componentName + x-kubernetes-list-type: map + volumeExpansion: + description: volumeExpansion defines what component and volumeClaimTemplate + need to expand the specified storage. + items: + description: VolumeExpansion defines the variables of volume expansion + operation. + properties: + componentName: + description: componentName cluster component name. + type: string + volumeClaimTemplates: + description: volumeClaimTemplates specifies the storage size + and volumeClaimTemplate name. + items: + properties: + name: + description: name references volumeClaimTemplate name + from cluster components. + type: string + storage: + anyOf: + - type: integer + - type: string + description: Request storage size. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + required: + - name + - storage + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + required: + - componentName + - volumeClaimTemplates + type: object + type: array + x-kubernetes-list-map-keys: + - componentName + x-kubernetes-list-type: map + required: + - clusterRef + - type + type: object + x-kubernetes-validations: + - message: forbidden to cancel the opsRequest which type not in ['VerticalScaling','HorizontalScaling'] + rule: 'has(self.cancel) && self.cancel ? (self.type in [''VerticalScaling'', + ''HorizontalScaling'']) : true' + status: + description: OpsRequestStatus defines the observed state of OpsRequest + properties: + cancelTimestamp: + description: CancelTimestamp defines cancel time. + format: date-time + type: string + clusterGeneration: + description: ClusterGeneration records the cluster generation after + handling the opsRequest action. + format: int64 + type: integer + completionTimestamp: + description: completionTimestamp defines the OpsRequest completion + time. + format: date-time + type: string + components: + additionalProperties: + properties: + lastFailedTime: + description: lastFailedTime is the last time the component phase + transitioned to Failed or Abnormal. + format: date-time + type: string + message: + description: message is a human-readable message indicating + details about this operation. + maxLength: 32768 + type: string + phase: + description: phase describes the component phase, reference + Cluster.status.component.phase. + enum: + - Creating + - Running + - Updating + - Stopping + - Stopped + - Deleting + - Failed + - Abnormal + type: string + progressDetails: + description: progressDetails describes the progress details + of the component for this operation. + items: + properties: + endTime: + description: endTime is the completion time of object + processing. + format: date-time + type: string + group: + description: group describes which group the current object + belongs to. if the objects of a component belong to + the same group, we can ignore it. + type: string + message: + description: message is a human readable message indicating + details about the object condition. + type: string + objectKey: + description: objectKey is the unique key of the object. + type: string + startTime: + description: startTime is the start time of object processing. + format: date-time + type: string + status: + description: status describes the state of processing + the object. + enum: + - Processing + - Pending + - Failed + - Succeed + type: string + required: + - objectKey + - status + type: object + type: array + reason: + description: reason describes the reason for the component phase. + maxLength: 1024 + type: string + workloadType: + description: workloadType references workload type of component + in ClusterDefinition. + enum: + - Stateless + - Stateful + - Consensus + - Replication + type: string + type: object + description: components defines the recorded the status information + of changed components for operation request. + type: object + conditions: + description: conditions describes opsRequest detail status. + items: + description: "Condition contains details for one aspect of the current + state of this API Resource. --- This struct is intended for direct + use as an array at the field path .status.conditions. For example, + \n type FooStatus struct{ // Represents the observations of a + foo's current state. // Known .status.conditions.type are: \"Available\", + \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge + // +listType=map // +listMapKey=type Conditions []metav1.Condition + `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" + protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" + properties: + lastTransitionTime: + description: lastTransitionTime is the last time the condition + transitioned from one status to another. This should be when + the underlying condition changed. If that is not known, then + using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: message is a human readable message indicating + details about the transition. This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: observedGeneration represents the .metadata.generation + that the condition was set based upon. For instance, if .metadata.generation + is currently 12, but the .status.conditions[x].observedGeneration + is 9, the condition is out of date with respect to the current + state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: reason contains a programmatic identifier indicating + the reason for the condition's last transition. Producers + of specific condition types may define expected values and + meanings for this field, and whether the values are considered + a guaranteed API. The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + --- Many .condition.type values are consistent across resources + like Available, but because arbitrary conditions can be useful + (see .node.status.conditions), the ability to deconflict is + important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + lastConfiguration: + description: lastConfiguration records the last configuration before + this operation take effected. + properties: + clusterVersionRef: + description: clusterVersionRef references ClusterVersion name. + type: string + components: + additionalProperties: + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It can only + be set for containers." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry + in pod.spec.resourceClaims of the Pod where this + field is used. It makes that resource available + inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + classDefRef: + description: classDefRef reference class defined in ComponentClassDefinition. + properties: + class: + description: Class refers to the name of the class that + is defined in the ComponentClassDefinition. + type: string + name: + description: Name refers to the name of the ComponentClassDefinition. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + required: + - class + type: object + 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-resources-containers/' + type: object + replicas: + description: replicas are the last replicas of the component. + format: int32 + type: integer + 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. Requests + cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + services: + description: services records the last services of the component. + items: + properties: + annotations: + additionalProperties: + type: string + description: 'If ServiceType is LoadBalancer, cloud + provider related parameters can be put here More + info: https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer.' + type: object + name: + description: Service name + maxLength: 15 + type: string + serviceType: + default: ClusterIP + description: 'serviceType determines how the Service + is exposed. Valid options are ClusterIP, NodePort, + and LoadBalancer. "ClusterIP" allocates a cluster-internal + IP address for load-balancing to endpoints. Endpoints + are determined by the selector or if that is not + specified, they are determined by manual construction + of an Endpoints object or EndpointSlice objects. + If clusterIP is "None", no virtual IP is allocated + and the endpoints are published as a set of endpoints + rather than a virtual IP. "NodePort" builds on ClusterIP + and allocates a port on every node which routes + to the same endpoints as the clusterIP. "LoadBalancer" + builds on NodePort and creates an external load-balancer + (if supported in the current cloud) which routes + to the same endpoints as the clusterIP. More info: + https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types.' + enum: + - ClusterIP + - NodePort + - LoadBalancer + type: string + x-kubernetes-preserve-unknown-fields: true + required: + - name + type: object + type: array + targetResources: + additionalProperties: + items: + type: string + type: array + description: targetResources records the affecting target + resources information for the component. resource key + is in list of [pods]. + type: object + volumeClaimTemplates: + description: volumeClaimTemplates records the last volumeClaimTemplates + of the component. + items: + properties: + name: + description: name references volumeClaimTemplate name + from cluster components. + type: string + storage: + anyOf: + - type: integer + - type: string + description: Request storage size. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + required: + - name + - storage + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + description: components records last configuration of the component. + type: object + type: object + phase: + description: phase describes OpsRequest phase. + enum: + - Pending + - Creating + - Running + - Cancelling + - Cancelled + - Failed + - Succeed + type: string + progress: + default: -/- + pattern: ^(\d+|\-)/(\d+|\-)$ + type: string + reconfiguringStatus: + description: reconfiguringStatus defines the status information of + reconfiguring. + properties: + conditions: + description: conditions describes reconfiguring detail status. + items: + description: "Condition contains details for one aspect of the + current state of this API Resource. --- This struct is intended + for direct use as an array at the field path .status.conditions. + \ For example, \n type FooStatus struct{ // Represents the + observations of a foo's current state. // Known .status.conditions.type + are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type + // +patchStrategy=merge // +listType=map // +listMapKey=type + Conditions []metav1.Condition `json:\"conditions,omitempty\" + patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` + \n // other fields }" + properties: + lastTransitionTime: + description: lastTransitionTime is the last time the condition + transitioned from one status to another. This should be + when the underlying condition changed. If that is not + known, then using the time when the API field changed + is acceptable. + format: date-time + type: string + message: + description: message is a human readable message indicating + details about the transition. This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: observedGeneration represents the .metadata.generation + that the condition was set based upon. For instance, if + .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration + is 9, the condition is out of date with respect to the + current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: reason contains a programmatic identifier indicating + the reason for the condition's last transition. Producers + of specific condition types may define expected values + and meanings for this field, and whether the values are + considered a guaranteed API. The value should be a CamelCase + string. This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, + Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + --- Many .condition.type values are consistent across + resources like Available, but because arbitrary conditions + can be useful (see .node.status.conditions), the ability + to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + configurationStatus: + description: configurationStatus describes the status of the component + reconfiguring. + items: + properties: + expectedCount: + default: -1 + description: expectedCount describes the number of expected + reconfiguring. + format: int32 + type: integer + lastAppliedConfiguration: + additionalProperties: + type: string + description: LastAppliedConfiguration describes the last + configuration. + type: object + lastStatus: + description: lastStatus describes the last status for the + reconfiguring controller. + type: string + message: + description: message describes the details about this operation. + type: string + name: + description: name is a config template name. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + status: + description: status describes the current state of the reconfiguring + state machine. + type: string + succeedCount: + default: 0 + description: succeedCount describes the number of successful + reconfiguring. + format: int32 + type: integer + updatePolicy: + description: updatePolicy describes the policy of reconfiguring. + enum: + - simple + - parallel + - rolling + - autoReload + - operatorSyncUpdate + type: string + updatedParameters: + description: updatedParameters describes the updated parameters. + properties: + addedKeys: + additionalProperties: + type: string + description: addedKeys describes the key added. + type: object + deletedKeys: + additionalProperties: + type: string + description: deletedKeys describes the key deleted. + type: object + updatedKeys: + additionalProperties: + type: string + description: updatedKeys describes the key updated. + type: object + type: object + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + required: + - configurationStatus + type: object + reconfiguringStatusAsComponent: + additionalProperties: + properties: + conditions: + description: conditions describes reconfiguring detail status. + items: + description: "Condition contains details for one aspect of + the current state of this API Resource. --- This struct + is intended for direct use as an array at the field path + .status.conditions. For example, \n type FooStatus struct{ + // Represents the observations of a foo's current state. + // Known .status.conditions.type are: \"Available\", \"Progressing\", + and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge + // +listType=map // +listMapKey=type Conditions []metav1.Condition + `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" + protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields + }" + properties: + lastTransitionTime: + description: lastTransitionTime is the last time the condition + transitioned from one status to another. This should + be when the underlying condition changed. If that is + not known, then using the time when the API field changed + is acceptable. + format: date-time + type: string + message: + description: message is a human readable message indicating + details about the transition. This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: observedGeneration represents the .metadata.generation + that the condition was set based upon. For instance, + if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration + is 9, the condition is out of date with respect to the + current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: reason contains a programmatic identifier + indicating the reason for the condition's last transition. + Producers of specific condition types may define expected + values and meanings for this field, and whether the + values are considered a guaranteed API. The value should + be a CamelCase string. This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, + Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + --- Many .condition.type values are consistent across + resources like Available, but because arbitrary conditions + can be useful (see .node.status.conditions), the ability + to deconflict is important. The regex it matches is + (dns1123SubdomainFmt/)?(qualifiedNameFmt) + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + configurationStatus: + description: configurationStatus describes the status of the + component reconfiguring. + items: + properties: + expectedCount: + default: -1 + description: expectedCount describes the number of expected + reconfiguring. + format: int32 + type: integer + lastAppliedConfiguration: + additionalProperties: + type: string + description: LastAppliedConfiguration describes the last + configuration. + type: object + lastStatus: + description: lastStatus describes the last status for + the reconfiguring controller. + type: string + message: + description: message describes the details about this + operation. + type: string + name: + description: name is a config template name. + maxLength: 63 + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + status: + description: status describes the current state of the + reconfiguring state machine. + type: string + succeedCount: + default: 0 + description: succeedCount describes the number of successful + reconfiguring. + format: int32 + type: integer + updatePolicy: + description: updatePolicy describes the policy of reconfiguring. + enum: + - simple + - parallel + - rolling + - autoReload + - operatorSyncUpdate + type: string + updatedParameters: + description: updatedParameters describes the updated parameters. + properties: + addedKeys: + additionalProperties: + type: string + description: addedKeys describes the key added. + type: object + deletedKeys: + additionalProperties: + type: string + description: deletedKeys describes the key deleted. + type: object + updatedKeys: + additionalProperties: + type: string + description: updatedKeys describes the key updated. + type: object + type: object + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + required: + - configurationStatus + type: object + description: reconfiguringStatus defines the status information of + reconfiguring. + type: object + startTimestamp: + description: startTimestamp The time when the OpsRequest started processing. + format: date-time + type: string + required: + - progress + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.12.1 + labels: + app.kubernetes.io/name: kubeblocks + name: servicedescriptors.apps.kubeblocks.io +spec: + group: apps.kubeblocks.io + names: + categories: + - kubeblocks + - all + kind: ServiceDescriptor + listKind: ServiceDescriptorList + plural: servicedescriptors + shortNames: + - sd + singular: servicedescriptor + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: service kind + jsonPath: .spec.serviceKind + name: SERVICE_KIND + type: string + - description: service version + jsonPath: .spec.serviceVersion + name: SERVICE_VERSION + type: string + - description: status phase + jsonPath: .status.phase + name: STATUS + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: ServiceDescriptor is the Schema for the servicedescriptors 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: + type: object + spec: + description: ServiceDescriptorSpec defines the desired state of ServiceDescriptor + properties: + auth: + description: auth is the auth of the service connection credential. + properties: + password: + description: service connection based-on username and password + credential. + properties: + value: + description: 'Variable references $(VAR_NAME) are expanded + using the previously 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. Double $$ are reduced to a single $, which + allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" + will produce the string literal "$(VAR_NAME)". Escaped references + will never be expanded, regardless of whether the variable + exists or not. 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + type: object + type: object + username: + description: service connection based-on username and password + credential. + properties: + value: + description: 'Variable references $(VAR_NAME) are expanded + using the previously 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. Double $$ are reduced to a single $, which + allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" + will produce the string literal "$(VAR_NAME)". Escaped references + will never be expanded, regardless of whether the variable + exists or not. 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + type: object + type: object + type: object + endpoint: + description: endpoint is the endpoint of the service connection credential. + properties: + value: + description: 'Variable references $(VAR_NAME) are expanded using + the previously 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. + Double $$ are reduced to a single $, which allows for escaping + the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the + string literal "$(VAR_NAME)". Escaped references will never + be expanded, regardless of whether the variable exists or not. + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + type: object + type: object + port: + description: port is the port of the service connection credential. + properties: + value: + description: 'Variable references $(VAR_NAME) are expanded using + the previously 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. + Double $$ are reduced to a single $, which allows for escaping + the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the + string literal "$(VAR_NAME)". Escaped references will never + be expanded, regardless of whether the variable exists or not. + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + type: object + type: object + serviceKind: + description: service kind, indicating the type or nature of the service. + It should be well-known application cluster type, e.g. {mysql, redis, + mongodb}. The serviceKind is case-insensitive and supports abbreviations + for some well-known databases. For example, both 'zk' and 'zookeeper' + will be considered as a ZooKeeper cluster, and 'pg', 'postgres', + 'postgresql' will all be considered as a PostgreSQL cluster. + type: string + serviceVersion: + description: The version of the service reference. + type: string + required: + - serviceKind + - serviceVersion + type: object + status: + description: ServiceDescriptorStatus defines the observed state of ServiceDescriptor + properties: + message: + description: A human-readable message indicating details about why + the ServiceConnectionCredential is in this phase. + type: string + observedGeneration: + description: generation number + format: int64 + type: integer + phase: + description: phase - in list of [Available,Unavailable] + enum: + - Available + - Unavailable + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.12.1 + labels: + app.kubernetes.io/name: kubeblocks + name: actionsets.dataprotection.kubeblocks.io +spec: + group: dataprotection.kubeblocks.io + names: + categories: + - kubeblocks + kind: ActionSet + listKind: ActionSetList + plural: actionsets + shortNames: + - as + singular: actionset + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .spec.backupType + name: BACKUP-TYPE + type: string + - jsonPath: .status.phase + name: STATUS + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: ActionSet is the Schema for the actionsets 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: + type: object + spec: + description: ActionSetSpec defines the desired state of ActionSet + properties: + backup: + description: backup specifies the backup action. + properties: + backupData: + description: backupData specifies the backup data action. + properties: + command: + description: command specifies the commands to back up the + volume data. + items: + type: string + type: array + image: + description: image specifies the image of backup container. + type: string + onError: + default: Fail + description: OnError specifies how should behave if it encounters + an error executing this action. + enum: + - Continue + - Fail + type: string + runOnTargetPodNode: + default: false + description: runOnTargetPodNode specifies whether to run the + job workload on the target pod node. If backup container + should mount the target pod's volumes, this field should + be set to true. otherwise the target pod's volumes will + be ignored. + type: boolean + syncProgress: + description: syncProgress specifies whether to sync the backup + progress and its interval seconds. + properties: + enabled: + description: enabled specifies whether to sync the backup + progress. If enabled, a sidecar container will be created + to sync the backup progress to the Backup CR status. + type: boolean + intervalSeconds: + default: 60 + description: intervalSeconds specifies the interval seconds + to sync the backup progress. + format: int32 + type: integer + type: object + required: + - command + - image + type: object + postBackup: + description: postBackup specifies a hook that should be executed + after the backup. + items: + description: ActionSpec defines an action that should be executed. + Only one of the fields may be set. + properties: + exec: + description: exec specifies the action should be executed + by the pod exec API in a container. + properties: + command: + description: Command is the command and arguments to + execute. + items: + type: string + minItems: 1 + type: array + container: + description: container is the container in the pod where + the command should be executed. If not specified, + the pod's first container is used. + type: string + onError: + default: Fail + description: OnError specifies how should behave if + it encounters an error executing this action. + enum: + - Continue + - Fail + type: string + timeout: + description: Timeout defines the maximum amount of time + should wait for the hook to complete before considering + the execution a failure. + type: string + required: + - command + type: object + job: + description: job specifies the action should be executed + by a Kubernetes Job. + properties: + command: + description: command specifies the commands to back + up the volume data. + items: + type: string + type: array + image: + description: image specifies the image of backup container. + type: string + onError: + default: Fail + description: OnError specifies how should behave if + it encounters an error executing this action. + enum: + - Continue + - Fail + type: string + runOnTargetPodNode: + default: false + description: runOnTargetPodNode specifies whether to + run the job workload on the target pod node. If backup + container should mount the target pod's volumes, this + field should be set to true. otherwise the target + pod's volumes will be ignored. + type: boolean + required: + - command + - image + type: object + type: object + type: array + preBackup: + description: preBackup specifies a hook that should be executed + before the backup. + items: + description: ActionSpec defines an action that should be executed. + Only one of the fields may be set. + properties: + exec: + description: exec specifies the action should be executed + by the pod exec API in a container. + properties: + command: + description: Command is the command and arguments to + execute. + items: + type: string + minItems: 1 + type: array + container: + description: container is the container in the pod where + the command should be executed. If not specified, + the pod's first container is used. + type: string + onError: + default: Fail + description: OnError specifies how should behave if + it encounters an error executing this action. + enum: + - Continue + - Fail + type: string + timeout: + description: Timeout defines the maximum amount of time + should wait for the hook to complete before considering + the execution a failure. + type: string + required: + - command + type: object + job: + description: job specifies the action should be executed + by a Kubernetes Job. + properties: + command: + description: command specifies the commands to back + up the volume data. + items: + type: string + type: array + image: + description: image specifies the image of backup container. + type: string + onError: + default: Fail + description: OnError specifies how should behave if + it encounters an error executing this action. + enum: + - Continue + - Fail + type: string + runOnTargetPodNode: + default: false + description: runOnTargetPodNode specifies whether to + run the job workload on the target pod node. If backup + container should mount the target pod's volumes, this + field should be set to true. otherwise the target + pod's volumes will be ignored. + type: boolean + required: + - command + - image + type: object + type: object + type: array + preDelete: + description: preDelete defines that custom deletion action which + can be executed before executing the built-in deletion action. + note that preDelete action job will ignore the env/envFrom. + properties: + command: + description: command specifies the commands to back up the + volume data. + items: + type: string + type: array + image: + description: image specifies the image of backup container. + type: string + required: + - command + - image + type: object + type: object + backupType: + allOf: + - enum: + - Full + - Incremental + - Differential + - Continuous + - enum: + - Full + - Incremental + - Differential + - Continuous + default: Full + description: 'backupType specifies the backup type, supported values: + Full, Continuous. Full means full backup. Incremental means back + up data that have changed since the last backup (full or incremental). + Differential means back up data that have changed since the last + full backup. Continuous will back up the transaction log continuously, + the PITR (Point in Time Recovery). can be performed based on the + continuous backup and full backup.' + type: string + env: + description: List of environment variables to set in the container. + 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 previously 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. + Double $$ are reduced to a single $, which allows for escaping + the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the + string literal "$(VAR_NAME)". Escaped references will never + be expanded, regardless of whether the variable exists or + not. 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + x-kubernetes-preserve-unknown-fields: true + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + type: object + type: array + x-kubernetes-preserve-unknown-fields: true + restore: + description: restore specifies the restore action. + properties: + postReady: + description: postReady specifies the action to execute after the + data is ready. + items: + description: ActionSpec defines an action that should be executed. + Only one of the fields may be set. + properties: + exec: + description: exec specifies the action should be executed + by the pod exec API in a container. + properties: + command: + description: Command is the command and arguments to + execute. + items: + type: string + minItems: 1 + type: array + container: + description: container is the container in the pod where + the command should be executed. If not specified, + the pod's first container is used. + type: string + onError: + default: Fail + description: OnError specifies how should behave if + it encounters an error executing this action. + enum: + - Continue + - Fail + type: string + timeout: + description: Timeout defines the maximum amount of time + should wait for the hook to complete before considering + the execution a failure. + type: string + required: + - command + type: object + job: + description: job specifies the action should be executed + by a Kubernetes Job. + properties: + command: + description: command specifies the commands to back + up the volume data. + items: + type: string + type: array + image: + description: image specifies the image of backup container. + type: string + onError: + default: Fail + description: OnError specifies how should behave if + it encounters an error executing this action. + enum: + - Continue + - Fail + type: string + runOnTargetPodNode: + default: false + description: runOnTargetPodNode specifies whether to + run the job workload on the target pod node. If backup + container should mount the target pod's volumes, this + field should be set to true. otherwise the target + pod's volumes will be ignored. + type: boolean + required: + - command + - image + type: object + type: object + type: array + prepareData: + description: prepareData specifies the action to prepare data. + properties: + command: + description: command specifies the commands to back up the + volume data. + items: + type: string + type: array + image: + description: image specifies the image of backup container. + type: string + onError: + default: Fail + description: OnError specifies how should behave if it encounters + an error executing this action. + enum: + - Continue + - Fail + type: string + runOnTargetPodNode: + default: false + description: runOnTargetPodNode specifies whether to run the + job workload on the target pod node. If backup container + should mount the target pod's volumes, this field should + be set to true. otherwise the target pod's volumes will + be ignored. + type: boolean + required: + - command + - image + type: object + type: object + required: + - backupType + type: object + status: + description: ActionSetStatus defines the observed state of ActionSet + properties: + message: + description: A human-readable message indicating details about why + the ActionSet is in this phase. + type: string + observedGeneration: + description: generation number + format: int64 + type: integer + phase: + description: phase - in list of [Available,Unavailable] + enum: + - Available + - Unavailable + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.12.1 + labels: + app.kubernetes.io/name: kubeblocks + name: backuppolicies.dataprotection.kubeblocks.io +spec: + group: dataprotection.kubeblocks.io + names: + categories: + - kubeblocks + kind: BackupPolicy + listKind: BackupPolicyList + plural: backuppolicies + shortNames: + - bp + singular: backuppolicy + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .spec.backupRepoName + name: BACKUP-REPO + type: string + - jsonPath: .status.phase + name: STATUS + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: BackupPolicy is the Schema for the backuppolicies 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: + type: object + spec: + description: BackupPolicySpec defines the desired state of BackupPolicy + properties: + backoffLimit: + description: Specifies the number of retries before marking the backup + failed. + format: int32 + maximum: 10 + minimum: 0 + type: integer + backupMethods: + description: backupMethods defines the backup methods. + items: + description: BackupMethod defines the backup method. + properties: + actionSetName: + description: actionSetName refers to the ActionSet object that + defines the backup actions. For volume snapshot backup, the + actionSet is not required, the controller will use the CSI + volume snapshotter to create the snapshot. + type: string + env: + description: env specifies the environment variables for the + backup workload. + 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 previously 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. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) + syntax: i.e. "$$(VAR_NAME)" will produce the string + literal "$(VAR_NAME)". Escaped references will never + be expanded, regardless of whether the variable exists + or not. 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + name: + description: the name of backup method. + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + runtimeSettings: + description: runtimeSettings specifies runtime settings for + the backup workload container. + properties: + resources: + description: 'resources specifies the resource required + by container. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the + DynamicResourceAllocation feature gate. \n This field + is immutable. It can only be set for containers." + items: + description: ResourceClaim references one entry in + PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry + in pod.spec.resourceClaims of the Pod where + this field is used. It makes that resource available + inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + 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-resources-containers/' + 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. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + type: object + snapshotVolumes: + default: false + description: snapshotVolumes specifies whether to take snapshots + of persistent volumes. if true, the BackupScript is not required, + the controller will use the CSI volume snapshotter to create + the snapshot. + type: boolean + target: + description: target specifies the target information to back + up, it will override the global target policy. + properties: + connectionCredential: + description: connectionCredential specifies the connection + credential to connect to the target database cluster. + properties: + hostKey: + description: hostKey specifies the map key of the host + in the connection credential secret. + type: string + passwordKey: + default: password + description: passwordKey specifies the map key of the + password in the connection credential secret. This + password will be saved in the backup annotation for + full backup. You can use the environment variable + DP_ENCRYPTION_KEY to specify encryption key. + type: string + portKey: + description: portKey specifies the map key of the port + in the connection credential secret. + type: string + secretName: + description: secretName refers to the Secret object + that contains the connection credential. + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + usernameKey: + default: username + description: usernameKey specifies the map key of the + user in the connection credential secret. + type: string + required: + - secretName + type: object + podSelector: + description: podSelector is used to find the target pod. + The volumes of the target pod will be backed up. + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. + A single {key,value} in the matchLabels map is equivalent + to an element of matchExpressions, whose key field + is "key", the operator is "In", and the values array + contains only "value". The requirements are ANDed. + type: object + strategy: + default: Any + description: 'strategy specifies the strategy to select + the target pod when multiple pods are selected. Valid + values are: - Any: select any one pod that match the + labelsSelector. - All: select all pods that match + the labelsSelector.' + enum: + - Any + - All + type: string + type: object + x-kubernetes-map-type: atomic + resources: + description: resources specifies the kubernetes resources + to back up. + properties: + excluded: + description: excluded is a slice of namespaced-scoped + resource type names to exclude in the kubernetes resources. + The default value is empty. + items: + type: string + type: array + included: + default: + - '*' + description: included is a slice of namespaced-scoped + resource type names to include in the kubernetes resources. + The default value is "*", which means all resource + types will be included. + items: + type: string + type: array + selector: + description: selector is a metav1.LabelSelector to filter + the target kubernetes resources that need to be backed + up. If not set, will do not back up any kubernetes + resources. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is "In", + and the values array contains only "value". The + requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + serviceAccountName: + description: serviceAccountName specifies the service account + to run the backup workload. + type: string + type: object + targetVolumes: + description: targetVolumes specifies which volumes from the + target should be mounted in the backup workload. + properties: + volumeMounts: + description: volumeMounts specifies the mount for the volumes + specified in `Volumes` section. + 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 + volumes: + description: Volumes indicates the list of volumes of targeted + application that should be mounted on the backup job. + items: + type: string + type: array + type: object + required: + - name + type: object + type: array + backupRepoName: + description: backupRepoName is the name of BackupRepo and the backup + data will be stored in this repository. If not set, will be stored + in the default backup repository. + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + pathPrefix: + description: pathPrefix is the directory inside the backup repository + to store the backup content. It is a relative to the path of the + backup repository. + type: string + target: + description: target specifies the target information to back up. + properties: + connectionCredential: + description: connectionCredential specifies the connection credential + to connect to the target database cluster. + properties: + hostKey: + description: hostKey specifies the map key of the host in + the connection credential secret. + type: string + passwordKey: + default: password + description: passwordKey specifies the map key of the password + in the connection credential secret. This password will + be saved in the backup annotation for full backup. You can + use the environment variable DP_ENCRYPTION_KEY to specify + encryption key. + type: string + portKey: + description: portKey specifies the map key of the port in + the connection credential secret. + type: string + secretName: + description: secretName refers to the Secret object that contains + the connection credential. + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + usernameKey: + default: username + description: usernameKey specifies the map key of the user + in the connection credential secret. + type: string + required: + - secretName + type: object + podSelector: + description: podSelector is used to find the target pod. The volumes + of the target pod will be backed up. + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. A + single {key,value} in the matchLabels map is equivalent + to an element of matchExpressions, whose key field is "key", + the operator is "In", and the values array contains only + "value". The requirements are ANDed. + type: object + strategy: + default: Any + description: 'strategy specifies the strategy to select the + target pod when multiple pods are selected. Valid values + are: - Any: select any one pod that match the labelsSelector. + - All: select all pods that match the labelsSelector.' + enum: + - Any + - All + type: string + type: object + x-kubernetes-map-type: atomic + resources: + description: resources specifies the kubernetes resources to back + up. + properties: + excluded: + description: excluded is a slice of namespaced-scoped resource + type names to exclude in the kubernetes resources. The default + value is empty. + items: + type: string + type: array + included: + default: + - '*' + description: included is a slice of namespaced-scoped resource + type names to include in the kubernetes resources. The default + value is "*", which means all resource types will be included. + items: + type: string + type: array + selector: + description: selector is a metav1.LabelSelector to filter + the target kubernetes resources that need to be backed up. + If not set, will do not back up any kubernetes resources. + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. + A single {key,value} in the matchLabels map is equivalent + to an element of matchExpressions, whose key field is + "key", the operator is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + serviceAccountName: + description: serviceAccountName specifies the service account + to run the backup workload. + type: string + type: object + useKopia: + default: false + description: 'useKopia specifies whether backup data should be stored + in a Kopia repository. Data within the Kopia repository is both + compressed and encrypted. Furthermore, data deduplication is implemented + across various backups of the same cluster. This approach significantly + reduces the actual storage usage, particularly for clusters with + a low update frequency. NOTE: This feature should NOT be enabled + when using KubeBlocks Community Edition, otherwise the backup will + not be processed.' + type: boolean + required: + - backupMethods + - target + type: object + status: + description: BackupPolicyStatus defines the observed state of BackupPolicy + properties: + message: + description: A human-readable message indicating details about why + the BackupPolicy is in this phase. + type: string + observedGeneration: + description: observedGeneration is the most recent generation observed + for this BackupPolicy. It refers to the BackupPolicy's generation, + which is updated on mutation by the API Server. + format: int64 + type: integer + phase: + description: phase - in list of [Available,Unavailable] + enum: + - Available + - Unavailable + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.12.1 + labels: + app.kubernetes.io/name: kubeblocks + name: backuprepos.dataprotection.kubeblocks.io +spec: + group: dataprotection.kubeblocks.io + names: + categories: + - kubeblocks + kind: BackupRepo + listKind: BackupRepoList + plural: backuprepos + singular: backuprepo + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .status.phase + name: STATUS + type: string + - jsonPath: .spec.storageProviderRef + name: STORAGEPROVIDER + type: string + - jsonPath: .spec.accessMethod + name: ACCESSMETHOD + type: string + - jsonPath: .status.isDefault + name: DEFAULT + type: boolean + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: BackupRepo is the Schema for the backuprepos 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: + type: object + spec: + description: BackupRepoSpec defines the desired state of BackupRepo + properties: + accessMethod: + default: Mount + description: Specifies the access method of the backup repo. + enum: + - Mount + - Tool + type: string + config: + additionalProperties: + type: string + description: Non-secret configurations for the storage provider. + type: object + credential: + description: A secret that contains the credentials needed by the + storage provider. + properties: + name: + description: name is unique within a namespace to reference a + secret resource. + type: string + namespace: + description: namespace defines the space within which the secret + name must be unique. + type: string + type: object + x-kubernetes-map-type: atomic + pvReclaimPolicy: + description: The reclaim policy for the PV created by this backup + repo. + enum: + - Delete + - Retain + type: string + storageProviderRef: + description: The storage provider used by this backup repo. + type: string + x-kubernetes-validations: + - message: StorageProviderRef is immutable + rule: self == oldSelf + volumeCapacity: + anyOf: + - type: integer + - type: string + description: The requested capacity for the PVC created by this backup + repo. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + required: + - pvReclaimPolicy + - storageProviderRef + type: object + status: + description: BackupRepoStatus defines the observed state of BackupRepo + properties: + backupPVCName: + description: backupPVCName is the name of the PVC used to store backup + data. + type: string + conditions: + description: conditions describes the current state of the repo. + items: + description: "Condition contains details for one aspect of the current + state of this API Resource. --- This struct is intended for direct + use as an array at the field path .status.conditions. For example, + \n type FooStatus struct{ // Represents the observations of a + foo's current state. // Known .status.conditions.type are: \"Available\", + \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge + // +listType=map // +listMapKey=type Conditions []metav1.Condition + `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" + protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" + properties: + lastTransitionTime: + description: lastTransitionTime is the last time the condition + transitioned from one status to another. This should be when + the underlying condition changed. If that is not known, then + using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: message is a human readable message indicating + details about the transition. This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: observedGeneration represents the .metadata.generation + that the condition was set based upon. For instance, if .metadata.generation + is currently 12, but the .status.conditions[x].observedGeneration + is 9, the condition is out of date with respect to the current + state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: reason contains a programmatic identifier indicating + the reason for the condition's last transition. Producers + of specific condition types may define expected values and + meanings for this field, and whether the values are considered + a guaranteed API. The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + --- Many .condition.type values are consistent across resources + like Available, but because arbitrary conditions can be useful + (see .node.status.conditions), the ability to deconflict is + important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + generatedCSIDriverSecret: + description: generatedCSIDriverSecret references the generated secret + used by the CSI driver. + properties: + name: + description: name is unique within a namespace to reference a + secret resource. + type: string + namespace: + description: namespace defines the space within which the secret + name must be unique. + type: string + type: object + x-kubernetes-map-type: atomic + generatedStorageClassName: + description: generatedStorageClassName indicates the generated storage + class name. + type: string + isDefault: + description: isDefault indicates whether this backup repo is the default + one. + type: boolean + observedGeneration: + description: observedGeneration is the latest generation observed + by the controller. + format: int64 + type: integer + phase: + allOf: + - enum: + - PreChecking + - Failed + - Ready + - Deleting + - enum: + - PreChecking + - Failed + - Ready + - Deleting + description: Backup repo reconciliation phases. Valid values are PreChecking, + Failed, Ready, Deleting. + type: string + toolConfigSecretName: + description: toolConfigSecretName is the name of the secret containing + the configuration for the access tool. + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.12.1 + labels: + app.kubernetes.io/name: kubeblocks + name: backups.dataprotection.kubeblocks.io +spec: + group: dataprotection.kubeblocks.io + names: + categories: + - kubeblocks + kind: Backup + listKind: BackupList + plural: backups + singular: backup + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .spec.backupPolicyName + name: POLICY + type: string + - jsonPath: .spec.backupMethod + name: METHOD + type: string + - jsonPath: .status.backupRepoName + name: REPO + type: string + - jsonPath: .status.phase + name: STATUS + type: string + - jsonPath: .status.totalSize + name: TOTAL-SIZE + type: string + - jsonPath: .status.duration + name: DURATION + type: string + - jsonPath: .metadata.creationTimestamp + name: CREATION-TIME + type: string + - jsonPath: .status.completionTimestamp + name: COMPLETION-TIME + type: string + - jsonPath: .status.expiration + name: EXPIRATION-TIME + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: Backup is the Schema for the backups 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: + type: object + spec: + description: BackupSpec defines the desired state of Backup. + properties: + backupMethod: + description: backupMethod specifies the backup method name that is + defined in backupPolicy. + type: string + x-kubernetes-validations: + - message: forbidden to update spec.backupMethod + rule: self == oldSelf + backupPolicyName: + description: Which backupPolicy is applied to perform this backup. + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + x-kubernetes-validations: + - message: forbidden to update spec.backupPolicyName + rule: self == oldSelf + deletionPolicy: + allOf: + - enum: + - Delete + - Retain + - enum: + - Delete + - Retain + default: Delete + description: deletionPolicy determines whether the backup contents + stored in backup repository should be deleted when the backup custom + resource is deleted. Supported values are "Retain" and "Delete". + "Retain" means that the backup can not be deleted and remains in + 'Deleting' phase. "Delete" means that the backup content and its + physical snapshot on backup repository are deleted. + type: string + parentBackupName: + description: parentBackupName determines the parent backup name for + incremental or differential backup. + type: string + x-kubernetes-validations: + - message: forbidden to update spec.parentBackupName + rule: self == oldSelf + retentionPeriod: + description: "retentionPeriod determines a duration up to which the + backup should be kept. Controller will remove all backups that are + older than the RetentionPeriod. For example, RetentionPeriod of + `30d` will keep only the backups of last 30 days. Sample duration + format: - years: \t2y - months: \t6mo - days: \t\t30d - hours: \t12h + - minutes: \t30m You can also combine the above durations. For example: + 30d12h30m. If not set, the backup will be kept forever." + type: string + required: + - backupMethod + - backupPolicyName + type: object + status: + description: BackupStatus defines the observed state of Backup. + properties: + actions: + description: actions records the actions information for this backup. + items: + properties: + actionType: + description: actionType is the type of the action. + type: string + availableReplicas: + description: availableReplicas available replicas for statefulSet + action. + format: int32 + type: integer + completionTimestamp: + description: completionTimestamp records the time an action + was completed. + format: date-time + type: string + failureReason: + description: failureReason is an error that caused the backup + to fail. + type: string + name: + description: name is the name of the action. + type: string + objectRef: + description: objectRef is the object reference for the action. + 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 + x-kubernetes-map-type: atomic + phase: + description: phase is the current state of the action. + type: string + startTimestamp: + description: startTimestamp records the time an action was started. + format: date-time + type: string + timeRange: + description: timeRange records the time range of backed up data, + for PITR, this is the time range of recoverable data. + properties: + end: + description: end records the end time of backup(Coordinated + Universal Time, UTC). + format: date-time + type: string + start: + description: start records the start time of backup(Coordinated + Universal Time, UTC). + format: date-time + type: string + timeZone: + description: 'time zone, only support zone offset, value + range: "-12:59 ~ +13:00"' + pattern: ^(\+|\-)(0[0-9]|1[0-3]):([0-5][0-9])$ + type: string + type: object + totalSize: + description: totalSize is the total size of backed up data size. + A string with capacity units in the format of "1Gi", "1Mi", + "1Ki". + type: string + volumeSnapshots: + description: volumeSnapshots records the volume snapshot status + for the action. + items: + properties: + contentName: + description: contentName is the name of the volume snapshot + content. + type: string + name: + description: name is the name of the volume snapshot. + type: string + size: + description: size is the size of the volume snapshot. + type: string + volumeName: + description: volumeName is the name of the volume. + type: string + type: object + type: array + type: object + type: array + backupMethod: + description: backupMethod records the backup method information for + this backup. Refer to BackupMethod for more details. + properties: + actionSetName: + description: actionSetName refers to the ActionSet object that + defines the backup actions. For volume snapshot backup, the + actionSet is not required, the controller will use the CSI volume + snapshotter to create the snapshot. + type: string + env: + description: env specifies the environment variables for the backup + workload. + 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 previously 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. Double $$ are reduced to a single + $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + name: + description: the name of backup method. + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + runtimeSettings: + description: runtimeSettings specifies runtime settings for the + backup workload container. + properties: + resources: + description: 'resources specifies the resource required by + container. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the + DynamicResourceAllocation feature gate. \n This field + is immutable. It can only be set for containers." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry + in pod.spec.resourceClaims of the Pod where this + field is used. It makes that resource available + inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + 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-resources-containers/' + 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. + Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + type: object + snapshotVolumes: + default: false + description: snapshotVolumes specifies whether to take snapshots + of persistent volumes. if true, the BackupScript is not required, + the controller will use the CSI volume snapshotter to create + the snapshot. + type: boolean + target: + description: target specifies the target information to back up, + it will override the global target policy. + properties: + connectionCredential: + description: connectionCredential specifies the connection + credential to connect to the target database cluster. + properties: + hostKey: + description: hostKey specifies the map key of the host + in the connection credential secret. + type: string + passwordKey: + default: password + description: passwordKey specifies the map key of the + password in the connection credential secret. This password + will be saved in the backup annotation for full backup. + You can use the environment variable DP_ENCRYPTION_KEY + to specify encryption key. + type: string + portKey: + description: portKey specifies the map key of the port + in the connection credential secret. + type: string + secretName: + description: secretName refers to the Secret object that + contains the connection credential. + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + usernameKey: + default: username + description: usernameKey specifies the map key of the + user in the connection credential secret. + type: string + required: + - secretName + type: object + podSelector: + description: podSelector is used to find the target pod. The + volumes of the target pod will be backed up. + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. + A single {key,value} in the matchLabels map is equivalent + to an element of matchExpressions, whose key field is + "key", the operator is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + strategy: + default: Any + description: 'strategy specifies the strategy to select + the target pod when multiple pods are selected. Valid + values are: - Any: select any one pod that match the + labelsSelector. - All: select all pods that match the + labelsSelector.' + enum: + - Any + - All + type: string + type: object + x-kubernetes-map-type: atomic + resources: + description: resources specifies the kubernetes resources + to back up. + properties: + excluded: + description: excluded is a slice of namespaced-scoped + resource type names to exclude in the kubernetes resources. + The default value is empty. + items: + type: string + type: array + included: + default: + - '*' + description: included is a slice of namespaced-scoped + resource type names to include in the kubernetes resources. + The default value is "*", which means all resource types + will be included. + items: + type: string + type: array + selector: + description: selector is a metav1.LabelSelector to filter + the target kubernetes resources that need to be backed + up. If not set, will do not back up any kubernetes resources. + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. + A single {key,value} in the matchLabels map is equivalent + to an element of matchExpressions, whose key field + is "key", the operator is "In", and the values array + contains only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + serviceAccountName: + description: serviceAccountName specifies the service account + to run the backup workload. + type: string + type: object + targetVolumes: + description: targetVolumes specifies which volumes from the target + should be mounted in the backup workload. + properties: + volumeMounts: + description: volumeMounts specifies the mount for the volumes + specified in `Volumes` section. + 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 + volumes: + description: Volumes indicates the list of volumes of targeted + application that should be mounted on the backup job. + items: + type: string + type: array + type: object + required: + - name + type: object + backupRepoName: + description: backupRepoName is the name of the backup repository. + type: string + completionTimestamp: + description: completionTimestamp records the time a backup was completed. + Completion time is recorded even on failed backups. The server's + time is used for CompletionTimestamp. + format: date-time + type: string + duration: + description: The duration time of backup execution. When converted + to a string, the format is "1h2m0.5s". + type: string + expiration: + description: expiration is when this backup is eligible for garbage + collection. 'null' means the Backup will NOT be cleaned except delete + manual. + format: date-time + type: string + extras: + description: extra records the extra info for the backup. + items: + additionalProperties: + type: string + type: object + type: array + failureReason: + description: failureReason is an error that caused the backup to fail. + type: string + formatVersion: + description: formatVersion is the backup format version, including + major, minor and patch version. + type: string + kopiaRepoPath: + description: kopiaRepoPath records the path of the Kopia repository. + type: string + path: + description: path is the directory inside the backup repository where + the backup data is stored. It is an absolute path in the backup + repository. + type: string + persistentVolumeClaimName: + description: persistentVolumeClaimName is the name of the persistent + volume claim that is used to store the backup data. + type: string + phase: + description: phase is the current state of the Backup. + enum: + - New + - InProgress + - Running + - Completed + - Failed + - Deleting + type: string + startTimestamp: + description: startTimestamp records the time a backup was started. + The server's time is used for StartTimestamp. + format: date-time + type: string + target: + description: target records the target information for this backup. + properties: + connectionCredential: + description: connectionCredential specifies the connection credential + to connect to the target database cluster. + properties: + hostKey: + description: hostKey specifies the map key of the host in + the connection credential secret. + type: string + passwordKey: + default: password + description: passwordKey specifies the map key of the password + in the connection credential secret. This password will + be saved in the backup annotation for full backup. You can + use the environment variable DP_ENCRYPTION_KEY to specify + encryption key. + type: string + portKey: + description: portKey specifies the map key of the port in + the connection credential secret. + type: string + secretName: + description: secretName refers to the Secret object that contains + the connection credential. + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + usernameKey: + default: username + description: usernameKey specifies the map key of the user + in the connection credential secret. + type: string + required: + - secretName + type: object + podSelector: + description: podSelector is used to find the target pod. The volumes + of the target pod will be backed up. + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. A + single {key,value} in the matchLabels map is equivalent + to an element of matchExpressions, whose key field is "key", + the operator is "In", and the values array contains only + "value". The requirements are ANDed. + type: object + strategy: + default: Any + description: 'strategy specifies the strategy to select the + target pod when multiple pods are selected. Valid values + are: - Any: select any one pod that match the labelsSelector. + - All: select all pods that match the labelsSelector.' + enum: + - Any + - All + type: string + type: object + x-kubernetes-map-type: atomic + resources: + description: resources specifies the kubernetes resources to back + up. + properties: + excluded: + description: excluded is a slice of namespaced-scoped resource + type names to exclude in the kubernetes resources. The default + value is empty. + items: + type: string + type: array + included: + default: + - '*' + description: included is a slice of namespaced-scoped resource + type names to include in the kubernetes resources. The default + value is "*", which means all resource types will be included. + items: + type: string + type: array + selector: + description: selector is a metav1.LabelSelector to filter + the target kubernetes resources that need to be backed up. + If not set, will do not back up any kubernetes resources. + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. + A single {key,value} in the matchLabels map is equivalent + to an element of matchExpressions, whose key field is + "key", the operator is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + serviceAccountName: + description: serviceAccountName specifies the service account + to run the backup workload. + type: string + type: object + timeRange: + description: timeRange records the time range of backed up data, for + PITR, this is the time range of recoverable data. + properties: + end: + description: end records the end time of backup(Coordinated Universal + Time, UTC). + format: date-time + type: string + start: + description: start records the start time of backup(Coordinated + Universal Time, UTC). + format: date-time + type: string + timeZone: + description: 'time zone, only support zone offset, value range: + "-12:59 ~ +13:00"' + pattern: ^(\+|\-)(0[0-9]|1[0-3]):([0-5][0-9])$ + type: string + type: object + totalSize: + description: totalSize is the total size of backed up data size. A + string with capacity units in the format of "1Gi", "1Mi", "1Ki". + If no capacity unit is specified, it is assumed to be in bytes. + type: string + volumeSnapshots: + description: volumeSnapshots records the volume snapshot status for + the action. + items: + properties: + contentName: + description: contentName is the name of the volume snapshot + content. + type: string + name: + description: name is the name of the volume snapshot. + type: string + size: + description: size is the size of the volume snapshot. + type: string + volumeName: + description: volumeName is the name of the volume. + type: string + type: object + type: array + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.12.1 + labels: + app.kubernetes.io/name: kubeblocks + name: backupschedules.dataprotection.kubeblocks.io +spec: + group: dataprotection.kubeblocks.io + names: + categories: + - kubeblocks + kind: BackupSchedule + listKind: BackupScheduleList + plural: backupschedules + shortNames: + - bs + singular: backupschedule + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.phase + name: STATUS + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: BackupSchedule is the Schema for the backupschedules 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: + type: object + spec: + description: BackupScheduleSpec defines the desired state of BackupSchedule. + properties: + backupPolicyName: + description: Which backupPolicy is applied to perform this backup. + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + schedules: + description: schedules defines the list of backup schedules. + items: + properties: + backupMethod: + description: backupMethod specifies the backup method name that + is defined in backupPolicy. + type: string + cronExpression: + description: the cron expression for schedule, the timezone + is in UTC. see https://en.wikipedia.org/wiki/Cron. + type: string + enabled: + description: enabled specifies whether the backup schedule is + enabled or not. + type: boolean + retentionPeriod: + default: 7d + description: "retentionPeriod determines a duration up to which + the backup should be kept. controller will remove all backups + that are older than the RetentionPeriod. For example, RetentionPeriod + of `30d` will keep only the backups of last 30 days. Sample + duration format: - years: \t2y - months: \t6mo - days: \t\t30d + - hours: \t12h - minutes: \t30m You can also combine the above + durations. For example: 30d12h30m" + type: string + required: + - backupMethod + - cronExpression + type: object + minItems: 1 + type: array + startingDeadlineMinutes: + description: startingDeadlineMinutes defines the deadline in minutes + for starting the backup workload if it misses scheduled time for + any reason. + format: int64 + maximum: 1440 + minimum: 0 + type: integer + required: + - backupPolicyName + - schedules + type: object + status: + description: BackupScheduleStatus defines the observed state of BackupSchedule. + properties: + failureReason: + description: failureReason is an error that caused the backup to fail. + type: string + observedGeneration: + description: observedGeneration is the most recent generation observed + for this BackupSchedule. It refers to the BackupSchedule's generation, + which is updated on mutation by the API Server. + format: int64 + type: integer + phase: + description: phase describes the phase of the BackupSchedule. + type: string + schedules: + additionalProperties: + description: ScheduleStatus defines the status of each schedule. + properties: + failureReason: + description: failureReason is an error that caused the backup + to fail. + type: string + lastScheduleTime: + description: lastScheduleTime records the last time the backup + was scheduled. + format: date-time + type: string + lastSuccessfulTime: + description: lastSuccessfulTime records the last time the backup + was successfully completed. + format: date-time + type: string + phase: + description: phase describes the phase of the schedule. + type: string + type: object + description: schedules describes the status of each schedule. + type: object + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.12.1 + labels: + app.kubernetes.io/name: kubeblocks + name: restores.dataprotection.kubeblocks.io +spec: + group: dataprotection.kubeblocks.io + names: + categories: + - kubeblocks + - all + kind: Restore + listKind: RestoreList + plural: restores + singular: restore + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .spec.backup.name + name: BACKUP + type: string + - description: Point in time for restoring + jsonPath: .spec.restoreTime + name: RESTORE-TIME + type: string + - description: Restore Status. + jsonPath: .status.phase + name: STATUS + type: string + - jsonPath: .status.duration + name: DURATION + type: string + - jsonPath: .metadata.creationTimestamp + name: CREATION-TIME + type: string + - jsonPath: .status.completionTimestamp + name: COMPLETION-TIME + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: Restore is the Schema for the restores 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: + type: object + spec: + description: RestoreSpec defines the desired state of Restore + properties: + backoffLimit: + description: Specifies the number of retries before marking the restore + failed. + format: int32 + maximum: 10 + minimum: 0 + type: integer + backup: + description: 'backup to be restored. The restore behavior based on + the backup type: 1. Full: will be restored the full backup directly. + 2. Incremental: will be restored sequentially from the most recent + full backup of this incremental backup. 3. Differential: will be + restored sequentially from the parent backup of the differential + backup. 4. Continuous: will find the most recent full backup at + this time point and the continuous backups after it to restore.' + properties: + name: + description: backup name + type: string + namespace: + description: backup namespace + type: string + required: + - name + - namespace + type: object + x-kubernetes-validations: + - message: forbidden to update spec.backupName + rule: self == oldSelf + containerResources: + description: specified the required resources of restore job's container. + properties: + claims: + description: "Claims lists the names of resources, defined in + spec.resourceClaims, that are used by this container. \n This + is an alpha field and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It can only be set + for containers." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry in pod.spec.resourceClaims + of the Pod where this field is used. It makes that resource + available inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + 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-resources-containers/' + 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. Requests cannot exceed Limits. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + env: + description: 'list of environment variables to set in the container + for restore and will be merged with the env of Backup and ActionSet. + The priority of merging is as follows: Restore env > Backup env + > ActionSet env.' + 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 previously 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. + Double $$ are reduced to a single $, which allows for escaping + the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the + string literal "$(VAR_NAME)". Escaped references will never + be expanded, regardless of whether the variable exists or + not. 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + x-kubernetes-preserve-unknown-fields: true + prepareDataConfig: + description: configuration for the action of "prepareData" phase, + including the persistent volume claims that need to be restored + and scheduling strategy of temporary recovery pod. + properties: + dataSourceRef: + description: dataSourceRef describes the configuration when using + `persistentVolumeClaim.spec.dataSourceRef` method for restoring. + it describes the source volume of the backup targetVolumes and + how to mount path in the restoring container. + properties: + mountPath: + description: mountPath path within the restoring container + at which the volume should be mounted. + type: string + volumeSource: + description: volumeSource describes the volume will be restored + from the specified volume of the backup targetVolumes. required + if the backup uses volume snapshot. + type: string + type: object + x-kubernetes-validations: + - message: at least one exists for volumeSource and mountPath. + rule: self.volumeSource != '' || self.mountPath !='' + - message: forbidden to update spec.prepareDataConfig.dataSourceRef + rule: self == oldSelf + schedulingSpec: + description: scheduling spec for restoring pod. + properties: + affinity: + description: affinity is a group of affinity scheduling rules. + refer to https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ + properties: + nodeAffinity: + description: Describes node affinity scheduling rules + for the pod. + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule + pods to nodes that satisfy the affinity expressions + specified by this field, but it may choose a node + that violates one or more of the expressions. The + node that is most preferred is the one with the + greatest sum of weights, i.e. for each node that + meets all of the scheduling requirements (resource + request, requiredDuringScheduling affinity expressions, + etc.), compute a sum by iterating through the elements + of this field and adding "weight" to the sum if + the node matches the corresponding matchExpressions; + the node(s) with the highest sum are the most preferred. + items: + description: An empty preferred scheduling term + matches all objects with implicit weight 0 (i.e. + it's a no-op). A null preferred scheduling term + matches no objects (i.e. is also a no-op). + properties: + preference: + description: A node selector term, associated + with the corresponding weight. + properties: + matchExpressions: + description: A list of node selector requirements + by node's labels. + items: + description: A node selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: The label key that the + selector applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators + are In, NotIn, Exists, DoesNotExist. + Gt, and Lt. + type: string + values: + description: 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. + If the operator is Gt or Lt, the + values array must have a single + element, which will be interpreted + as an integer. This array is replaced + during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + description: A list of node selector requirements + by node's fields. + items: + description: A node selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: The label key that the + selector applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators + are In, NotIn, Exists, DoesNotExist. + Gt, and Lt. + type: string + values: + description: 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. + If the operator is Gt or Lt, the + values array must have a single + element, which will be interpreted + as an integer. This array is replaced + during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + x-kubernetes-map-type: atomic + weight: + description: Weight associated with matching + the corresponding nodeSelectorTerm, in the + range 1-100. + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the affinity requirements specified + by this field are not met at scheduling time, the + pod will not be scheduled onto the node. If the + affinity requirements specified by this field cease + to be met at some point during pod execution (e.g. + due to an update), the system may or may not try + to eventually evict the pod from its node. + properties: + nodeSelectorTerms: + description: Required. A list of node selector + terms. The terms are ORed. + items: + description: A null or empty node selector term + matches no objects. The requirements of them + are ANDed. The TopologySelectorTerm type implements + a subset of the NodeSelectorTerm. + properties: + matchExpressions: + description: A list of node selector requirements + by node's labels. + items: + description: A node selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: The label key that the + selector applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators + are In, NotIn, Exists, DoesNotExist. + Gt, and Lt. + type: string + values: + description: 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. + If the operator is Gt or Lt, the + values array must have a single + element, which will be interpreted + as an integer. This array is replaced + during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + description: A list of node selector requirements + by node's fields. + items: + description: A node selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: The label key that the + selector applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators + are In, NotIn, Exists, DoesNotExist. + Gt, and Lt. + type: string + values: + description: 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. + If the operator is Gt or Lt, the + values array must have a single + element, which will be interpreted + as an integer. This array is replaced + during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + x-kubernetes-map-type: atomic + type: array + required: + - nodeSelectorTerms + type: object + x-kubernetes-map-type: atomic + type: object + podAffinity: + description: Describes pod affinity scheduling rules (e.g. + co-locate this pod in the same node, zone, etc. as some + other pod(s)). + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule + pods to nodes that satisfy the affinity expressions + specified by this field, but it may choose a node + that violates one or more of the expressions. The + node that is most preferred is the one with the + greatest sum of weights, i.e. for each node that + meets all of the scheduling requirements (resource + request, requiredDuringScheduling affinity expressions, + etc.), compute a sum by iterating through the elements + of this field and adding "weight" to the sum if + the node has pods which matches the corresponding + podAffinityTerm; the node(s) with the highest sum + are the most preferred. + items: + description: The weights of all of the matched WeightedPodAffinityTerm + fields are added per-node to find the most preferred + node(s) + properties: + podAffinityTerm: + description: Required. A pod affinity term, + associated with the corresponding weight. + properties: + labelSelector: + description: A label query over a set of + resources, in this case pods. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of + {key,value} pairs. A single {key,value} + in the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are + ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaceSelector: + description: A label query over the set + of namespaces that the term applies to. + The term is applied to the union of the + namespaces selected by this field and + the ones listed in the namespaces field. + null selector and null or empty namespaces + list means "this pod's namespace". An + empty selector ({}) matches all namespaces. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of + {key,value} pairs. A single {key,value} + in the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are + ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static + list of namespace names that the term + applies to. The term is applied to the + union of the namespaces listed in this + field and the ones selected by namespaceSelector. + null or empty namespaces list and null + namespaceSelector means "this pod's namespace". + items: + type: string + type: array + topologyKey: + description: This pod should be co-located + (affinity) or not co-located (anti-affinity) + with the pods matching the labelSelector + in the specified namespaces, where co-located + is defined as running on a node whose + value of the label with key topologyKey + matches that of any node on which any + of the selected pods is running. Empty + topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + weight: + description: weight associated with matching + the corresponding podAffinityTerm, in the + range 1-100. + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the affinity requirements specified + by this field are not met at scheduling time, the + pod will not be scheduled onto the node. If the + affinity requirements specified by this field cease + to be met at some point during pod execution (e.g. + due to a pod label update), the system may or may + not try to eventually evict the pod from its node. + When there are multiple elements, the lists of nodes + corresponding to each podAffinityTerm are intersected, + i.e. all terms must be satisfied. + items: + description: Defines a set of pods (namely those + matching the labelSelector relative to the given + namespace(s)) that this pod should be co-located + (affinity) or not co-located (anti-affinity) with, + where co-located is defined as running on a node + whose value of the label with key + matches that of any node on which a pod of the + set of pods is running + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The requirements + are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied + to the union of the namespaces selected by + this field and the ones listed in the namespaces + field. null selector and null or empty namespaces + list means "this pod's namespace". An empty + selector ({}) matches all namespaces. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The requirements + are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static list + of namespace names that the term applies to. + The term is applied to the union of the namespaces + listed in this field and the ones selected + by namespaceSelector. null or empty namespaces + list and null namespaceSelector means "this + pod's namespace". + items: + type: string + type: array + topologyKey: + description: This pod should be co-located (affinity) + or not co-located (anti-affinity) with the + pods matching the labelSelector in the specified + namespaces, where co-located is defined as + running on a node whose value of the label + with key topologyKey matches that of any node + on which any of the selected pods is running. + Empty topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + type: array + type: object + podAntiAffinity: + description: Describes pod anti-affinity scheduling rules + (e.g. avoid putting this pod in the same node, zone, + etc. as some other pod(s)). + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule + pods to nodes that satisfy the anti-affinity expressions + specified by this field, but it may choose a node + that violates one or more of the expressions. The + node that is most preferred is the one with the + greatest sum of weights, i.e. for each node that + meets all of the scheduling requirements (resource + request, requiredDuringScheduling anti-affinity + expressions, etc.), compute a sum by iterating through + the elements of this field and adding "weight" to + the sum if the node has pods which matches the corresponding + podAffinityTerm; the node(s) with the highest sum + are the most preferred. + items: + description: The weights of all of the matched WeightedPodAffinityTerm + fields are added per-node to find the most preferred + node(s) + properties: + podAffinityTerm: + description: Required. A pod affinity term, + associated with the corresponding weight. + properties: + labelSelector: + description: A label query over a set of + resources, in this case pods. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of + {key,value} pairs. A single {key,value} + in the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are + ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaceSelector: + description: A label query over the set + of namespaces that the term applies to. + The term is applied to the union of the + namespaces selected by this field and + the ones listed in the namespaces field. + null selector and null or empty namespaces + list means "this pod's namespace". An + empty selector ({}) matches all namespaces. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of + {key,value} pairs. A single {key,value} + in the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are + ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static + list of namespace names that the term + applies to. The term is applied to the + union of the namespaces listed in this + field and the ones selected by namespaceSelector. + null or empty namespaces list and null + namespaceSelector means "this pod's namespace". + items: + type: string + type: array + topologyKey: + description: This pod should be co-located + (affinity) or not co-located (anti-affinity) + with the pods matching the labelSelector + in the specified namespaces, where co-located + is defined as running on a node whose + value of the label with key topologyKey + matches that of any node on which any + of the selected pods is running. Empty + topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + weight: + description: weight associated with matching + the corresponding podAffinityTerm, in the + range 1-100. + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the anti-affinity requirements specified + by this field are not met at scheduling time, the + pod will not be scheduled onto the node. If the + anti-affinity requirements specified by this field + cease to be met at some point during pod execution + (e.g. due to a pod label update), the system may + or may not try to eventually evict the pod from + its node. When there are multiple elements, the + lists of nodes corresponding to each podAffinityTerm + are intersected, i.e. all terms must be satisfied. + items: + description: Defines a set of pods (namely those + matching the labelSelector relative to the given + namespace(s)) that this pod should be co-located + (affinity) or not co-located (anti-affinity) with, + where co-located is defined as running on a node + whose value of the label with key + matches that of any node on which a pod of the + set of pods is running + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The requirements + are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied + to the union of the namespaces selected by + this field and the ones listed in the namespaces + field. null selector and null or empty namespaces + list means "this pod's namespace". An empty + selector ({}) matches all namespaces. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The requirements + are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static list + of namespace names that the term applies to. + The term is applied to the union of the namespaces + listed in this field and the ones selected + by namespaceSelector. null or empty namespaces + list and null namespaceSelector means "this + pod's namespace". + items: + type: string + type: array + topologyKey: + description: This pod should be co-located (affinity) + or not co-located (anti-affinity) with the + pods matching the labelSelector in the specified + namespaces, where co-located is defined as + running on a node whose value of the label + with key topologyKey matches that of any node + on which any of the selected pods is running. + Empty topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + type: array + type: object + type: object + nodeName: + description: nodeName is a request to schedule this pod onto + a specific node. If it is non-empty, the scheduler simply + schedules this pod onto that node, assuming that it fits + resource requirements. + type: string + nodeSelector: + additionalProperties: + type: string + description: 'nodeSelector is a selector which must be true + for the pod to fit on a node. Selector which must match + a node''s labels for the pod to be scheduled on that node. + More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/' + type: object + x-kubernetes-map-type: atomic + schedulerName: + description: If specified, the pod will be dispatched by specified + scheduler. If not specified, the pod will be dispatched + by default scheduler. + type: string + tolerations: + description: the restoring pod's tolerations. + items: + description: The pod this Toleration is attached to tolerates + any taint that matches the triple using + the matching operator . + properties: + effect: + description: Effect indicates the taint effect to match. + Empty means match all taint effects. When specified, + allowed values are NoSchedule, PreferNoSchedule and + NoExecute. + type: string + key: + description: Key is the taint key that the toleration + applies to. Empty means match all taint keys. If the + key is empty, operator must be Exists; this combination + means to match all values and all keys. + type: string + operator: + description: Operator represents a key's relationship + to the value. Valid operators are Exists and Equal. + Defaults to Equal. Exists is equivalent to wildcard + for value, so that a pod can tolerate all taints of + a particular category. + type: string + tolerationSeconds: + description: TolerationSeconds represents the period + of time the toleration (which must be of effect NoExecute, + otherwise this field is ignored) tolerates the taint. + By default, it is not set, which means tolerate the + taint forever (do not evict). Zero and negative values + will be treated as 0 (evict immediately) by the system. + format: int64 + type: integer + value: + description: Value is the taint value the toleration + matches to. If the operator is Exists, the value should + be empty, otherwise just a regular string. + type: string + type: object + type: array + topologySpreadConstraints: + description: topologySpreadConstraints describes how a group + of pods ought to spread across topology domains. Scheduler + will schedule pods in a way which abides by the constraints. + refer to https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/ + items: + description: TopologySpreadConstraint specifies how to spread + matching pods among the given topology. + properties: + labelSelector: + description: LabelSelector is used to find matching + pods. Pods that match this label selector are counted + to determine the number of pods in their corresponding + topology domain. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is "In", + and the values array contains only "value". The + requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + description: "MatchLabelKeys is a set of pod label keys + to select the pods over which spreading will be calculated. + The keys are used to lookup values from the incoming + pod labels, those key-value labels are ANDed with + labelSelector to select the group of existing pods + over which spreading will be calculated for the incoming + pod. The same key is forbidden to exist in both MatchLabelKeys + and LabelSelector. MatchLabelKeys cannot be set when + LabelSelector isn't set. Keys that don't exist in + the incoming pod labels will be ignored. A null or + empty list means only match against labelSelector. + \n This is a beta field and requires the MatchLabelKeysInPodTopologySpread + feature gate to be enabled (enabled by default)." + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + description: 'MaxSkew describes the degree to which + pods may be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`, + it is the maximum permitted difference between the + number of matching pods in the target topology and + the global minimum. The global minimum is the minimum + number of matching pods in an eligible domain or zero + if the number of eligible domains is less than MinDomains. + For example, in a 3-zone cluster, MaxSkew is set to + 1, and pods with the same labelSelector spread as + 2/2/1: In this case, the global minimum is 1. | zone1 + | zone2 | zone3 | | P P | P P | P | - if MaxSkew + is 1, incoming pod can only be scheduled to zone3 + to become 2/2/2; scheduling it onto zone1(zone2) would + make the ActualSkew(3-1) on zone1(zone2) violate MaxSkew(1). + - if MaxSkew is 2, incoming pod can be scheduled onto + any zone. When `whenUnsatisfiable=ScheduleAnyway`, + it is used to give higher precedence to topologies + that satisfy it. It''s a required field. Default value + is 1 and 0 is not allowed.' + format: int32 + type: integer + minDomains: + description: "MinDomains indicates a minimum number + of eligible domains. When the number of eligible domains + with matching topology keys is less than minDomains, + Pod Topology Spread treats \"global minimum\" as 0, + and then the calculation of Skew is performed. And + when the number of eligible domains with matching + topology keys equals or greater than minDomains, this + value has no effect on scheduling. As a result, when + the number of eligible domains is less than minDomains, + scheduler won't schedule more than maxSkew Pods to + those domains. If value is nil, the constraint behaves + as if MinDomains is equal to 1. Valid values are integers + greater than 0. When value is not nil, WhenUnsatisfiable + must be DoNotSchedule. \n For example, in a 3-zone + cluster, MaxSkew is set to 2, MinDomains is set to + 5 and pods with the same labelSelector spread as 2/2/2: + | zone1 | zone2 | zone3 | | P P | P P | P P | + The number of domains is less than 5(MinDomains), + so \"global minimum\" is treated as 0. In this situation, + new pod with the same labelSelector cannot be scheduled, + because computed skew will be 3(3 - 0) if new Pod + is scheduled to any of the three zones, it will violate + MaxSkew. \n This is a beta field and requires the + MinDomainsInPodTopologySpread feature gate to be enabled + (enabled by default)." + format: int32 + type: integer + nodeAffinityPolicy: + description: "NodeAffinityPolicy indicates how we will + treat Pod's nodeAffinity/nodeSelector when calculating + pod topology spread skew. Options are: - Honor: only + nodes matching nodeAffinity/nodeSelector are included + in the calculations. - Ignore: nodeAffinity/nodeSelector + are ignored. All nodes are included in the calculations. + \n If this value is nil, the behavior is equivalent + to the Honor policy. This is a beta-level feature + default enabled by the NodeInclusionPolicyInPodTopologySpread + feature flag." + type: string + nodeTaintsPolicy: + description: "NodeTaintsPolicy indicates how we will + treat node taints when calculating pod topology spread + skew. Options are: - Honor: nodes without taints, + along with tainted nodes for which the incoming pod + has a toleration, are included. - Ignore: node taints + are ignored. All nodes are included. \n If this value + is nil, the behavior is equivalent to the Ignore policy. + This is a beta-level feature default enabled by the + NodeInclusionPolicyInPodTopologySpread feature flag." + type: string + topologyKey: + description: TopologyKey is the key of node labels. + Nodes that have a label with this key and identical + values are considered to be in the same topology. + We consider each as a "bucket", and try + to put balanced number of pods into each bucket. We + define a domain as a particular instance of a topology. + Also, we define an eligible domain as a domain whose + nodes meet the requirements of nodeAffinityPolicy + and nodeTaintsPolicy. e.g. If TopologyKey is "kubernetes.io/hostname", + each Node is a domain of that topology. And, if TopologyKey + is "topology.kubernetes.io/zone", each zone is a domain + of that topology. It's a required field. + type: string + whenUnsatisfiable: + description: 'WhenUnsatisfiable indicates how to deal + with a pod if it doesn''t satisfy the spread constraint. + - DoNotSchedule (default) tells the scheduler not + to schedule it. - ScheduleAnyway tells the scheduler + to schedule the pod in any location, but giving higher + precedence to topologies that would help reduce the + skew. A constraint is considered "Unsatisfiable" for + an incoming pod if and only if every possible node + assignment for that pod would violate "MaxSkew" on + some topology. For example, in a 3-zone cluster, MaxSkew + is set to 1, and pods with the same labelSelector + spread as 3/1/1: | zone1 | zone2 | zone3 | | P P P + | P | P | If WhenUnsatisfiable is set to DoNotSchedule, + incoming pod can only be scheduled to zone2(zone3) + to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) + satisfies MaxSkew(1). In other words, the cluster + can still be imbalanced, but scheduler won''t make + it *more* imbalanced. It''s a required field.' + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array + type: object + x-kubernetes-validations: + - message: forbidden to update spec.prepareDataConfig.schedulingSpec + rule: self == oldSelf + volumeClaimRestorePolicy: + default: Parallel + description: 'VolumeClaimRestorePolicy defines restore policy + for persistent volume claim. Supported policies are as follows: + 1. Parallel: parallel recovery of persistent volume claim. 2. + Serial: restore the persistent volume claim in sequence, and + wait until the previous persistent volume claim is restored + before restoring a new one.' + enum: + - Parallel + - Serial + type: string + volumeClaims: + description: volumeClaims defines the persistent Volume claims + that need to be restored and mount them together into the restore + job. these persistent Volume claims will be created if not exist. + items: + properties: + metadata: + description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata' + properties: + annotations: + additionalProperties: + type: string + type: object + finalizers: + items: + type: string + type: array + labels: + additionalProperties: + type: string + type: object + name: + type: string + namespace: + type: string + type: object + mountPath: + description: mountPath path within the restoring container + at which the volume should be mounted. + type: string + volumeClaimSpec: + description: volumeClaimSpec defines the desired characteristics + of a persistent volume claim. + properties: + accessModes: + description: 'accessModes contains the desired access + modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' + items: + type: string + type: array + dataSource: + description: 'dataSource field can be used to specify + either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) + * An existing PVC (PersistentVolumeClaim) If the provisioner + or an external controller can support the specified + data source, it will create a new volume based on + the contents of the specified data source. When the + AnyVolumeDataSource feature gate is enabled, dataSource + contents will be copied to dataSourceRef, and dataSourceRef + contents will be copied to dataSource when dataSourceRef.namespace + is not specified. If the namespace is specified, then + dataSourceRef will not be copied to dataSource.' + properties: + apiGroup: + description: APIGroup is the group for the resource + being referenced. If APIGroup is not specified, + the specified Kind must be in the core API group. + For any other third-party types, APIGroup is required. + type: string + kind: + description: Kind is the type of resource being + referenced + type: string + name: + description: Name is the name of resource being + referenced + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + dataSourceRef: + description: 'dataSourceRef specifies the object from + which to populate the volume with data, if a non-empty + volume is desired. This may be any object from a non-empty + API group (non core object) or a PersistentVolumeClaim + object. When this field is specified, volume binding + will only succeed if the type of the specified object + matches some installed volume populator or dynamic + provisioner. This field will replace the functionality + of the dataSource field and as such if both fields + are non-empty, they must have the same value. For + backwards compatibility, when namespace isn''t specified + in dataSourceRef, both fields (dataSource and dataSourceRef) + will be set to the same value automatically if one + of them is empty and the other is non-empty. When + namespace is specified in dataSourceRef, dataSource + isn''t set to the same value and must be empty. There + are three important differences between dataSource + and dataSourceRef: * While dataSource only allows + two specific types of objects, dataSourceRef allows + any non-core object, as well as PersistentVolumeClaim + objects. * While dataSource ignores disallowed values + (dropping them), dataSourceRef preserves all values, + and generates an error if a disallowed value is specified. + * While dataSource only allows local objects, dataSourceRef + allows objects in any namespaces. (Beta) Using this + field requires the AnyVolumeDataSource feature gate + to be enabled. (Alpha) Using the namespace field of + dataSourceRef requires the CrossNamespaceVolumeDataSource + feature gate to be enabled.' + properties: + apiGroup: + description: APIGroup is the group for the resource + being referenced. If APIGroup is not specified, + the specified Kind must be in the core API group. + For any other third-party types, APIGroup is required. + type: string + kind: + description: Kind is the type of resource being + referenced + type: string + name: + description: Name is the name of resource being + referenced + type: string + namespace: + description: Namespace is the namespace of resource + being referenced Note that when a namespace is + specified, a gateway.networking.k8s.io/ReferenceGrant + object is required in the referent namespace to + allow that namespace's owner to accept the reference. + See the ReferenceGrant documentation for details. + (Alpha) This field requires the CrossNamespaceVolumeDataSource + feature gate to be enabled. + type: string + required: + - kind + - name + type: object + resources: + description: 'resources represents the minimum resources + the volume should have. If RecoverVolumeExpansionFailure + feature is enabled users are allowed to specify resource + requirements that are lower than previous value but + must still be higher than capacity recorded in the + status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' + properties: + claims: + description: "Claims lists the names of resources, + defined in spec.resourceClaims, that are used + by this container. \n This is an alpha field and + requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It can + only be set for containers." + items: + description: ResourceClaim references one entry + in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one + entry in pod.spec.resourceClaims of the + Pod where this field is used. It makes that + resource available inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + 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-resources-containers/' + 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. Requests cannot + exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + selector: + description: selector is a label query over volumes + to consider for binding. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is "In", + and the values array contains only "value". The + requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + storageClassName: + description: 'storageClassName is the name of the StorageClass + required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' + type: string + volumeMode: + description: volumeMode defines what type of volume + is required by the claim. Value of Filesystem is implied + when not included in claim spec. + type: string + volumeName: + description: volumeName is the binding reference to + the PersistentVolume backing this claim. + type: string + type: object + volumeSource: + description: volumeSource describes the volume will be restored + from the specified volume of the backup targetVolumes. + required if the backup uses volume snapshot. + type: string + required: + - metadata + - volumeClaimSpec + type: object + x-kubernetes-validations: + - message: at least one exists for volumeSource and mountPath. + rule: self.volumeSource != '' || self.mountPath !='' + type: array + x-kubernetes-validations: + - message: forbidden to update spec.prepareDataConfig.volumeClaims + rule: self == oldSelf + volumeClaimsTemplate: + description: volumeClaimsTemplate defines a template to build + persistent Volume claims that need to be restored. these claims + will be created in an orderly manner based on the number of + replicas or reused if already exist. + properties: + replicas: + description: the replicas of persistent volume claim which + need to be created and restored. the format of created claim + name is "-". + format: int32 + minimum: 1 + type: integer + startingIndex: + description: the starting index for the created persistent + volume claim by according to template. minimum is 0. + format: int32 + minimum: 0 + type: integer + templates: + description: templates is a list of volume claims. + items: + properties: + metadata: + description: 'Standard object''s metadata. More info: + https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata' + properties: + annotations: + additionalProperties: + type: string + type: object + finalizers: + items: + type: string + type: array + labels: + additionalProperties: + type: string + type: object + name: + type: string + namespace: + type: string + type: object + mountPath: + description: mountPath path within the restoring container + at which the volume should be mounted. + type: string + volumeClaimSpec: + description: volumeClaimSpec defines the desired characteristics + of a persistent volume claim. + properties: + accessModes: + description: 'accessModes contains the desired access + modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' + items: + type: string + type: array + dataSource: + description: 'dataSource field can be used to specify + either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) + * An existing PVC (PersistentVolumeClaim) If the + provisioner or an external controller can support + the specified data source, it will create a new + volume based on the contents of the specified + data source. When the AnyVolumeDataSource feature + gate is enabled, dataSource contents will be copied + to dataSourceRef, and dataSourceRef contents will + be copied to dataSource when dataSourceRef.namespace + is not specified. If the namespace is specified, + then dataSourceRef will not be copied to dataSource.' + properties: + apiGroup: + description: APIGroup is the group for the resource + being referenced. If APIGroup is not specified, + the specified Kind must be in the core API + group. For any other third-party types, APIGroup + is required. + type: string + kind: + description: Kind is the type of resource being + referenced + type: string + name: + description: Name is the name of resource being + referenced + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + dataSourceRef: + description: 'dataSourceRef specifies the object + from which to populate the volume with data, if + a non-empty volume is desired. This may be any + object from a non-empty API group (non core object) + or a PersistentVolumeClaim object. When this field + is specified, volume binding will only succeed + if the type of the specified object matches some + installed volume populator or dynamic provisioner. + This field will replace the functionality of the + dataSource field and as such if both fields are + non-empty, they must have the same value. For + backwards compatibility, when namespace isn''t + specified in dataSourceRef, both fields (dataSource + and dataSourceRef) will be set to the same value + automatically if one of them is empty and the + other is non-empty. When namespace is specified + in dataSourceRef, dataSource isn''t set to the + same value and must be empty. There are three + important differences between dataSource and dataSourceRef: + * While dataSource only allows two specific types + of objects, dataSourceRef allows any non-core + object, as well as PersistentVolumeClaim objects. + * While dataSource ignores disallowed values (dropping + them), dataSourceRef preserves all values, and + generates an error if a disallowed value is specified. + * While dataSource only allows local objects, + dataSourceRef allows objects in any namespaces. + (Beta) Using this field requires the AnyVolumeDataSource + feature gate to be enabled. (Alpha) Using the + namespace field of dataSourceRef requires the + CrossNamespaceVolumeDataSource feature gate to + be enabled.' + properties: + apiGroup: + description: APIGroup is the group for the resource + being referenced. If APIGroup is not specified, + the specified Kind must be in the core API + group. For any other third-party types, APIGroup + is required. + type: string + kind: + description: Kind is the type of resource being + referenced + type: string + name: + description: Name is the name of resource being + referenced + type: string + namespace: + description: Namespace is the namespace of resource + being referenced Note that when a namespace + is specified, a gateway.networking.k8s.io/ReferenceGrant + object is required in the referent namespace + to allow that namespace's owner to accept + the reference. See the ReferenceGrant documentation + for details. (Alpha) This field requires the + CrossNamespaceVolumeDataSource feature gate + to be enabled. + type: string + required: + - kind + - name + type: object + resources: + description: 'resources represents the minimum resources + the volume should have. If RecoverVolumeExpansionFailure + feature is enabled users are allowed to specify + resource requirements that are lower than previous + value but must still be higher than capacity recorded + in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' + properties: + claims: + description: "Claims lists the names of resources, + defined in spec.resourceClaims, that are used + by this container. \n This is an alpha field + and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. + It can only be set for containers." + items: + description: ResourceClaim references one + entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name + of one entry in pod.spec.resourceClaims + of the Pod where this field is used. + It makes that resource available inside + a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + 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-resources-containers/' + 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. Requests + cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + selector: + description: selector is a label query over volumes + to consider for binding. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + storageClassName: + description: 'storageClassName is the name of the + StorageClass required by the claim. More info: + https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' + type: string + volumeMode: + description: volumeMode defines what type of volume + is required by the claim. Value of Filesystem + is implied when not included in claim spec. + type: string + volumeName: + description: volumeName is the binding reference + to the PersistentVolume backing this claim. + type: string + type: object + volumeSource: + description: volumeSource describes the volume will + be restored from the specified volume of the backup + targetVolumes. required if the backup uses volume + snapshot. + type: string + required: + - metadata + - volumeClaimSpec + type: object + x-kubernetes-validations: + - message: at least one exists for volumeSource and mountPath. + rule: self.volumeSource != '' || self.mountPath !='' + type: array + required: + - replicas + - templates + type: object + x-kubernetes-validations: + - message: forbidden to update spec.prepareDataConfig.volumeClaimsTemplate + rule: self == oldSelf + required: + - volumeClaimRestorePolicy + type: object + readyConfig: + description: configuration for the action of "postReady" phase. + properties: + connectionCredential: + description: credential template used for creating a connection + credential + properties: + hostKey: + description: hostKey specifies the map key of the host in + the connection credential secret. + type: string + passwordKey: + default: password + description: passwordKey specifies the map key of the password + in the connection credential secret. This password will + be saved in the backup annotation for full backup. You can + use the environment variable DP_ENCRYPTION_KEY to specify + encryption key. + type: string + portKey: + description: portKey specifies the map key of the port in + the connection credential secret. + type: string + secretName: + description: secretName refers to the Secret object that contains + the connection credential. + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + usernameKey: + default: username + description: usernameKey specifies the map key of the user + in the connection credential secret. + type: string + required: + - secretName + type: object + execAction: + description: configuration for exec action. + properties: + target: + description: execActionTarget defines the pods that need to + be executed for the exec action. will execute on all pods + that meet the conditions. + properties: + podSelector: + description: kubectl exec in all selected pods. + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. + A single {key,value} in the matchLabels map is equivalent + to an element of matchExpressions, whose key field + is "key", the operator is "In", and the values array + contains only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + required: + - podSelector + type: object + type: object + jobAction: + description: configuration for job action. + properties: + target: + description: jobActionTarget defines the pod that need to + be executed for the job action. will select a pod that meets + the conditions to execute. + properties: + podSelector: + description: select one of the pods which selected by + labels to build the job spec, such as mount required + volumes and inject built-in env of the selected pod. + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. + A single {key,value} in the matchLabels map is equivalent + to an element of matchExpressions, whose key field + is "key", the operator is "In", and the values array + contains only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + volumeMounts: + description: volumeMounts defines which volumes of the + selected pod need to be mounted on the restoring pod. + 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 + required: + - podSelector + type: object + required: + - target + type: object + readinessProbe: + description: periodic probe of the service readiness. controller + will perform postReadyHooks of BackupScript.spec.restore after + the service readiness when readinessProbe is configured. + properties: + exec: + description: exec specifies the action to take. + properties: + command: + description: refer to container command. + items: + type: string + type: array + image: + description: refer to container image. + type: string + required: + - command + - image + type: object + initialDelaySeconds: + description: number of seconds after the container has started + before probe is initiated. + minimum: 0 + type: integer + periodSeconds: + default: 5 + description: how often (in seconds) to perform the probe. + defaults to 5 second, minimum value is 1. + minimum: 1 + type: integer + timeoutSeconds: + default: 30 + description: number of seconds after which the probe times + out. defaults to 30 second, minimum value is 1. + minimum: 1 + type: integer + required: + - exec + type: object + type: object + x-kubernetes-validations: + - message: at least one exists for jobAction and execAction. + rule: has(self.jobAction) || has(self.execAction) + resources: + description: restore the specified resources of kubernetes. + properties: + included: + description: will restore the specified resources + items: + properties: + groupResource: + type: string + labelSelector: + description: select the specified resource for recovery + by label. + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. + A single {key,value} in the matchLabels map is equivalent + to an element of matchExpressions, whose key field + is "key", the operator is "In", and the values array + contains only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + required: + - groupResource + type: object + type: array + type: object + x-kubernetes-validations: + - message: forbidden to update spec.resources + rule: self == oldSelf + restoreTime: + description: restoreTime is the point in time for restoring. + pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z$ + type: string + x-kubernetes-validations: + - message: forbidden to update spec.restoreTime + rule: self == oldSelf + serviceAccountName: + description: service account name which needs for recovery pod. + type: string + required: + - backup + type: object + status: + description: RestoreStatus defines the observed state of Restore + properties: + actions: + description: recorded all restore actions performed. + properties: + postReady: + description: record the actions for postReady phase. + items: + properties: + backupName: + description: which backup's restore action belongs to. + type: string + endTime: + description: endTime is the completion time for the restore + job. + format: date-time + type: string + message: + description: message is a human readable message indicating + details about the object condition. + type: string + name: + description: name describes the name of the recovery action + based on the current backup. + type: string + objectKey: + description: the execution object of the restore action. + type: string + startTime: + description: startTime is the start time for the restore + job. + format: date-time + type: string + status: + description: the status of this action. + enum: + - Processing + - Completed + - Failed + type: string + required: + - backupName + - name + - objectKey + type: object + type: array + prepareData: + description: record the actions for prepareData phase. + items: + properties: + backupName: + description: which backup's restore action belongs to. + type: string + endTime: + description: endTime is the completion time for the restore + job. + format: date-time + type: string + message: + description: message is a human readable message indicating + details about the object condition. + type: string + name: + description: name describes the name of the recovery action + based on the current backup. + type: string + objectKey: + description: the execution object of the restore action. + type: string + startTime: + description: startTime is the start time for the restore + job. + format: date-time + type: string + status: + description: the status of this action. + enum: + - Processing + - Completed + - Failed + type: string + required: + - backupName + - name + - objectKey + type: object + type: array + type: object + completionTimestamp: + description: Date/time when the restore finished being processed. + format: date-time + type: string + conditions: + description: describe current state of restore API Resource, like + warning. + items: + description: "Condition contains details for one aspect of the current + state of this API Resource. --- This struct is intended for direct + use as an array at the field path .status.conditions. For example, + \n type FooStatus struct{ // Represents the observations of a + foo's current state. // Known .status.conditions.type are: \"Available\", + \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge + // +listType=map // +listMapKey=type Conditions []metav1.Condition + `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" + protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" + properties: + lastTransitionTime: + description: lastTransitionTime is the last time the condition + transitioned from one status to another. This should be when + the underlying condition changed. If that is not known, then + using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: message is a human readable message indicating + details about the transition. This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: observedGeneration represents the .metadata.generation + that the condition was set based upon. For instance, if .metadata.generation + is currently 12, but the .status.conditions[x].observedGeneration + is 9, the condition is out of date with respect to the current + state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: reason contains a programmatic identifier indicating + the reason for the condition's last transition. Producers + of specific condition types may define expected values and + meanings for this field, and whether the values are considered + a guaranteed API. The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + --- Many .condition.type values are consistent across resources + like Available, but because arbitrary conditions can be useful + (see .node.status.conditions), the ability to deconflict is + important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + duration: + description: The duration time of restore execution. When converted + to a string, the form is "1h2m0.5s". + type: string + phase: + description: RestorePhase The current phase. Valid values are Running, + Completed, Failed, AsDataSource. + enum: + - Running + - Completed + - Failed + - AsDataSource + type: string + startTimestamp: + description: Date/time when the restore started being processed. + format: date-time + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.12.1 + labels: + app.kubernetes.io/name: kubeblocks + name: addons.extensions.kubeblocks.io +spec: + group: extensions.kubeblocks.io + names: + categories: + - kubeblocks + kind: Addon + listKind: AddonList + plural: addons + singular: addon + scope: Cluster + versions: + - additionalPrinterColumns: + - description: addon types + jsonPath: .spec.type + name: TYPE + type: string + - description: status phase + jsonPath: .status.phase + name: STATUS + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: Addon is the Schema for the add-ons 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: + type: object + spec: + description: AddonSpec defines the desired state of an add-on. + properties: + cliPlugins: + description: Plugin installation spec. + items: + properties: + description: + description: The description of the plugin. + type: string + indexRepository: + description: The index repository of the plugin. + type: string + name: + description: Name of the plugin. + type: string + required: + - indexRepository + - name + type: object + type: array + defaultInstallValues: + description: Default installation parameters. + items: + properties: + enabled: + description: enabled can be set if there are no specific installation + attributes to be set. + type: boolean + extras: + description: Installs spec. for extra items. + items: + properties: + name: + description: Name of the item. + type: string + persistentVolumeEnabled: + description: Persistent Volume Enabled value. + type: boolean + replicas: + description: Replicas value. + format: int32 + type: integer + resources: + description: Resource requirements. + 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-resources-containers/.' + 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, it defaults to + an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/.' + type: object + type: object + storageClass: + description: Storage class name. + type: string + tolerations: + description: Tolerations JSON array string value. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + persistentVolumeEnabled: + description: Persistent Volume Enabled value. + type: boolean + replicas: + description: Replicas value. + format: int32 + type: integer + resources: + description: Resource requirements. + 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-resources-containers/.' + 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, it defaults to an implementation-defined value. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/.' + type: object + type: object + selectors: + description: Addon installs parameters selectors by default. + If multiple selectors are provided, all selectors must evaluate + to true. + items: + properties: + key: + description: The selector key. Valid values are KubeVersion, + KubeGitVersion and KubeProvider. "KubeVersion" the semver + expression of Kubernetes versions, i.e., v1.24. "KubeGitVersion" + may contain distro. info., i.e., v1.24.4+eks. "KubeProvider" + the Kubernetes provider, i.e., aws, gcp, azure, huaweiCloud, + tencentCloud etc. + enum: + - KubeGitVersion + - KubeVersion + - KubeProvider + type: string + operator: + description: "Represents a key's relationship to a set + of values. Valid operators are Contains, NotIn, DoesNotContain, + MatchRegex, and DoesNoteMatchRegex. \n Possible enum + values: `\"Contains\"` line contains a string. `\"DoesNotContain\"` + line does not contain a string. `\"MatchRegex\"` line + contains a match to the regular expression. `\"DoesNotMatchRegex\"` + line does not contain a match to the regular expression." + enum: + - Contains + - DoesNotContain + - MatchRegex + - DoesNotMatchRegex + type: string + values: + description: An array of string values. It serves as an + "OR" expression to the operator. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + storageClass: + description: Storage class name. + type: string + tolerations: + description: Tolerations JSON array string value. + type: string + type: object + minItems: 1 + type: array + description: + description: Addon description. + type: string + helm: + description: Helm installation spec. It's processed only when type=helm. + properties: + chartLocationURL: + description: A Helm Chart location URL. + type: string + chartsImage: + description: chartsImage defines the image of Helm charts. + type: string + chartsPathInImage: + description: chartsPathInImage defines the path of Helm charts + in the image. It's used to copy Helm charts from the image to + the shared volume. + type: string + installOptions: + additionalProperties: + type: string + description: installOptions defines Helm release installation + options. + type: object + installValues: + description: HelmInstallValues defines Helm release installation + set values. + properties: + configMapRefs: + description: Selects a key of a ConfigMap item list. The value + of ConfigMap can be a JSON or YAML string content. Use a + key name with ".json" or ".yaml" or ".yml" extension name + to specify a content type. + items: + properties: + key: + description: The key to select. + type: string + name: + description: Object name of the referent. + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + required: + - key + - name + type: object + type: array + secretRefs: + description: Selects a key of a Secrets item list. The value + of Secrets can be a JSON or YAML string content. Use a key + name with ".json" or ".yaml" or ".yml" extension name to + specify a content type. + items: + properties: + key: + description: The key to select. + type: string + name: + description: Object name of the referent. + pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ + type: string + required: + - key + - name + type: object + type: array + setJSONValues: + description: Helm install set JSON values. It can specify + multiple or separate values with commas(key1=jsonval1,key2=jsonval2). + items: + type: string + type: array + setValues: + description: Helm install set values. It can specify multiple + or separate values with commas(key1=val1,key2=val2). + items: + type: string + type: array + urls: + items: + type: string + type: array + type: object + valuesMapping: + description: valuesMapping defines add-on normalized resources + parameters mapped to Helm values' keys. + properties: + extras: + description: Helm value mapping items for extra items. + items: + properties: + jsonMap: + description: 'jsonMap defines the "key" mapping values. + The valid key is tolerations. Enum values explained: + `"tolerations"` sets the toleration mapping key.' + properties: + tolerations: + description: tolerations sets the toleration mapping + key. + type: string + type: object + name: + description: Name of the item. + type: string + resources: + description: resources sets resources related mapping + keys. + properties: + cpu: + description: cpu sets CPU requests and limits mapping + keys. + properties: + limits: + description: Limits value mapping key. + type: string + requests: + description: Requests value mapping key. + type: string + type: object + memory: + description: memory sets Memory requests and limits + mapping keys. + properties: + limits: + description: Limits value mapping key. + type: string + requests: + description: Requests value mapping key. + type: string + type: object + storage: + description: storage sets the storage size value + mapping key. + type: string + type: object + valueMap: + description: 'valueMap define the "key" mapping values. + Valid keys are replicaCount, persistentVolumeEnabled, + and storageClass. Enum values explained: `"replicaCount"` + sets the replicaCount value mapping key. `"persistentVolumeEnabled"` + sets the persistent volume enabled mapping key. `"storageClass"` + sets the storageClass mapping key.' + properties: + persistentVolumeEnabled: + description: persistentVolumeEnabled sets the persistent + volume enabled mapping key. + type: string + replicaCount: + description: replicaCount sets the replicaCount + value mapping key. + type: string + storageClass: + description: storageClass sets the storageClass + mapping key. + type: string + type: object + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + jsonMap: + description: 'jsonMap defines the "key" mapping values. The + valid key is tolerations. Enum values explained: `"tolerations"` + sets the toleration mapping key.' + properties: + tolerations: + description: tolerations sets the toleration mapping key. + type: string + type: object + resources: + description: resources sets resources related mapping keys. + properties: + cpu: + description: cpu sets CPU requests and limits mapping + keys. + properties: + limits: + description: Limits value mapping key. + type: string + requests: + description: Requests value mapping key. + type: string + type: object + memory: + description: memory sets Memory requests and limits mapping + keys. + properties: + limits: + description: Limits value mapping key. + type: string + requests: + description: Requests value mapping key. + type: string + type: object + storage: + description: storage sets the storage size value mapping + key. + type: string + type: object + valueMap: + description: 'valueMap define the "key" mapping values. Valid + keys are replicaCount, persistentVolumeEnabled, and storageClass. + Enum values explained: `"replicaCount"` sets the replicaCount + value mapping key. `"persistentVolumeEnabled"` sets the + persistent volume enabled mapping key. `"storageClass"` + sets the storageClass mapping key.' + properties: + persistentVolumeEnabled: + description: persistentVolumeEnabled sets the persistent + volume enabled mapping key. + type: string + replicaCount: + description: replicaCount sets the replicaCount value + mapping key. + type: string + storageClass: + description: storageClass sets the storageClass mapping + key. + type: string + type: object + type: object + required: + - chartLocationURL + type: object + x-kubernetes-validations: + - message: chartsImage is required when chartLocationURL starts with + 'file://' + rule: 'self.chartLocationURL.startsWith(''file://'') ? has(self.chartsImage) + : true' + install: + description: Installation parameters. + properties: + enabled: + description: enabled can be set if there are no specific installation + attributes to be set. + type: boolean + extras: + description: Installs spec. for extra items. + items: + properties: + name: + description: Name of the item. + type: string + persistentVolumeEnabled: + description: Persistent Volume Enabled value. + type: boolean + replicas: + description: Replicas value. + format: int32 + type: integer + resources: + description: Resource requirements. + 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-resources-containers/.' + 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, it defaults to an + implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/.' + type: object + type: object + storageClass: + description: Storage class name. + type: string + tolerations: + description: Tolerations JSON array string value. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + persistentVolumeEnabled: + description: Persistent Volume Enabled value. + type: boolean + replicas: + description: Replicas value. + format: int32 + type: integer + resources: + description: Resource requirements. + 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-resources-containers/.' + 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, + it defaults to an implementation-defined value. More info: + https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/.' + type: object + type: object + storageClass: + description: Storage class name. + type: string + tolerations: + description: Tolerations JSON array string value. + type: string + type: object + installable: + description: Addon installable spec. It provides selector and auto-install + settings. + properties: + autoInstall: + default: false + description: autoInstall defines an add-on should be installed + automatically. + type: boolean + selectors: + description: Add-on installable selectors. If multiple selectors + are provided, all selectors must evaluate to true. + items: + properties: + key: + description: The selector key. Valid values are KubeVersion, + KubeGitVersion and KubeProvider. "KubeVersion" the semver + expression of Kubernetes versions, i.e., v1.24. "KubeGitVersion" + may contain distro. info., i.e., v1.24.4+eks. "KubeProvider" + the Kubernetes provider, i.e., aws, gcp, azure, huaweiCloud, + tencentCloud etc. + enum: + - KubeGitVersion + - KubeVersion + - KubeProvider + type: string + operator: + description: "Represents a key's relationship to a set of + values. Valid operators are Contains, NotIn, DoesNotContain, + MatchRegex, and DoesNoteMatchRegex. \n Possible enum values: + `\"Contains\"` line contains a string. `\"DoesNotContain\"` + line does not contain a string. `\"MatchRegex\"` line + contains a match to the regular expression. `\"DoesNotMatchRegex\"` + line does not contain a match to the regular expression." + enum: + - Contains + - DoesNotContain + - MatchRegex + - DoesNotMatchRegex + type: string + values: + description: An array of string values. It serves as an + "OR" expression to the operator. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + required: + - autoInstall + type: object + type: + description: Add-on type. The valid value is helm. + enum: + - Helm + type: string + required: + - defaultInstallValues + - type + type: object + x-kubernetes-validations: + - message: spec.helm is required when spec.type is Helm, and forbidden + otherwise + rule: 'has(self.type) && self.type == ''Helm'' ? has(self.helm) : !has(self.helm)' + status: + description: AddonStatus defines the observed state of an add-on. + properties: + conditions: + description: Describes the current state of add-on API installation + conditions. + items: + description: "Condition contains details for one aspect of the current + state of this API Resource. --- This struct is intended for direct + use as an array at the field path .status.conditions. For example, + \n type FooStatus struct{ // Represents the observations of a + foo's current state. // Known .status.conditions.type are: \"Available\", + \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge + // +listType=map // +listMapKey=type Conditions []metav1.Condition + `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" + protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" + properties: + lastTransitionTime: + description: lastTransitionTime is the last time the condition + transitioned from one status to another. This should be when + the underlying condition changed. If that is not known, then + using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: message is a human readable message indicating + details about the transition. This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: observedGeneration represents the .metadata.generation + that the condition was set based upon. For instance, if .metadata.generation + is currently 12, but the .status.conditions[x].observedGeneration + is 9, the condition is out of date with respect to the current + state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: reason contains a programmatic identifier indicating + the reason for the condition's last transition. Producers + of specific condition types may define expected values and + meanings for this field, and whether the values are considered + a guaranteed API. The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + --- Many .condition.type values are consistent across resources + like Available, but because arbitrary conditions can be useful + (see .node.status.conditions), the ability to deconflict is + important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + observedGeneration: + description: observedGeneration is the most recent generation observed + for this add-on. It corresponds to the add-on's generation, which + is updated on mutation by the API Server. + format: int64 + type: integer + phase: + description: Add-on installation phases. Valid values are Disabled, + Enabled, Failed, Enabling, Disabling. + enum: + - Disabled + - Enabled + - Failed + - Enabling + - Disabling + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.12.1 + labels: + app.kubernetes.io/name: kubeblocks + name: storageproviders.storage.kubeblocks.io +spec: + group: storage.kubeblocks.io + names: + categories: + - kubeblocks + kind: StorageProvider + listKind: StorageProviderList + plural: storageproviders + singular: storageprovider + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .status.phase + name: STATUS + type: string + - jsonPath: .spec.csiDriverName + name: CSIDRIVER + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: StorageProvider is the Schema for the storageproviders API StorageProvider + describes how to provision PVCs for a specific storage system (e.g. S3, + NFS, etc), by using the CSI driver. + 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: + type: object + spec: + description: StorageProviderSpec defines the desired state of StorageProvider + properties: + csiDriverName: + description: The name of the CSI driver used by this StorageProvider. + type: string + csiDriverSecretTemplate: + description: 'A Go template for rendering a secret which will be used + by the CSI driver. The template will be rendered with the following + variables: - Parameters: a map of parameters defined in the ParametersSchema.' + type: string + datasafedConfigTemplate: + description: 'A Go template for rendering a config used by the datasafed + command. The template will be rendered with the following variables: + - Parameters: a map of parameters defined in the ParametersSchema.' + type: string + parametersSchema: + description: The schema describes the parameters required by this + StorageProvider, when rendering the templates. + properties: + credentialFields: + description: credentialFields are the fields used to generate + the secret. + items: + type: string + type: array + openAPIV3Schema: + description: openAPIV3Schema is the OpenAPI v3 schema to use for + validation and pruning. + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + persistentVolumeClaimTemplate: + description: 'A Go template for rendering a PersistentVolumeClaim. + The template will be rendered with the following variables: - Parameters: + a map of parameters defined in the ParametersSchema. - GeneratedStorageClassName: + the name of the storage class generated with the StorageClassTemplate.' + type: string + storageClassTemplate: + description: 'A Go template for rendering a storage class which will + be used by the CSI driver. The template will be rendered with the + following variables: - Parameters: a map of parameters defined in + the ParametersSchema. - CSIDriverSecretRef: the reference of the + secret created by the CSIDriverSecretTemplate.' + type: string + type: object + status: + description: StorageProviderStatus defines the observed state of StorageProvider + properties: + conditions: + description: Describes the current state of the storage provider. + items: + description: "Condition contains details for one aspect of the current + state of this API Resource. --- This struct is intended for direct + use as an array at the field path .status.conditions. For example, + \n type FooStatus struct{ // Represents the observations of a + foo's current state. // Known .status.conditions.type are: \"Available\", + \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge + // +listType=map // +listMapKey=type Conditions []metav1.Condition + `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" + protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" + properties: + lastTransitionTime: + description: lastTransitionTime is the last time the condition + transitioned from one status to another. This should be when + the underlying condition changed. If that is not known, then + using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: message is a human readable message indicating + details about the transition. This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: observedGeneration represents the .metadata.generation + that the condition was set based upon. For instance, if .metadata.generation + is currently 12, but the .status.conditions[x].observedGeneration + is 9, the condition is out of date with respect to the current + state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: reason contains a programmatic identifier indicating + the reason for the condition's last transition. Producers + of specific condition types may define expected values and + meanings for this field, and whether the values are considered + a guaranteed API. The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + --- Many .condition.type values are consistent across resources + like Available, but because arbitrary conditions can be useful + (see .node.status.conditions), the ability to deconflict is + important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + phase: + description: Storage provider reconciliation phases. Valid values + are NotReady, Ready. + enum: + - NotReady + - Ready + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.12.1 + labels: + app.kubernetes.io/name: kubeblocks + name: replicatedstatemachines.workloads.kubeblocks.io +spec: + group: workloads.kubeblocks.io + names: + categories: + - kubeblocks + - all + kind: ReplicatedStateMachine + listKind: ReplicatedStateMachineList + plural: replicatedstatemachines + shortNames: + - rsm + singular: replicatedstatemachine + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: leader pod name. + jsonPath: .status.membersStatus[?(@.role.isLeader==true)].podName + name: LEADER + type: string + - description: ready replicas. + jsonPath: .status.readyReplicas + name: READY + type: string + - description: total replicas. + jsonPath: .status.replicas + name: REPLICAS + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: ReplicatedStateMachine is the Schema for the replicatedstatemachines + 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: + type: object + spec: + description: ReplicatedStateMachineSpec defines the desired state of ReplicatedStateMachine + properties: + alternativeServices: + description: AlternativeServices defines Alternative Services selector + pattern specifier. can be used for creating Readonly service. + items: + description: Service is a named abstraction of software service + (for example, mysql) consisting of local port (for example 3306) + that the proxy listens on, and the selector that determines which + pods will answer requests sent through the proxy. + 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: + description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata' + properties: + annotations: + additionalProperties: + type: string + type: object + finalizers: + items: + type: string + type: array + labels: + additionalProperties: + type: string + type: object + name: + type: string + namespace: + type: string + type: object + spec: + description: Spec defines the behavior of a service. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + properties: + allocateLoadBalancerNodePorts: + description: allocateLoadBalancerNodePorts defines if NodePorts + will be automatically allocated for services with type + LoadBalancer. Default is "true". It may be set to "false" + if the cluster load-balancer does not rely on NodePorts. If + the caller requests specific NodePorts (by specifying + a value), those requests will be respected, regardless + of this field. This field may only be set for services + with type LoadBalancer and will be cleared if the type + is changed to any other type. + type: boolean + clusterIP: + description: 'clusterIP is the IP address of the service + and is usually assigned randomly. If an address is specified + manually, is in-range (as per system configuration), and + is not in use, it will be allocated to the service; otherwise + creation of the service will fail. This field may not + be changed through updates unless the type field is also + being changed to ExternalName (which requires this field + to be blank) or the type field is being changed from ExternalName + (in which case this field may optionally be specified, + as describe above). Valid values are "None", empty string + (""), or a valid IP address. Setting this to "None" makes + a "headless service" (no virtual IP), which is useful + when direct endpoint connections are preferred and proxying + is not required. Only applies to types ClusterIP, NodePort, + and LoadBalancer. If this field is specified when creating + a Service of type ExternalName, creation will fail. This + field will be wiped when updating a Service to type ExternalName. + More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies' + type: string + clusterIPs: + description: "ClusterIPs is a list of IP addresses assigned + to this service, and are usually assigned randomly. If + an address is specified manually, is in-range (as per + system configuration), and is not in use, it will be allocated + to the service; otherwise creation of the service will + fail. This field may not be changed through updates unless + the type field is also being changed to ExternalName (which + requires this field to be empty) or the type field is + being changed from ExternalName (in which case this field + may optionally be specified, as describe above). Valid + values are \"None\", empty string (\"\"), or a valid IP + address. Setting this to \"None\" makes a \"headless + service\" (no virtual IP), which is useful when direct + endpoint connections are preferred and proxying is not + required. Only applies to types ClusterIP, NodePort, + and LoadBalancer. If this field is specified when creating + a Service of type ExternalName, creation will fail. This + field will be wiped when updating a Service to type ExternalName. + \ If this field is not specified, it will be initialized + from the clusterIP field. If this field is specified, + clients must ensure that clusterIPs[0] and clusterIP have + the same value. \n This field may hold a maximum of two + entries (dual-stack IPs, in either order). These IPs must + correspond to the values of the ipFamilies field. Both + clusterIPs and ipFamilies are governed by the ipFamilyPolicy + field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies" + items: + type: string + type: array + x-kubernetes-list-type: atomic + externalIPs: + description: externalIPs is a list of IP addresses for which + nodes in the cluster will also accept traffic for this + service. These IPs are not managed by Kubernetes. The + user is responsible for ensuring that traffic arrives + at a node with this IP. A common example is external + load-balancers that are not part of the Kubernetes system. + items: + type: string + type: array + externalName: + description: externalName is the external reference that + discovery mechanisms will return as an alias for this + service (e.g. a DNS CNAME record). No proxying will be + involved. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) + and requires `type` to be "ExternalName". + type: string + externalTrafficPolicy: + description: externalTrafficPolicy describes how nodes distribute + service traffic they receive on one of the Service's "externally-facing" + addresses (NodePorts, ExternalIPs, and LoadBalancer IPs). + If set to "Local", the proxy will configure the service + in a way that assumes that external load balancers will + take care of balancing the service traffic between nodes, + and so each node will deliver traffic only to the node-local + endpoints of the service, without masquerading the client + source IP. (Traffic mistakenly sent to a node with no + endpoints will be dropped.) The default value, "Cluster", + uses the standard behavior of routing to all endpoints + evenly (possibly modified by topology and other features). + Note that traffic sent to an External IP or LoadBalancer + IP from within the cluster will always get "Cluster" semantics, + but clients sending to a NodePort from within the cluster + may need to take traffic policy into account when picking + a node. + type: string + healthCheckNodePort: + description: healthCheckNodePort specifies the healthcheck + nodePort for the service. This only applies when type + is set to LoadBalancer and externalTrafficPolicy is set + to Local. If a value is specified, is in-range, and is + not in use, it will be used. If not specified, a value + will be automatically allocated. External systems (e.g. + load-balancers) can use this port to determine if a given + node holds endpoints for this service or not. If this + field is specified when creating a Service which does + not need it, creation will fail. This field will be wiped + when updating a Service to no longer need it (e.g. changing + type). This field cannot be updated once set. + format: int32 + type: integer + internalTrafficPolicy: + description: InternalTrafficPolicy describes how nodes distribute + service traffic they receive on the ClusterIP. If set + to "Local", the proxy will assume that pods only want + to talk to endpoints of the service on the same node as + the pod, dropping the traffic if there are no local endpoints. + The default value, "Cluster", uses the standard behavior + of routing to all endpoints evenly (possibly modified + by topology and other features). + type: string + ipFamilies: + description: "IPFamilies is a list of IP families (e.g. + IPv4, IPv6) assigned to this service. This field is usually + assigned automatically based on cluster configuration + and the ipFamilyPolicy field. If this field is specified + manually, the requested family is available in the cluster, + and ipFamilyPolicy allows it, it will be used; otherwise + creation of the service will fail. This field is conditionally + mutable: it allows for adding or removing a secondary + IP family, but it does not allow changing the primary + IP family of the Service. Valid values are \"IPv4\" and + \"IPv6\". This field only applies to Services of types + ClusterIP, NodePort, and LoadBalancer, and does apply + to \"headless\" services. This field will be wiped when + updating a Service to type ExternalName. \n This field + may hold a maximum of two entries (dual-stack families, + in either order). These families must correspond to the + values of the clusterIPs field, if specified. Both clusterIPs + and ipFamilies are governed by the ipFamilyPolicy field." + items: + description: IPFamily represents the IP Family (IPv4 or + IPv6). This type is used to express the family of an + IP expressed by a type (e.g. service.spec.ipFamilies). + type: string + type: array + x-kubernetes-list-type: atomic + ipFamilyPolicy: + description: IPFamilyPolicy represents the dual-stack-ness + requested or required by this Service. If there is no + value provided, then this field will be set to SingleStack. + Services can be "SingleStack" (a single IP family), "PreferDualStack" + (two IP families on dual-stack configured clusters or + a single IP family on single-stack clusters), or "RequireDualStack" + (two IP families on dual-stack configured clusters, otherwise + fail). The ipFamilies and clusterIPs fields depend on + the value of this field. This field will be wiped when + updating a service to type ExternalName. + type: string + loadBalancerClass: + description: loadBalancerClass is the class of the load + balancer implementation this Service belongs to. If specified, + the value of this field must be a label-style identifier, + with an optional prefix, e.g. "internal-vip" or "example.com/internal-vip". + Unprefixed names are reserved for end-users. This field + can only be set when the Service type is 'LoadBalancer'. + If not set, the default load balancer implementation is + used, today this is typically done through the cloud provider + integration, but should apply for any default implementation. + If set, it is assumed that a load balancer implementation + is watching for Services with a matching class. Any default + load balancer implementation (e.g. cloud providers) should + ignore Services that set this field. This field can only + be set when creating or updating a Service to type 'LoadBalancer'. + Once set, it can not be changed. This field will be wiped + when a service is updated to a non 'LoadBalancer' type. + type: string + loadBalancerIP: + description: 'Only applies to Service Type: LoadBalancer. + This feature depends on whether the underlying cloud-provider + supports specifying the loadBalancerIP when a load balancer + is created. This field will be ignored if the cloud-provider + does not support the feature. Deprecated: This field was + under-specified and its meaning varies across implementations. + Using it is non-portable and it may not support dual-stack. + Users are encouraged to use implementation-specific annotations + when available.' + type: string + loadBalancerSourceRanges: + description: 'If specified and supported by the platform, + this will restrict traffic through the cloud-provider + load-balancer will be restricted to the specified client + IPs. This field will be ignored if the cloud-provider + does not support the feature." More info: https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/' + items: + type: string + type: array + ports: + description: 'The list of ports that are exposed by this + service. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies' + items: + description: ServicePort contains information on service's + port. + properties: + appProtocol: + description: "The application protocol for this port. + This is used as a hint for implementations to offer + richer behavior for protocols that they understand. + This field follows standard Kubernetes label syntax. + Valid values are either: \n * Un-prefixed protocol + names - reserved for IANA standard service names + (as per RFC-6335 and https://www.iana.org/assignments/service-names). + \n * Kubernetes-defined prefixed names: * 'kubernetes.io/h2c' + - HTTP/2 over cleartext as described in https://www.rfc-editor.org/rfc/rfc7540 + * 'kubernetes.io/ws' - WebSocket over cleartext + as described in https://www.rfc-editor.org/rfc/rfc6455 + * 'kubernetes.io/wss' - WebSocket over TLS as described + in https://www.rfc-editor.org/rfc/rfc6455 \n * Other + protocols should use implementation-defined prefixed + names such as mycompany.com/my-custom-protocol." + type: string + name: + description: The name of this port within the service. + This must be a DNS_LABEL. All ports within a ServiceSpec + must have unique names. When considering the endpoints + for a Service, this must match the 'name' field + in the EndpointPort. Optional if only one ServicePort + is defined on this service. + type: string + nodePort: + description: 'The port on each node on which this + service is exposed when type is NodePort or LoadBalancer. Usually + assigned by the system. If a value is specified, + in-range, and not in use it will be used, otherwise + the operation will fail. If not specified, a port + will be allocated if this Service requires one. If + this field is specified when creating a Service + which does not need it, creation will fail. This + field will be wiped when updating a Service to no + longer need it (e.g. changing type from NodePort + to ClusterIP). More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport' + format: int32 + type: integer + port: + description: The port that will be exposed by this + service. + format: int32 + type: integer + protocol: + default: TCP + description: The IP protocol for this port. Supports + "TCP", "UDP", and "SCTP". Default is TCP. + type: string + targetPort: + anyOf: + - type: integer + - type: string + description: 'Number or name of the port to access + on the pods targeted by the service. Number must + be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + If this is a string, it will be looked up as a named + port in the target Pod''s container ports. If this + is not specified, the value of the ''port'' field + is used (an identity map). This field is ignored + for services with clusterIP=None, and should be + omitted or set equal to the ''port'' field. More + info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service' + x-kubernetes-int-or-string: true + required: + - port + type: object + type: array + x-kubernetes-list-map-keys: + - port + - protocol + x-kubernetes-list-type: map + publishNotReadyAddresses: + description: publishNotReadyAddresses indicates that any + agent which deals with endpoints for this Service should + disregard any indications of ready/not-ready. The primary + use case for setting this field is for a StatefulSet's + Headless Service to propagate SRV DNS records for its + Pods for the purpose of peer discovery. The Kubernetes + controllers that generate Endpoints and EndpointSlice + resources for Services interpret this to mean that all + endpoints are considered "ready" even if the Pods themselves + are not. Agents which consume only Kubernetes generated + endpoints through the Endpoints or EndpointSlice resources + can safely assume this behavior. + type: boolean + selector: + additionalProperties: + type: string + description: 'Route service traffic to pods with label keys + and values matching this selector. If empty or not present, + the service is assumed to have an external process managing + its endpoints, which Kubernetes will not modify. Only + applies to types ClusterIP, NodePort, and LoadBalancer. + Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/' + type: object + x-kubernetes-map-type: atomic + sessionAffinity: + description: 'Supports "ClientIP" and "None". Used to maintain + session affinity. Enable client IP based session affinity. + Must be ClientIP or None. Defaults to None. More info: + https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies' + type: string + sessionAffinityConfig: + description: sessionAffinityConfig contains the configurations + of session affinity. + properties: + clientIP: + description: clientIP contains the configurations of + Client IP based session affinity. + properties: + timeoutSeconds: + description: timeoutSeconds specifies the seconds + of ClientIP type session sticky time. The value + must be >0 && <=86400(for 1 day) if ServiceAffinity + == "ClientIP". Default value is 10800(for 3 hours). + format: int32 + type: integer + type: object + type: object + type: + description: 'type determines how the Service is exposed. + Defaults to ClusterIP. Valid options are ExternalName, + ClusterIP, NodePort, and LoadBalancer. "ClusterIP" allocates + a cluster-internal IP address for load-balancing to endpoints. + Endpoints are determined by the selector or if that is + not specified, by manual construction of an Endpoints + object or EndpointSlice objects. If clusterIP is "None", + no virtual IP is allocated and the endpoints are published + as a set of endpoints rather than a virtual IP. "NodePort" + builds on ClusterIP and allocates a port on every node + which routes to the same endpoints as the clusterIP. "LoadBalancer" + builds on NodePort and creates an external load-balancer + (if supported in the current cloud) which routes to the + same endpoints as the clusterIP. "ExternalName" aliases + this service to the specified externalName. Several other + fields do not apply to ExternalName services. More info: + https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types' + type: string + type: object + status: + description: 'Most recently observed status of the service. + Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status' + properties: + conditions: + description: Current service state + items: + description: "Condition contains details for one aspect + of the current state of this API Resource. --- This + struct is intended for direct use as an array at the + field path .status.conditions. For example, \n type + FooStatus struct{ // Represents the observations of + a foo's current state. // Known .status.conditions.type + are: \"Available\", \"Progressing\", and \"Degraded\" + // +patchMergeKey=type // +patchStrategy=merge // +listType=map + // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" + patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` + \n // other fields }" + properties: + lastTransitionTime: + description: lastTransitionTime is the last time the + condition transitioned from one status to another. + This should be when the underlying condition changed. If + that is not known, then using the time when the + API field changed is acceptable. + format: date-time + type: string + message: + description: message is a human readable message indicating + details about the transition. This may be an empty + string. + maxLength: 32768 + type: string + observedGeneration: + description: observedGeneration represents the .metadata.generation + that the condition was set based upon. For instance, + if .metadata.generation is currently 12, but the + .status.conditions[x].observedGeneration is 9, the + condition is out of date with respect to the current + state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: reason contains a programmatic identifier + indicating the reason for the condition's last transition. + Producers of specific condition types may define + expected values and meanings for this field, and + whether the values are considered a guaranteed API. + The value should be a CamelCase string. This field + may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, + False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in + foo.example.com/CamelCase. --- Many .condition.type + values are consistent across resources like Available, + but because arbitrary conditions can be useful (see + .node.status.conditions), the ability to deconflict + is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + loadBalancer: + description: LoadBalancer contains the current status of + the load-balancer, if one is present. + properties: + ingress: + description: Ingress is a list containing ingress points + for the load-balancer. Traffic intended for the service + should be sent to these ingress points. + items: + description: 'LoadBalancerIngress represents the status + of a load-balancer ingress point: traffic intended + for the service should be sent to an ingress point.' + properties: + hostname: + description: Hostname is set for load-balancer + ingress points that are DNS based (typically + AWS load-balancers) + type: string + ip: + description: IP is set for load-balancer ingress + points that are IP based (typically GCE or OpenStack + load-balancers) + type: string + ports: + description: Ports is a list of records of service + ports If used, every port defined in the service + should have an entry in it + items: + properties: + error: + description: 'Error is to record the problem + with the service port The format of the + error shall comply with the following + rules: - built-in error values shall be + specified in this file and those shall + use CamelCase names - cloud provider specific + error values must have names that comply + with the format foo.example.com/CamelCase. + --- The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)' + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + port: + description: Port is the port number of + the service port of which status is recorded + here + format: int32 + type: integer + protocol: + default: TCP + description: 'Protocol is the protocol of + the service port of which status is recorded + here The supported values are: "TCP", + "UDP", "SCTP"' + type: string + required: + - port + - protocol + type: object + type: array + x-kubernetes-list-type: atomic + type: object + type: array + type: object + type: object + type: object + type: array + credential: + description: Credential used to connect to DB engine + properties: + password: + description: Password variable name will be KB_RSM_PASSWORD + properties: + value: + description: 'Variable references $(VAR_NAME) are expanded + using the previously 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. Double $$ are reduced to a single $, which + allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" + will produce the string literal "$(VAR_NAME)". Escaped references + will never be expanded, regardless of whether the variable + exists or not. 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + type: object + type: object + username: + description: Username variable name will be KB_RSM_USERNAME + properties: + value: + description: 'Variable references $(VAR_NAME) are expanded + using the previously 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. Double $$ are reduced to a single $, which + allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" + will produce the string literal "$(VAR_NAME)". Escaped references + will never be expanded, regardless of whether the variable + exists or not. 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + type: object + type: object + required: + - password + - username + type: object + memberUpdateStrategy: + description: 'MemberUpdateStrategy, Members(Pods) update strategy. + serial: update Members one by one that guarantee minimum component + unavailable time. Learner -> Follower(with AccessMode=none) -> Follower(with + AccessMode=readonly) -> Follower(with AccessMode=readWrite) -> Leader + bestEffortParallel: update Members in parallel that guarantee minimum + component un-writable time. Learner, Follower(minority) in parallel + -> Follower(majority) -> Leader, keep majority online all the time. + parallel: force parallel' + enum: + - Serial + - BestEffortParallel + - Parallel + type: string + membershipReconfiguration: + description: MembershipReconfiguration provides actions to do membership + dynamic reconfiguration. + properties: + logSyncAction: + description: LogSyncAction specifies how to trigger the new member + to start log syncing previous none-nil action's Image will be + used if not configured + properties: + command: + description: Command will be executed in Container to retrieve + or process role info + items: + type: string + type: array + image: + description: utility image contains command that can be used + to retrieve of process role info + type: string + required: + - command + type: object + memberJoinAction: + description: MemberJoinAction specifies how to add member previous + none-nil action's Image will be used if not configured + properties: + command: + description: Command will be executed in Container to retrieve + or process role info + items: + type: string + type: array + image: + description: utility image contains command that can be used + to retrieve of process role info + type: string + required: + - command + type: object + memberLeaveAction: + description: MemberLeaveAction specifies how to remove member + previous none-nil action's Image will be used if not configured + properties: + command: + description: Command will be executed in Container to retrieve + or process role info + items: + type: string + type: array + image: + description: utility image contains command that can be used + to retrieve of process role info + type: string + required: + - command + type: object + promoteAction: + description: PromoteAction specifies how to tell the cluster that + the new member can join voting now previous none-nil action's + Image will be used if not configured + properties: + command: + description: Command will be executed in Container to retrieve + or process role info + items: + type: string + type: array + image: + description: utility image contains command that can be used + to retrieve of process role info + type: string + required: + - command + type: object + switchoverAction: + description: SwitchoverAction specifies how to do switchover latest + [BusyBox](https://busybox.net/) image will be used if Image + not configured + properties: + command: + description: Command will be executed in Container to retrieve + or process role info + items: + type: string + type: array + image: + description: utility image contains command that can be used + to retrieve of process role info + type: string + required: + - command + type: object + type: object + nodeAssignment: + description: NodeAssignment defines the expected assignment of nodes. + items: + properties: + name: + description: Name defines the name of statefulSet that needs + to allocate node. + type: string + nodeSpec: + description: NodeSpec defines the detailed node info that will + assign to the statefulSet. + properties: + nodeName: + description: "NodeName is a type that holds a api.Node's + Name identifier. Being a type captures intent and helps + make sure that the node name is not confused with similar + concepts (the hostname, the cloud provider id, the cloud + provider name etc) \n To clarify the various types: \n + - Node.Name is the Name field of the Node in the API. + \ This should be stored in a NodeName. Unfortunately, + because Name is part of ObjectMeta, we can't store it + as a NodeName at the API level. \n - Hostname is the hostname + of the local machine (from uname -n). However, some components + allow the user to pass in a --hostname-override flag, + which will override this in most places. In the absence + of anything more meaningful, kubelet will use Hostname + as the Node.Name when it creates the Node. \n * The cloudproviders + have the own names: GCE has InstanceName, AWS has InstanceId. + \n For GCE, InstanceName is the Name of an Instance object + in the GCE API. On GCE, Instance.Name becomes the Hostname, + and thus it makes sense also to use it as the Node.Name. + \ But that is GCE specific, and it is up to the cloudprovider + how to do this mapping. \n For AWS, the InstanceID is + not yet suitable for use as a Node.Name, so we actually + use the PrivateDnsName for the Node.Name. And this is + _not_ always the same as the hostname: if we are using + a custom DHCP domain it won't be." + type: string + type: object + type: object + type: array + paused: + description: Paused indicates that the rsm is paused, means the reconciliation + of this rsm object will be paused. + type: boolean + podManagementPolicy: + description: podManagementPolicy controls how pods are created during + initial scale up, when replacing pods on nodes, or when scaling + down. The default policy is `OrderedReady`, where pods are created + in increasing order (pod-0, then pod-1, etc) and the controller + will wait until each pod is ready before continuing. When scaling + down, the pods are removed in the opposite order. The alternative + policy is `Parallel` which will create pods in parallel to match + the desired scale without waiting, and on scale down will delete + all pods at once. + type: string + replicas: + default: 1 + description: replicas is the desired number of replicas of the given + Template. These are replicas in the sense that they are instantiations + of the same Template, but individual replicas also have a consistent + identity. If unspecified, defaults to 1. + format: int32 + minimum: 0 + type: integer + roleProbe: + description: RoleProbe provides method to probe role. + properties: + builtinHandlerName: + description: 'BuiltinHandler specifies the builtin handler name + to use to probe the role of the main container. current available + handlers: mysql, postgres, mongodb, redis, etcd, kafka. use + CustomHandler to define your own role probe function if none + of them satisfies the requirement.' + type: string + customHandler: + description: "CustomHandler defines the custom way to do role + probe. if the BuiltinHandler satisfies the requirement, use + it instead. \n how the actions defined here works: \n Actions + will be taken in serial. after all actions done, the final output + should be a single string of the role name defined in spec.Roles + latest [BusyBox](https://busybox.net/) image will be used if + Image not configured Environment variables can be used in Command: + - v_KB_RSM_LAST_STDOUT stdout from last action, watch 'v_' prefixed + - KB_RSM_USERNAME username part of credential - KB_RSM_PASSWORD + password part of credential" + items: + properties: + command: + description: Command will be executed in Container to retrieve + or process role info + items: + type: string + type: array + image: + description: utility image contains command that can be + used to retrieve of process role info + type: string + required: + - command + type: object + type: array + failureThreshold: + default: 3 + description: Minimum consecutive failures for the probe to be + considered failed after having succeeded. Defaults to 3. Minimum + value is 1. + format: int32 + minimum: 1 + type: integer + initialDelaySeconds: + default: 0 + description: Number of seconds after the container has started + before role probe has started. + format: int32 + minimum: 0 + type: integer + periodSeconds: + default: 2 + description: How often (in seconds) to perform the probe. Default + to 2 seconds. Minimum value is 1. + format: int32 + minimum: 1 + type: integer + roleUpdateMechanism: + default: ReadinessProbeEventUpdate + description: RoleUpdateMechanism specifies the way how pod role + label being updated. + enum: + - ReadinessProbeEventUpdate + - DirectAPIServerEventUpdate + type: string + successThreshold: + default: 1 + description: Minimum consecutive successes for the probe to be + considered successful after having failed. Defaults to 1. Minimum + value is 1. + format: int32 + minimum: 1 + type: integer + timeoutSeconds: + default: 1 + description: Number of seconds after which the probe times out. + Defaults to 1 second. Minimum value is 1. + format: int32 + minimum: 1 + type: integer + type: object + roles: + description: Roles, a list of roles defined in the system. + items: + properties: + accessMode: + default: ReadWrite + description: AccessMode, what service this member capable. + enum: + - None + - Readonly + - ReadWrite + type: string + canVote: + default: true + description: CanVote, whether this member has voting rights + type: boolean + isLeader: + default: false + description: IsLeader, whether this member is the leader + type: boolean + name: + default: leader + description: Name, role name. + type: string + required: + - accessMode + - name + type: object + type: array + rsmTransformPolicy: + default: ToSts + description: 'RsmTransformPolicy defines the policy generate sts using + rsm. Passed from cluster. ToSts: rsm transform to statefulSet ToPod: + rsm transform to pod' + enum: + - ToPod + - ToSts + type: string + selector: + description: 'selector is a label query over pods that should match + the replica count. It must match the pod template''s labels. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors' + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. + The requirements are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. A single + {key,value} in the matchLabels map is equivalent to an element + of matchExpressions, whose key field is "key", the operator + is "In", and the values array contains only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + service: + description: service defines the behavior of a service spec. provides + read-write service https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + 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: + description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata' + properties: + annotations: + additionalProperties: + type: string + type: object + finalizers: + items: + type: string + type: array + labels: + additionalProperties: + type: string + type: object + name: + type: string + namespace: + type: string + type: object + spec: + description: Spec defines the behavior of a service. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + properties: + allocateLoadBalancerNodePorts: + description: allocateLoadBalancerNodePorts defines if NodePorts + will be automatically allocated for services with type LoadBalancer. Default + is "true". It may be set to "false" if the cluster load-balancer + does not rely on NodePorts. If the caller requests specific + NodePorts (by specifying a value), those requests will be + respected, regardless of this field. This field may only + be set for services with type LoadBalancer and will be cleared + if the type is changed to any other type. + type: boolean + clusterIP: + description: 'clusterIP is the IP address of the service and + is usually assigned randomly. If an address is specified + manually, is in-range (as per system configuration), and + is not in use, it will be allocated to the service; otherwise + creation of the service will fail. This field may not be + changed through updates unless the type field is also being + changed to ExternalName (which requires this field to be + blank) or the type field is being changed from ExternalName + (in which case this field may optionally be specified, as + describe above). Valid values are "None", empty string + (""), or a valid IP address. Setting this to "None" makes + a "headless service" (no virtual IP), which is useful when + direct endpoint connections are preferred and proxying is + not required. Only applies to types ClusterIP, NodePort, + and LoadBalancer. If this field is specified when creating + a Service of type ExternalName, creation will fail. This + field will be wiped when updating a Service to type ExternalName. + More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies' + type: string + clusterIPs: + description: "ClusterIPs is a list of IP addresses assigned + to this service, and are usually assigned randomly. If + an address is specified manually, is in-range (as per system + configuration), and is not in use, it will be allocated + to the service; otherwise creation of the service will fail. + This field may not be changed through updates unless the + type field is also being changed to ExternalName (which + requires this field to be empty) or the type field is being + changed from ExternalName (in which case this field may + optionally be specified, as describe above). Valid values + are \"None\", empty string (\"\"), or a valid IP address. + \ Setting this to \"None\" makes a \"headless service\" + (no virtual IP), which is useful when direct endpoint connections + are preferred and proxying is not required. Only applies + to types ClusterIP, NodePort, and LoadBalancer. If this + field is specified when creating a Service of type ExternalName, + creation will fail. This field will be wiped when updating + a Service to type ExternalName. If this field is not specified, + it will be initialized from the clusterIP field. If this + field is specified, clients must ensure that clusterIPs[0] + and clusterIP have the same value. \n This field may hold + a maximum of two entries (dual-stack IPs, in either order). + These IPs must correspond to the values of the ipFamilies + field. Both clusterIPs and ipFamilies are governed by the + ipFamilyPolicy field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies" + items: + type: string + type: array + x-kubernetes-list-type: atomic + externalIPs: + description: externalIPs is a list of IP addresses for which + nodes in the cluster will also accept traffic for this service. These + IPs are not managed by Kubernetes. The user is responsible + for ensuring that traffic arrives at a node with this IP. A + common example is external load-balancers that are not part + of the Kubernetes system. + items: + type: string + type: array + externalName: + description: externalName is the external reference that discovery + mechanisms will return as an alias for this service (e.g. + a DNS CNAME record). No proxying will be involved. Must + be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) + and requires `type` to be "ExternalName". + type: string + externalTrafficPolicy: + description: externalTrafficPolicy describes how nodes distribute + service traffic they receive on one of the Service's "externally-facing" + addresses (NodePorts, ExternalIPs, and LoadBalancer IPs). + If set to "Local", the proxy will configure the service + in a way that assumes that external load balancers will + take care of balancing the service traffic between nodes, + and so each node will deliver traffic only to the node-local + endpoints of the service, without masquerading the client + source IP. (Traffic mistakenly sent to a node with no endpoints + will be dropped.) The default value, "Cluster", uses the + standard behavior of routing to all endpoints evenly (possibly + modified by topology and other features). Note that traffic + sent to an External IP or LoadBalancer IP from within the + cluster will always get "Cluster" semantics, but clients + sending to a NodePort from within the cluster may need to + take traffic policy into account when picking a node. + type: string + healthCheckNodePort: + description: healthCheckNodePort specifies the healthcheck + nodePort for the service. This only applies when type is + set to LoadBalancer and externalTrafficPolicy is set to + Local. If a value is specified, is in-range, and is not + in use, it will be used. If not specified, a value will + be automatically allocated. External systems (e.g. load-balancers) + can use this port to determine if a given node holds endpoints + for this service or not. If this field is specified when + creating a Service which does not need it, creation will + fail. This field will be wiped when updating a Service to + no longer need it (e.g. changing type). This field cannot + be updated once set. + format: int32 + type: integer + internalTrafficPolicy: + description: InternalTrafficPolicy describes how nodes distribute + service traffic they receive on the ClusterIP. If set to + "Local", the proxy will assume that pods only want to talk + to endpoints of the service on the same node as the pod, + dropping the traffic if there are no local endpoints. The + default value, "Cluster", uses the standard behavior of + routing to all endpoints evenly (possibly modified by topology + and other features). + type: string + ipFamilies: + description: "IPFamilies is a list of IP families (e.g. IPv4, + IPv6) assigned to this service. This field is usually assigned + automatically based on cluster configuration and the ipFamilyPolicy + field. If this field is specified manually, the requested + family is available in the cluster, and ipFamilyPolicy allows + it, it will be used; otherwise creation of the service will + fail. This field is conditionally mutable: it allows for + adding or removing a secondary IP family, but it does not + allow changing the primary IP family of the Service. Valid + values are \"IPv4\" and \"IPv6\". This field only applies + to Services of types ClusterIP, NodePort, and LoadBalancer, + and does apply to \"headless\" services. This field will + be wiped when updating a Service to type ExternalName. \n + This field may hold a maximum of two entries (dual-stack + families, in either order). These families must correspond + to the values of the clusterIPs field, if specified. Both + clusterIPs and ipFamilies are governed by the ipFamilyPolicy + field." + items: + description: IPFamily represents the IP Family (IPv4 or + IPv6). This type is used to express the family of an IP + expressed by a type (e.g. service.spec.ipFamilies). + type: string + type: array + x-kubernetes-list-type: atomic + ipFamilyPolicy: + description: IPFamilyPolicy represents the dual-stack-ness + requested or required by this Service. If there is no value + provided, then this field will be set to SingleStack. Services + can be "SingleStack" (a single IP family), "PreferDualStack" + (two IP families on dual-stack configured clusters or a + single IP family on single-stack clusters), or "RequireDualStack" + (two IP families on dual-stack configured clusters, otherwise + fail). The ipFamilies and clusterIPs fields depend on the + value of this field. This field will be wiped when updating + a service to type ExternalName. + type: string + loadBalancerClass: + description: loadBalancerClass is the class of the load balancer + implementation this Service belongs to. If specified, the + value of this field must be a label-style identifier, with + an optional prefix, e.g. "internal-vip" or "example.com/internal-vip". + Unprefixed names are reserved for end-users. This field + can only be set when the Service type is 'LoadBalancer'. + If not set, the default load balancer implementation is + used, today this is typically done through the cloud provider + integration, but should apply for any default implementation. + If set, it is assumed that a load balancer implementation + is watching for Services with a matching class. Any default + load balancer implementation (e.g. cloud providers) should + ignore Services that set this field. This field can only + be set when creating or updating a Service to type 'LoadBalancer'. + Once set, it can not be changed. This field will be wiped + when a service is updated to a non 'LoadBalancer' type. + type: string + loadBalancerIP: + description: 'Only applies to Service Type: LoadBalancer. + This feature depends on whether the underlying cloud-provider + supports specifying the loadBalancerIP when a load balancer + is created. This field will be ignored if the cloud-provider + does not support the feature. Deprecated: This field was + under-specified and its meaning varies across implementations. + Using it is non-portable and it may not support dual-stack. + Users are encouraged to use implementation-specific annotations + when available.' + type: string + loadBalancerSourceRanges: + description: 'If specified and supported by the platform, + this will restrict traffic through the cloud-provider load-balancer + will be restricted to the specified client IPs. This field + will be ignored if the cloud-provider does not support the + feature." More info: https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/' + items: + type: string + type: array + ports: + description: 'The list of ports that are exposed by this service. + More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies' + items: + description: ServicePort contains information on service's + port. + properties: + appProtocol: + description: "The application protocol for this port. + This is used as a hint for implementations to offer + richer behavior for protocols that they understand. + This field follows standard Kubernetes label syntax. + Valid values are either: \n * Un-prefixed protocol + names - reserved for IANA standard service names (as + per RFC-6335 and https://www.iana.org/assignments/service-names). + \n * Kubernetes-defined prefixed names: * 'kubernetes.io/h2c' + - HTTP/2 over cleartext as described in https://www.rfc-editor.org/rfc/rfc7540 + * 'kubernetes.io/ws' - WebSocket over cleartext as + described in https://www.rfc-editor.org/rfc/rfc6455 + * 'kubernetes.io/wss' - WebSocket over TLS as described + in https://www.rfc-editor.org/rfc/rfc6455 \n * Other + protocols should use implementation-defined prefixed + names such as mycompany.com/my-custom-protocol." + type: string + name: + description: The name of this port within the service. + This must be a DNS_LABEL. All ports within a ServiceSpec + must have unique names. When considering the endpoints + for a Service, this must match the 'name' field in + the EndpointPort. Optional if only one ServicePort + is defined on this service. + type: string + nodePort: + description: 'The port on each node on which this service + is exposed when type is NodePort or LoadBalancer. Usually + assigned by the system. If a value is specified, in-range, + and not in use it will be used, otherwise the operation + will fail. If not specified, a port will be allocated + if this Service requires one. If this field is specified + when creating a Service which does not need it, creation + will fail. This field will be wiped when updating + a Service to no longer need it (e.g. changing type + from NodePort to ClusterIP). More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport' + format: int32 + type: integer + port: + description: The port that will be exposed by this service. + format: int32 + type: integer + protocol: + default: TCP + description: The IP protocol for this port. Supports + "TCP", "UDP", and "SCTP". Default is TCP. + type: string + targetPort: + anyOf: + - type: integer + - type: string + description: 'Number or name of the port to access on + the pods targeted by the service. Number must be in + the range 1 to 65535. Name must be an IANA_SVC_NAME. + If this is a string, it will be looked up as a named + port in the target Pod''s container ports. If this + is not specified, the value of the ''port'' field + is used (an identity map). This field is ignored for + services with clusterIP=None, and should be omitted + or set equal to the ''port'' field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service' + x-kubernetes-int-or-string: true + required: + - port + type: object + type: array + x-kubernetes-list-map-keys: + - port + - protocol + x-kubernetes-list-type: map + publishNotReadyAddresses: + description: publishNotReadyAddresses indicates that any agent + which deals with endpoints for this Service should disregard + any indications of ready/not-ready. The primary use case + for setting this field is for a StatefulSet's Headless Service + to propagate SRV DNS records for its Pods for the purpose + of peer discovery. The Kubernetes controllers that generate + Endpoints and EndpointSlice resources for Services interpret + this to mean that all endpoints are considered "ready" even + if the Pods themselves are not. Agents which consume only + Kubernetes generated endpoints through the Endpoints or + EndpointSlice resources can safely assume this behavior. + type: boolean + selector: + additionalProperties: + type: string + description: 'Route service traffic to pods with label keys + and values matching this selector. If empty or not present, + the service is assumed to have an external process managing + its endpoints, which Kubernetes will not modify. Only applies + to types ClusterIP, NodePort, and LoadBalancer. Ignored + if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/' + type: object + x-kubernetes-map-type: atomic + sessionAffinity: + description: 'Supports "ClientIP" and "None". Used to maintain + session affinity. Enable client IP based session affinity. + Must be ClientIP or None. Defaults to None. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies' + type: string + sessionAffinityConfig: + description: sessionAffinityConfig contains the configurations + of session affinity. + properties: + clientIP: + description: clientIP contains the configurations of Client + IP based session affinity. + properties: + timeoutSeconds: + description: timeoutSeconds specifies the seconds + of ClientIP type session sticky time. The value + must be >0 && <=86400(for 1 day) if ServiceAffinity + == "ClientIP". Default value is 10800(for 3 hours). + format: int32 + type: integer + type: object + type: object + type: + description: 'type determines how the Service is exposed. + Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, + NodePort, and LoadBalancer. "ClusterIP" allocates a cluster-internal + IP address for load-balancing to endpoints. Endpoints are + determined by the selector or if that is not specified, + by manual construction of an Endpoints object or EndpointSlice + objects. If clusterIP is "None", no virtual IP is allocated + and the endpoints are published as a set of endpoints rather + than a virtual IP. "NodePort" builds on ClusterIP and allocates + a port on every node which routes to the same endpoints + as the clusterIP. "LoadBalancer" builds on NodePort and + creates an external load-balancer (if supported in the current + cloud) which routes to the same endpoints as the clusterIP. + "ExternalName" aliases this service to the specified externalName. + Several other fields do not apply to ExternalName services. + More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types' + type: string + type: object + status: + description: 'Most recently observed status of the service. Populated + by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status' + properties: + conditions: + description: Current service state + items: + description: "Condition contains details for one aspect + of the current state of this API Resource. --- This struct + is intended for direct use as an array at the field path + .status.conditions. For example, \n type FooStatus struct{ + // Represents the observations of a foo's current state. + // Known .status.conditions.type are: \"Available\", \"Progressing\", + and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge + // +listType=map // +listMapKey=type Conditions []metav1.Condition + `json:\"conditions,omitempty\" patchStrategy:\"merge\" + patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` + \n // other fields }" + properties: + lastTransitionTime: + description: lastTransitionTime is the last time the + condition transitioned from one status to another. + This should be when the underlying condition changed. If + that is not known, then using the time when the API + field changed is acceptable. + format: date-time + type: string + message: + description: message is a human readable message indicating + details about the transition. This may be an empty + string. + maxLength: 32768 + type: string + observedGeneration: + description: observedGeneration represents the .metadata.generation + that the condition was set based upon. For instance, + if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration + is 9, the condition is out of date with respect to + the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: reason contains a programmatic identifier + indicating the reason for the condition's last transition. + Producers of specific condition types may define expected + values and meanings for this field, and whether the + values are considered a guaranteed API. The value + should be a CamelCase string. This field may not be + empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, + Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + --- Many .condition.type values are consistent across + resources like Available, but because arbitrary conditions + can be useful (see .node.status.conditions), the ability + to deconflict is important. The regex it matches is + (dns1123SubdomainFmt/)?(qualifiedNameFmt) + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + loadBalancer: + description: LoadBalancer contains the current status of the + load-balancer, if one is present. + properties: + ingress: + description: Ingress is a list containing ingress points + for the load-balancer. Traffic intended for the service + should be sent to these ingress points. + items: + description: 'LoadBalancerIngress represents the status + of a load-balancer ingress point: traffic intended + for the service should be sent to an ingress point.' + properties: + hostname: + description: Hostname is set for load-balancer ingress + points that are DNS based (typically AWS load-balancers) + type: string + ip: + description: IP is set for load-balancer ingress + points that are IP based (typically GCE or OpenStack + load-balancers) + type: string + ports: + description: Ports is a list of records of service + ports If used, every port defined in the service + should have an entry in it + items: + properties: + error: + description: 'Error is to record the problem + with the service port The format of the + error shall comply with the following rules: + - built-in error values shall be specified + in this file and those shall use CamelCase + names - cloud provider specific error values + must have names that comply with the format + foo.example.com/CamelCase. --- The regex + it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)' + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + port: + description: Port is the port number of the + service port of which status is recorded + here + format: int32 + type: integer + protocol: + default: TCP + description: 'Protocol is the protocol of + the service port of which status is recorded + here The supported values are: "TCP", "UDP", + "SCTP"' + type: string + required: + - port + - protocol + type: object + type: array + x-kubernetes-list-type: atomic + type: object + type: array + type: object + type: object + type: object + x-kubernetes-preserve-unknown-fields: true + serviceName: + description: 'serviceName is the name of the service that governs + this StatefulSet. This service must exist before the StatefulSet, + and is responsible for the network identity of the set. Pods get + DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local + where "pod-specific-string" is managed by the StatefulSet controller.' + type: string + template: + description: PodTemplateSpec describes the data a pod should have + when created from a template + properties: + metadata: + description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata' + properties: + annotations: + additionalProperties: + type: string + type: object + finalizers: + items: + type: string + type: array + labels: + additionalProperties: + type: string + type: object + name: + type: string + namespace: + type: string + type: object + spec: + description: 'Specification of the desired behavior of the pod. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status' + properties: + activeDeadlineSeconds: + description: Optional duration in seconds the pod may be active + on the node relative to StartTime before the system will + actively try to mark it failed and kill associated containers. + Value must be a positive integer. + format: int64 + type: integer + affinity: + description: If specified, the pod's scheduling constraints + properties: + nodeAffinity: + description: Describes node affinity scheduling rules + for the pod. + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule + pods to nodes that satisfy the affinity expressions + specified by this field, but it may choose a node + that violates one or more of the expressions. The + node that is most preferred is the one with the + greatest sum of weights, i.e. for each node that + meets all of the scheduling requirements (resource + request, requiredDuringScheduling affinity expressions, + etc.), compute a sum by iterating through the elements + of this field and adding "weight" to the sum if + the node matches the corresponding matchExpressions; + the node(s) with the highest sum are the most preferred. + items: + description: An empty preferred scheduling term + matches all objects with implicit weight 0 (i.e. + it's a no-op). A null preferred scheduling term + matches no objects (i.e. is also a no-op). + properties: + preference: + description: A node selector term, associated + with the corresponding weight. + properties: + matchExpressions: + description: A list of node selector requirements + by node's labels. + items: + description: A node selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: The label key that the + selector applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators + are In, NotIn, Exists, DoesNotExist. + Gt, and Lt. + type: string + values: + description: 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. + If the operator is Gt or Lt, the + values array must have a single + element, which will be interpreted + as an integer. This array is replaced + during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + description: A list of node selector requirements + by node's fields. + items: + description: A node selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: The label key that the + selector applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators + are In, NotIn, Exists, DoesNotExist. + Gt, and Lt. + type: string + values: + description: 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. + If the operator is Gt or Lt, the + values array must have a single + element, which will be interpreted + as an integer. This array is replaced + during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + x-kubernetes-map-type: atomic + weight: + description: Weight associated with matching + the corresponding nodeSelectorTerm, in the + range 1-100. + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the affinity requirements specified + by this field are not met at scheduling time, the + pod will not be scheduled onto the node. If the + affinity requirements specified by this field cease + to be met at some point during pod execution (e.g. + due to an update), the system may or may not try + to eventually evict the pod from its node. + properties: + nodeSelectorTerms: + description: Required. A list of node selector + terms. The terms are ORed. + items: + description: A null or empty node selector term + matches no objects. The requirements of them + are ANDed. The TopologySelectorTerm type implements + a subset of the NodeSelectorTerm. + properties: + matchExpressions: + description: A list of node selector requirements + by node's labels. + items: + description: A node selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: The label key that the + selector applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators + are In, NotIn, Exists, DoesNotExist. + Gt, and Lt. + type: string + values: + description: 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. + If the operator is Gt or Lt, the + values array must have a single + element, which will be interpreted + as an integer. This array is replaced + during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + description: A list of node selector requirements + by node's fields. + items: + description: A node selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: The label key that the + selector applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators + are In, NotIn, Exists, DoesNotExist. + Gt, and Lt. + type: string + values: + description: 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. + If the operator is Gt or Lt, the + values array must have a single + element, which will be interpreted + as an integer. This array is replaced + during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + x-kubernetes-map-type: atomic + type: array + required: + - nodeSelectorTerms + type: object + x-kubernetes-map-type: atomic + type: object + podAffinity: + description: Describes pod affinity scheduling rules (e.g. + co-locate this pod in the same node, zone, etc. as some + other pod(s)). + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule + pods to nodes that satisfy the affinity expressions + specified by this field, but it may choose a node + that violates one or more of the expressions. The + node that is most preferred is the one with the + greatest sum of weights, i.e. for each node that + meets all of the scheduling requirements (resource + request, requiredDuringScheduling affinity expressions, + etc.), compute a sum by iterating through the elements + of this field and adding "weight" to the sum if + the node has pods which matches the corresponding + podAffinityTerm; the node(s) with the highest sum + are the most preferred. + items: + description: The weights of all of the matched WeightedPodAffinityTerm + fields are added per-node to find the most preferred + node(s) + properties: + podAffinityTerm: + description: Required. A pod affinity term, + associated with the corresponding weight. + properties: + labelSelector: + description: A label query over a set of + resources, in this case pods. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of + {key,value} pairs. A single {key,value} + in the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are + ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaceSelector: + description: A label query over the set + of namespaces that the term applies to. + The term is applied to the union of the + namespaces selected by this field and + the ones listed in the namespaces field. + null selector and null or empty namespaces + list means "this pod's namespace". An + empty selector ({}) matches all namespaces. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of + {key,value} pairs. A single {key,value} + in the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are + ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static + list of namespace names that the term + applies to. The term is applied to the + union of the namespaces listed in this + field and the ones selected by namespaceSelector. + null or empty namespaces list and null + namespaceSelector means "this pod's namespace". + items: + type: string + type: array + topologyKey: + description: This pod should be co-located + (affinity) or not co-located (anti-affinity) + with the pods matching the labelSelector + in the specified namespaces, where co-located + is defined as running on a node whose + value of the label with key topologyKey + matches that of any node on which any + of the selected pods is running. Empty + topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + weight: + description: weight associated with matching + the corresponding podAffinityTerm, in the + range 1-100. + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the affinity requirements specified + by this field are not met at scheduling time, the + pod will not be scheduled onto the node. If the + affinity requirements specified by this field cease + to be met at some point during pod execution (e.g. + due to a pod label update), the system may or may + not try to eventually evict the pod from its node. + When there are multiple elements, the lists of nodes + corresponding to each podAffinityTerm are intersected, + i.e. all terms must be satisfied. + items: + description: Defines a set of pods (namely those + matching the labelSelector relative to the given + namespace(s)) that this pod should be co-located + (affinity) or not co-located (anti-affinity) with, + where co-located is defined as running on a node + whose value of the label with key + matches that of any node on which a pod of the + set of pods is running + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The requirements + are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied + to the union of the namespaces selected by + this field and the ones listed in the namespaces + field. null selector and null or empty namespaces + list means "this pod's namespace". An empty + selector ({}) matches all namespaces. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The requirements + are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static list + of namespace names that the term applies to. + The term is applied to the union of the namespaces + listed in this field and the ones selected + by namespaceSelector. null or empty namespaces + list and null namespaceSelector means "this + pod's namespace". + items: + type: string + type: array + topologyKey: + description: This pod should be co-located (affinity) + or not co-located (anti-affinity) with the + pods matching the labelSelector in the specified + namespaces, where co-located is defined as + running on a node whose value of the label + with key topologyKey matches that of any node + on which any of the selected pods is running. + Empty topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + type: array + type: object + podAntiAffinity: + description: Describes pod anti-affinity scheduling rules + (e.g. avoid putting this pod in the same node, zone, + etc. as some other pod(s)). + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule + pods to nodes that satisfy the anti-affinity expressions + specified by this field, but it may choose a node + that violates one or more of the expressions. The + node that is most preferred is the one with the + greatest sum of weights, i.e. for each node that + meets all of the scheduling requirements (resource + request, requiredDuringScheduling anti-affinity + expressions, etc.), compute a sum by iterating through + the elements of this field and adding "weight" to + the sum if the node has pods which matches the corresponding + podAffinityTerm; the node(s) with the highest sum + are the most preferred. + items: + description: The weights of all of the matched WeightedPodAffinityTerm + fields are added per-node to find the most preferred + node(s) + properties: + podAffinityTerm: + description: Required. A pod affinity term, + associated with the corresponding weight. + properties: + labelSelector: + description: A label query over a set of + resources, in this case pods. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of + {key,value} pairs. A single {key,value} + in the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are + ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaceSelector: + description: A label query over the set + of namespaces that the term applies to. + The term is applied to the union of the + namespaces selected by this field and + the ones listed in the namespaces field. + null selector and null or empty namespaces + list means "this pod's namespace". An + empty selector ({}) matches all namespaces. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of + {key,value} pairs. A single {key,value} + in the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are + ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static + list of namespace names that the term + applies to. The term is applied to the + union of the namespaces listed in this + field and the ones selected by namespaceSelector. + null or empty namespaces list and null + namespaceSelector means "this pod's namespace". + items: + type: string + type: array + topologyKey: + description: This pod should be co-located + (affinity) or not co-located (anti-affinity) + with the pods matching the labelSelector + in the specified namespaces, where co-located + is defined as running on a node whose + value of the label with key topologyKey + matches that of any node on which any + of the selected pods is running. Empty + topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + weight: + description: weight associated with matching + the corresponding podAffinityTerm, in the + range 1-100. + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the anti-affinity requirements specified + by this field are not met at scheduling time, the + pod will not be scheduled onto the node. If the + anti-affinity requirements specified by this field + cease to be met at some point during pod execution + (e.g. due to a pod label update), the system may + or may not try to eventually evict the pod from + its node. When there are multiple elements, the + lists of nodes corresponding to each podAffinityTerm + are intersected, i.e. all terms must be satisfied. + items: + description: Defines a set of pods (namely those + matching the labelSelector relative to the given + namespace(s)) that this pod should be co-located + (affinity) or not co-located (anti-affinity) with, + where co-located is defined as running on a node + whose value of the label with key + matches that of any node on which a pod of the + set of pods is running + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The requirements + are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied + to the union of the namespaces selected by + this field and the ones listed in the namespaces + field. null selector and null or empty namespaces + list means "this pod's namespace". An empty + selector ({}) matches all namespaces. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The requirements + are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static list + of namespace names that the term applies to. + The term is applied to the union of the namespaces + listed in this field and the ones selected + by namespaceSelector. null or empty namespaces + list and null namespaceSelector means "this + pod's namespace". + items: + type: string + type: array + topologyKey: + description: This pod should be co-located (affinity) + or not co-located (anti-affinity) with the + pods matching the labelSelector in the specified + namespaces, where co-located is defined as + running on a node whose value of the label + with key topologyKey matches that of any node + on which any of the selected pods is running. + Empty topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + type: array + type: object + type: object + automountServiceAccountToken: + description: AutomountServiceAccountToken indicates whether + a service account token should be automatically mounted. + type: boolean + containers: + description: List of containers belonging to the pod. Containers + cannot currently be added or removed. There must be at least + one container in a Pod. Cannot be updated. + items: + description: A single application container that you want + to run within a pod. + properties: + args: + description: 'Arguments to the entrypoint. The container + image''s CMD is used if this is not provided. Variable + references $(VAR_NAME) are expanded using the container''s + environment. If a variable cannot be resolved, the + reference in the input string will be unchanged. Double + $$ are reduced to a single $, which allows for escaping + the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce + the string literal "$(VAR_NAME)". Escaped references + will never be expanded, regardless of whether the + variable exists or not. Cannot be updated. More info: + https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + command: + description: 'Entrypoint array. Not executed within + a shell. The container image''s ENTRYPOINT is used + if this is not provided. Variable references $(VAR_NAME) + are expanded using the container''s environment. If + a variable cannot be resolved, the reference in the + input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) + syntax: i.e. "$$(VAR_NAME)" will produce the string + literal "$(VAR_NAME)". Escaped references will never + be expanded, regardless of whether the variable exists + or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + 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 previously 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. + Double $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" + will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + type: object + type: array + image: + description: 'Container 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: 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. + This will be canonicalized upon + output, so case-variant names will + be understood as the same header. + 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: Deprecated. TCPSocket is NOT supported + as a LifecycleHandler and kept for the backward + compatibility. There are no validation of + this field and lifecycle hooks will fail in + runtime when tcp handler is specified. + 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 Pod''s termination grace period + countdown begins before the PreStop hook is executed. + Regardless of the outcome of the handler, the + container will eventually terminate within the + Pod''s termination grace period (unless delayed + by finalizers). 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: 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. + This will be canonicalized upon + output, so case-variant names will + be understood as the same header. + 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: Deprecated. TCPSocket is NOT supported + as a LifecycleHandler and kept for the backward + compatibility. There are no validation of + this field and lifecycle hooks will fail in + runtime when tcp handler is specified. + 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: 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 + grpc: + description: GRPC specifies an action involving + a GRPC port. + properties: + port: + description: Port number of the gRPC service. + Number must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service + to place in the gRPC HealthCheckRequest (see + https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default behavior + is defined by gRPC." + type: string + required: + - port + 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. This + will be canonicalized upon output, so + case-variant names will be understood + as the same header. + 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. + 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 + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod + needs to terminate gracefully upon probe failure. + The grace period is the duration in seconds after + the processes running in the pod are sent a termination + signal and the time when the processes are forcibly + halted with a kill signal. Set this value longer + than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds + will be used. Otherwise, this value overrides + the value provided by the pod spec. Value must + be non-negative integer. The value zero indicates + stop immediately via the kill signal (no opportunity + to shut down). This is a beta field and requires + enabling ProbeTerminationGracePeriod feature gate. + Minimum value is 1. spec.terminationGracePeriodSeconds + is used if unset. + format: int64 + type: integer + 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. + 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. Modifying this array + with strategic merge patch may corrupt the data. For + more information See https://github.com/kubernetes/kubernetes/issues/108255. + 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: 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 + grpc: + description: GRPC specifies an action involving + a GRPC port. + properties: + port: + description: Port number of the gRPC service. + Number must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service + to place in the gRPC HealthCheckRequest (see + https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default behavior + is defined by gRPC." + type: string + required: + - port + 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. This + will be canonicalized upon output, so + case-variant names will be understood + as the same header. + 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. + 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 + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod + needs to terminate gracefully upon probe failure. + The grace period is the duration in seconds after + the processes running in the pod are sent a termination + signal and the time when the processes are forcibly + halted with a kill signal. Set this value longer + than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds + will be used. Otherwise, this value overrides + the value provided by the pod spec. Value must + be non-negative integer. The value zero indicates + stop immediately via the kill signal (no opportunity + to shut down). This is a beta field and requires + enabling ProbeTerminationGracePeriod feature gate. + Minimum value is 1. spec.terminationGracePeriodSeconds + is used if unset. + format: int64 + type: integer + 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 + resizePolicy: + description: Resources resize policy for the container. + items: + description: ContainerResizePolicy represents resource + resize policy for the container. + properties: + resourceName: + description: 'Name of the resource to which this + resource resize policy applies. Supported values: + cpu, memory.' + type: string + restartPolicy: + description: Restart policy to apply when specified + resource is resized. If not specified, it defaults + to NotRequired. + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + description: 'Compute Resources required by this container. + Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + properties: + claims: + description: "Claims lists the names of resources, + defined in spec.resourceClaims, that are used + by this container. \n This is an alpha field and + requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It can + only be set for containers." + items: + description: ResourceClaim references one entry + in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one + entry in pod.spec.resourceClaims of the + Pod where this field is used. It makes that + resource available inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + 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-resources-containers/' + 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. Requests cannot + exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + restartPolicy: + description: 'RestartPolicy defines the restart behavior + of individual containers in a pod. This field may + only be set for init containers, and the only allowed + value is "Always". For non-init containers or when + this field is not specified, the restart behavior + is defined by the Pod''s restart policy and the container + type. Setting the RestartPolicy as "Always" for the + init container will have the following effect: this + init container will be continually restarted on exit + until all regular containers have terminated. Once + all regular containers have completed, all init containers + with restartPolicy "Always" will be shut down. This + lifecycle differs from normal init containers and + is often referred to as a "sidecar" container. Although + this init container still starts in the init container + sequence, it does not wait for the container to complete + before proceeding to the next init container. Instead, + the next init container starts immediately after this + init container is started, or after any startupProbe + has successfully completed.' + type: string + securityContext: + description: 'SecurityContext defines the security options + the container should be run with. If set, the fields + of SecurityContext override the equivalent fields + of PodSecurityContext. 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 Note that this field cannot + be set when spec.os.name is windows.' + type: boolean + capabilities: + description: The capabilities to add/drop when running + containers. Defaults to the default set of capabilities + granted by the container runtime. Note that this + field cannot be set when spec.os.name is windows. + 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. Note that + this field cannot be set when spec.os.name is + windows. + 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. Note that this field cannot be set + when spec.os.name is windows. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only + root filesystem. Default is false. Note that this + field cannot be set when spec.os.name is windows. + 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. + Note that this field cannot be set when spec.os.name + is windows. + 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. Note that this + field cannot be set when spec.os.name is windows. + 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. + Note that this field cannot be set when spec.os.name + is windows. + 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 + seccompProfile: + description: The seccomp options to use by this + container. If seccomp options are provided at + both the pod & container level, the container + options override the pod options. Note that this + field cannot be set when spec.os.name is windows. + properties: + localhostProfile: + description: localhostProfile indicates a profile + defined in a file on the node should be used. + The profile must be preconfigured on the node + to work. Must be a descending path, relative + to the kubelet's configured seccomp profile + location. Must be set if type is "Localhost". + Must NOT be set for any other type. + type: string + type: + description: "type indicates which kind of seccomp + profile will be applied. Valid options are: + \n Localhost - a profile defined in a file + on the node should be used. RuntimeDefault + - the container runtime default profile should + be used. Unconfined - no profile should be + applied." + type: string + required: + - type + 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. + Note that this field cannot be set when spec.os.name + is linux. + 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. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name + of the GMSA credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container + should be run as a 'Host Process' container. + All of a Pod's containers must have the same + effective HostProcess value (it is not allowed + to have a mix of HostProcess containers and + non-HostProcess containers). In addition, + if HostProcess is true then HostNetwork must + also be set to true. + type: boolean + 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. + 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. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: 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 + grpc: + description: GRPC specifies an action involving + a GRPC port. + properties: + port: + description: Port number of the gRPC service. + Number must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service + to place in the gRPC HealthCheckRequest (see + https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default behavior + is defined by gRPC." + type: string + required: + - port + 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. This + will be canonicalized upon output, so + case-variant names will be understood + as the same header. + 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. + 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 + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod + needs to terminate gracefully upon probe failure. + The grace period is the duration in seconds after + the processes running in the pod are sent a termination + signal and the time when the processes are forcibly + halted with a kill signal. Set this value longer + than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds + will be used. Otherwise, this value overrides + the value provided by the pod spec. Value must + be non-negative integer. The value zero indicates + stop immediately via the kill signal (no opportunity + to shut down). This is a beta field and requires + enabling ProbeTerminationGracePeriod feature gate. + Minimum value is 1. spec.terminationGracePeriodSeconds + is used if unset. + format: int64 + type: integer + 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. + 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 + type: array + dnsConfig: + description: Specifies the DNS parameters of a pod. Parameters + specified here will be merged to the generated DNS configuration + based on DNSPolicy. + properties: + nameservers: + description: A list of DNS name server IP addresses. This + will be appended to the base nameservers generated from + DNSPolicy. Duplicated nameservers will be removed. + items: + type: string + type: array + options: + description: A list of DNS resolver options. This will + be merged with the base options generated from DNSPolicy. + Duplicated entries will be removed. Resolution options + given in Options will override those that appear in + the base DNSPolicy. + items: + description: PodDNSConfigOption defines DNS resolver + options of a pod. + properties: + name: + description: Required. + type: string + value: + type: string + type: object + type: array + searches: + description: A list of DNS search domains for host-name + lookup. This will be appended to the base search paths + generated from DNSPolicy. Duplicated search paths will + be removed. + items: + type: string + type: array + type: object + dnsPolicy: + description: Set DNS policy for the pod. Defaults to "ClusterFirst". + Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', + 'Default' or 'None'. DNS parameters given in DNSConfig will + be merged with the policy selected with DNSPolicy. To have + DNS options set along with hostNetwork, you have to specify + DNS policy explicitly to 'ClusterFirstWithHostNet'. + type: string + enableServiceLinks: + description: 'EnableServiceLinks indicates whether information + about services should be injected into pod''s environment + variables, matching the syntax of Docker links. Optional: + Defaults to true.' + type: boolean + ephemeralContainers: + description: List of ephemeral containers run in this pod. + Ephemeral containers may be run in an existing pod to perform + user-initiated actions such as debugging. This list cannot + be specified when creating a pod, and it cannot be modified + by updating the pod spec. In order to add an ephemeral container + to an existing pod, use the pod's ephemeralcontainers subresource. + items: + description: "An EphemeralContainer is a temporary container + that you may add to an existing Pod for user-initiated + activities such as debugging. Ephemeral containers have + no resource or scheduling guarantees, and they will not + be restarted when they exit or when a Pod is removed or + restarted. The kubelet may evict a Pod if an ephemeral + container causes the Pod to exceed its resource allocation. + \n To add an ephemeral container, use the ephemeralcontainers + subresource of an existing Pod. Ephemeral containers may + not be removed or restarted." + properties: + args: + description: 'Arguments to the entrypoint. The image''s + CMD is used if this is not provided. Variable references + $(VAR_NAME) are expanded using the container''s environment. + If a variable cannot be resolved, the reference in + the input string will be unchanged. Double $$ are + reduced to a single $, which allows for escaping the + $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce + the string literal "$(VAR_NAME)". Escaped references + will never be expanded, regardless of whether the + variable exists or not. Cannot be updated. More info: + https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + command: + description: 'Entrypoint array. Not executed within + a shell. The image''s ENTRYPOINT is used if this is + not provided. Variable references $(VAR_NAME) are + expanded using the container''s environment. If a + variable cannot be resolved, the reference in the + input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) + syntax: i.e. "$$(VAR_NAME)" will produce the string + literal "$(VAR_NAME)". Escaped references will never + be expanded, regardless of whether the variable exists + or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + 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 previously 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. + Double $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" + will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + type: object + type: array + image: + description: 'Container image name. More info: https://kubernetes.io/docs/concepts/containers/images' + 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: Lifecycle is not allowed for ephemeral + containers. + 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: 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. + This will be canonicalized upon + output, so case-variant names will + be understood as the same header. + 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: Deprecated. TCPSocket is NOT supported + as a LifecycleHandler and kept for the backward + compatibility. There are no validation of + this field and lifecycle hooks will fail in + runtime when tcp handler is specified. + 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 Pod''s termination grace period + countdown begins before the PreStop hook is executed. + Regardless of the outcome of the handler, the + container will eventually terminate within the + Pod''s termination grace period (unless delayed + by finalizers). 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: 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. + This will be canonicalized upon + output, so case-variant names will + be understood as the same header. + 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: Deprecated. TCPSocket is NOT supported + as a LifecycleHandler and kept for the backward + compatibility. There are no validation of + this field and lifecycle hooks will fail in + runtime when tcp handler is specified. + 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: Probes are not allowed for ephemeral containers. + properties: + exec: + description: 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 + grpc: + description: GRPC specifies an action involving + a GRPC port. + properties: + port: + description: Port number of the gRPC service. + Number must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service + to place in the gRPC HealthCheckRequest (see + https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default behavior + is defined by gRPC." + type: string + required: + - port + 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. This + will be canonicalized upon output, so + case-variant names will be understood + as the same header. + 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. + 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 + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod + needs to terminate gracefully upon probe failure. + The grace period is the duration in seconds after + the processes running in the pod are sent a termination + signal and the time when the processes are forcibly + halted with a kill signal. Set this value longer + than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds + will be used. Otherwise, this value overrides + the value provided by the pod spec. Value must + be non-negative integer. The value zero indicates + stop immediately via the kill signal (no opportunity + to shut down). This is a beta field and requires + enabling ProbeTerminationGracePeriod feature gate. + Minimum value is 1. spec.terminationGracePeriodSeconds + is used if unset. + format: int64 + type: integer + 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 ephemeral container specified + as a DNS_LABEL. This name must be unique among all + containers, init containers and ephemeral containers. + type: string + ports: + description: Ports are not allowed for ephemeral containers. + 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: Probes are not allowed for ephemeral containers. + properties: + exec: + description: 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 + grpc: + description: GRPC specifies an action involving + a GRPC port. + properties: + port: + description: Port number of the gRPC service. + Number must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service + to place in the gRPC HealthCheckRequest (see + https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default behavior + is defined by gRPC." + type: string + required: + - port + 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. This + will be canonicalized upon output, so + case-variant names will be understood + as the same header. + 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. + 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 + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod + needs to terminate gracefully upon probe failure. + The grace period is the duration in seconds after + the processes running in the pod are sent a termination + signal and the time when the processes are forcibly + halted with a kill signal. Set this value longer + than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds + will be used. Otherwise, this value overrides + the value provided by the pod spec. Value must + be non-negative integer. The value zero indicates + stop immediately via the kill signal (no opportunity + to shut down). This is a beta field and requires + enabling ProbeTerminationGracePeriod feature gate. + Minimum value is 1. spec.terminationGracePeriodSeconds + is used if unset. + format: int64 + type: integer + 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 + resizePolicy: + description: Resources resize policy for the container. + items: + description: ContainerResizePolicy represents resource + resize policy for the container. + properties: + resourceName: + description: 'Name of the resource to which this + resource resize policy applies. Supported values: + cpu, memory.' + type: string + restartPolicy: + description: Restart policy to apply when specified + resource is resized. If not specified, it defaults + to NotRequired. + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + description: Resources are not allowed for ephemeral + containers. Ephemeral containers use spare resources + already allocated to the pod. + properties: + claims: + description: "Claims lists the names of resources, + defined in spec.resourceClaims, that are used + by this container. \n This is an alpha field and + requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It can + only be set for containers." + items: + description: ResourceClaim references one entry + in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one + entry in pod.spec.resourceClaims of the + Pod where this field is used. It makes that + resource available inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + 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-resources-containers/' + 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. Requests cannot + exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + restartPolicy: + description: Restart policy for the container to manage + the restart behavior of each container within a pod. + This may only be set for init containers. You cannot + set this field on ephemeral containers. + type: string + securityContext: + description: 'Optional: SecurityContext defines the + security options the ephemeral container should be + run with. If set, the fields of SecurityContext override + the equivalent fields of PodSecurityContext.' + 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 Note that this field cannot + be set when spec.os.name is windows.' + type: boolean + capabilities: + description: The capabilities to add/drop when running + containers. Defaults to the default set of capabilities + granted by the container runtime. Note that this + field cannot be set when spec.os.name is windows. + 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. Note that + this field cannot be set when spec.os.name is + windows. + 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. Note that this field cannot be set + when spec.os.name is windows. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only + root filesystem. Default is false. Note that this + field cannot be set when spec.os.name is windows. + 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. + Note that this field cannot be set when spec.os.name + is windows. + 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. Note that this + field cannot be set when spec.os.name is windows. + 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. + Note that this field cannot be set when spec.os.name + is windows. + 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 + seccompProfile: + description: The seccomp options to use by this + container. If seccomp options are provided at + both the pod & container level, the container + options override the pod options. Note that this + field cannot be set when spec.os.name is windows. + properties: + localhostProfile: + description: localhostProfile indicates a profile + defined in a file on the node should be used. + The profile must be preconfigured on the node + to work. Must be a descending path, relative + to the kubelet's configured seccomp profile + location. Must be set if type is "Localhost". + Must NOT be set for any other type. + type: string + type: + description: "type indicates which kind of seccomp + profile will be applied. Valid options are: + \n Localhost - a profile defined in a file + on the node should be used. RuntimeDefault + - the container runtime default profile should + be used. Unconfined - no profile should be + applied." + type: string + required: + - type + 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. + Note that this field cannot be set when spec.os.name + is linux. + 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. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name + of the GMSA credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container + should be run as a 'Host Process' container. + All of a Pod's containers must have the same + effective HostProcess value (it is not allowed + to have a mix of HostProcess containers and + non-HostProcess containers). In addition, + if HostProcess is true then HostNetwork must + also be set to true. + type: boolean + 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. + type: string + type: object + type: object + startupProbe: + description: Probes are not allowed for ephemeral containers. + properties: + exec: + description: 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 + grpc: + description: GRPC specifies an action involving + a GRPC port. + properties: + port: + description: Port number of the gRPC service. + Number must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service + to place in the gRPC HealthCheckRequest (see + https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default behavior + is defined by gRPC." + type: string + required: + - port + 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. This + will be canonicalized upon output, so + case-variant names will be understood + as the same header. + 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. + 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 + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod + needs to terminate gracefully upon probe failure. + The grace period is the duration in seconds after + the processes running in the pod are sent a termination + signal and the time when the processes are forcibly + halted with a kill signal. Set this value longer + than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds + will be used. Otherwise, this value overrides + the value provided by the pod spec. Value must + be non-negative integer. The value zero indicates + stop immediately via the kill signal (no opportunity + to shut down). This is a beta field and requires + enabling ProbeTerminationGracePeriod feature gate. + Minimum value is 1. spec.terminationGracePeriodSeconds + is used if unset. + format: int64 + type: integer + 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 + targetContainerName: + description: "If set, the name of the container from + PodSpec that this ephemeral container targets. The + ephemeral container will be run in the namespaces + (IPC, PID, etc) of this container. If not set then + the ephemeral container uses the namespaces configured + in the Pod spec. \n The container runtime must implement + support for this feature. If the runtime does not + support namespace targeting then the result of setting + this field is undefined." + type: string + 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. + 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. Subpath mounts are not allowed for ephemeral + containers. 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 + type: array + hostAliases: + description: HostAliases is an optional list of hosts and + IPs that will be injected into the pod's hosts file if specified. + This is only valid for non-hostNetwork pods. + items: + description: HostAlias holds the mapping between IP and + hostnames that will be injected as an entry in the pod's + hosts file. + properties: + hostnames: + description: Hostnames for the above IP address. + items: + type: string + type: array + ip: + description: IP address of the host file entry. + type: string + type: object + type: array + hostIPC: + description: 'Use the host''s ipc namespace. Optional: Default + to false.' + type: boolean + hostNetwork: + description: Host networking requested for this pod. Use the + host's network namespace. If this option is set, the ports + that will be used must be specified. Default to false. + type: boolean + hostPID: + description: 'Use the host''s pid namespace. Optional: Default + to false.' + type: boolean + hostUsers: + description: 'Use the host''s user namespace. Optional: Default + to true. If set to true or not present, the pod will be + run in the host user namespace, useful for when the pod + needs a feature only available to the host user namespace, + such as loading a kernel module with CAP_SYS_MODULE. When + set to false, a new userns is created for the pod. Setting + false is useful for mitigating container breakout vulnerabilities + even allowing users to run their containers as root without + actually having root privileges on the host. This field + is alpha-level and is only honored by servers that enable + the UserNamespacesSupport feature.' + type: boolean + hostname: + description: Specifies the hostname of the Pod If not specified, + the pod's hostname will be set to a system-defined value. + type: string + imagePullSecrets: + description: 'ImagePullSecrets is an optional list of references + to secrets in the same namespace to use for pulling any + of the images used by this PodSpec. If specified, these + secrets will be passed to individual puller implementations + for them to use. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod' + items: + description: LocalObjectReference contains enough information + to let you locate the referenced object inside the same + namespace. + 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 + x-kubernetes-map-type: atomic + type: array + initContainers: + description: 'List of initialization containers belonging + to the pod. Init containers are executed in order prior + to containers being started. If any init container fails, + the pod is considered to have failed and is handled according + to its restartPolicy. The name for an init container or + normal container must be unique among all containers. Init + containers may not have Lifecycle actions, Readiness probes, + Liveness probes, or Startup probes. The resourceRequirements + of an init container are taken into account during scheduling + by finding the highest request/limit for each resource type, + and then using the max of of that value or the sum of the + normal containers. Limits are applied to init containers + in a similar fashion. Init containers cannot currently be + added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/' + items: + description: A single application container that you want + to run within a pod. + properties: + args: + description: 'Arguments to the entrypoint. The container + image''s CMD is used if this is not provided. Variable + references $(VAR_NAME) are expanded using the container''s + environment. If a variable cannot be resolved, the + reference in the input string will be unchanged. Double + $$ are reduced to a single $, which allows for escaping + the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce + the string literal "$(VAR_NAME)". Escaped references + will never be expanded, regardless of whether the + variable exists or not. Cannot be updated. More info: + https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + command: + description: 'Entrypoint array. Not executed within + a shell. The container image''s ENTRYPOINT is used + if this is not provided. Variable references $(VAR_NAME) + are expanded using the container''s environment. If + a variable cannot be resolved, the reference in the + input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) + syntax: i.e. "$$(VAR_NAME)" will produce the string + literal "$(VAR_NAME)". Escaped references will never + be expanded, regardless of whether the variable exists + or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + 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 previously 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. + Double $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" + will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + 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 + x-kubernetes-map-type: atomic + type: object + type: array + image: + description: 'Container 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: 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. + This will be canonicalized upon + output, so case-variant names will + be understood as the same header. + 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: Deprecated. TCPSocket is NOT supported + as a LifecycleHandler and kept for the backward + compatibility. There are no validation of + this field and lifecycle hooks will fail in + runtime when tcp handler is specified. + 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 Pod''s termination grace period + countdown begins before the PreStop hook is executed. + Regardless of the outcome of the handler, the + container will eventually terminate within the + Pod''s termination grace period (unless delayed + by finalizers). 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: 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. + This will be canonicalized upon + output, so case-variant names will + be understood as the same header. + 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: Deprecated. TCPSocket is NOT supported + as a LifecycleHandler and kept for the backward + compatibility. There are no validation of + this field and lifecycle hooks will fail in + runtime when tcp handler is specified. + 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: 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 + grpc: + description: GRPC specifies an action involving + a GRPC port. + properties: + port: + description: Port number of the gRPC service. + Number must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service + to place in the gRPC HealthCheckRequest (see + https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default behavior + is defined by gRPC." + type: string + required: + - port + 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. This + will be canonicalized upon output, so + case-variant names will be understood + as the same header. + 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. + 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 + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod + needs to terminate gracefully upon probe failure. + The grace period is the duration in seconds after + the processes running in the pod are sent a termination + signal and the time when the processes are forcibly + halted with a kill signal. Set this value longer + than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds + will be used. Otherwise, this value overrides + the value provided by the pod spec. Value must + be non-negative integer. The value zero indicates + stop immediately via the kill signal (no opportunity + to shut down). This is a beta field and requires + enabling ProbeTerminationGracePeriod feature gate. + Minimum value is 1. spec.terminationGracePeriodSeconds + is used if unset. + format: int64 + type: integer + 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. + 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. Modifying this array + with strategic merge patch may corrupt the data. For + more information See https://github.com/kubernetes/kubernetes/issues/108255. + 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: 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 + grpc: + description: GRPC specifies an action involving + a GRPC port. + properties: + port: + description: Port number of the gRPC service. + Number must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service + to place in the gRPC HealthCheckRequest (see + https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default behavior + is defined by gRPC." + type: string + required: + - port + 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. This + will be canonicalized upon output, so + case-variant names will be understood + as the same header. + 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. + 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 + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod + needs to terminate gracefully upon probe failure. + The grace period is the duration in seconds after + the processes running in the pod are sent a termination + signal and the time when the processes are forcibly + halted with a kill signal. Set this value longer + than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds + will be used. Otherwise, this value overrides + the value provided by the pod spec. Value must + be non-negative integer. The value zero indicates + stop immediately via the kill signal (no opportunity + to shut down). This is a beta field and requires + enabling ProbeTerminationGracePeriod feature gate. + Minimum value is 1. spec.terminationGracePeriodSeconds + is used if unset. + format: int64 + type: integer + 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 + resizePolicy: + description: Resources resize policy for the container. + items: + description: ContainerResizePolicy represents resource + resize policy for the container. + properties: + resourceName: + description: 'Name of the resource to which this + resource resize policy applies. Supported values: + cpu, memory.' + type: string + restartPolicy: + description: Restart policy to apply when specified + resource is resized. If not specified, it defaults + to NotRequired. + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + description: 'Compute Resources required by this container. + Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + properties: + claims: + description: "Claims lists the names of resources, + defined in spec.resourceClaims, that are used + by this container. \n This is an alpha field and + requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It can + only be set for containers." + items: + description: ResourceClaim references one entry + in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one + entry in pod.spec.resourceClaims of the + Pod where this field is used. It makes that + resource available inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + 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-resources-containers/' + 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. Requests cannot + exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + restartPolicy: + description: 'RestartPolicy defines the restart behavior + of individual containers in a pod. This field may + only be set for init containers, and the only allowed + value is "Always". For non-init containers or when + this field is not specified, the restart behavior + is defined by the Pod''s restart policy and the container + type. Setting the RestartPolicy as "Always" for the + init container will have the following effect: this + init container will be continually restarted on exit + until all regular containers have terminated. Once + all regular containers have completed, all init containers + with restartPolicy "Always" will be shut down. This + lifecycle differs from normal init containers and + is often referred to as a "sidecar" container. Although + this init container still starts in the init container + sequence, it does not wait for the container to complete + before proceeding to the next init container. Instead, + the next init container starts immediately after this + init container is started, or after any startupProbe + has successfully completed.' + type: string + securityContext: + description: 'SecurityContext defines the security options + the container should be run with. If set, the fields + of SecurityContext override the equivalent fields + of PodSecurityContext. 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 Note that this field cannot + be set when spec.os.name is windows.' + type: boolean + capabilities: + description: The capabilities to add/drop when running + containers. Defaults to the default set of capabilities + granted by the container runtime. Note that this + field cannot be set when spec.os.name is windows. + 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. Note that + this field cannot be set when spec.os.name is + windows. + 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. Note that this field cannot be set + when spec.os.name is windows. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only + root filesystem. Default is false. Note that this + field cannot be set when spec.os.name is windows. + 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. + Note that this field cannot be set when spec.os.name + is windows. + 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. Note that this + field cannot be set when spec.os.name is windows. + 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. + Note that this field cannot be set when spec.os.name + is windows. + 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 + seccompProfile: + description: The seccomp options to use by this + container. If seccomp options are provided at + both the pod & container level, the container + options override the pod options. Note that this + field cannot be set when spec.os.name is windows. + properties: + localhostProfile: + description: localhostProfile indicates a profile + defined in a file on the node should be used. + The profile must be preconfigured on the node + to work. Must be a descending path, relative + to the kubelet's configured seccomp profile + location. Must be set if type is "Localhost". + Must NOT be set for any other type. + type: string + type: + description: "type indicates which kind of seccomp + profile will be applied. Valid options are: + \n Localhost - a profile defined in a file + on the node should be used. RuntimeDefault + - the container runtime default profile should + be used. Unconfined - no profile should be + applied." + type: string + required: + - type + 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. + Note that this field cannot be set when spec.os.name + is linux. + 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. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name + of the GMSA credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container + should be run as a 'Host Process' container. + All of a Pod's containers must have the same + effective HostProcess value (it is not allowed + to have a mix of HostProcess containers and + non-HostProcess containers). In addition, + if HostProcess is true then HostNetwork must + also be set to true. + type: boolean + 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. + 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. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: 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 + grpc: + description: GRPC specifies an action involving + a GRPC port. + properties: + port: + description: Port number of the gRPC service. + Number must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service + to place in the gRPC HealthCheckRequest (see + https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default behavior + is defined by gRPC." + type: string + required: + - port + 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. This + will be canonicalized upon output, so + case-variant names will be understood + as the same header. + 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. + 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 + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod + needs to terminate gracefully upon probe failure. + The grace period is the duration in seconds after + the processes running in the pod are sent a termination + signal and the time when the processes are forcibly + halted with a kill signal. Set this value longer + than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds + will be used. Otherwise, this value overrides + the value provided by the pod spec. Value must + be non-negative integer. The value zero indicates + stop immediately via the kill signal (no opportunity + to shut down). This is a beta field and requires + enabling ProbeTerminationGracePeriod feature gate. + Minimum value is 1. spec.terminationGracePeriodSeconds + is used if unset. + format: int64 + type: integer + 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. + 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 + type: array + nodeName: + description: NodeName is a request to schedule this pod onto + a specific node. If it is non-empty, the scheduler simply + schedules this pod onto that node, assuming that it fits + resource requirements. + type: string + nodeSelector: + additionalProperties: + type: string + description: 'NodeSelector is a selector which must be true + for the pod to fit on a node. Selector which must match + a node''s labels for the pod to be scheduled on that node. + More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/' + type: object + x-kubernetes-map-type: atomic + os: + description: "Specifies the OS of the containers in the pod. + Some pod and container fields are restricted if this is + set. \n If the OS field is set to linux, the following fields + must be unset: -securityContext.windowsOptions \n If the + OS field is set to windows, following fields must be unset: + - spec.hostPID - spec.hostIPC - spec.hostUsers - spec.securityContext.seLinuxOptions + - spec.securityContext.seccompProfile - spec.securityContext.fsGroup + - spec.securityContext.fsGroupChangePolicy - spec.securityContext.sysctls + - spec.shareProcessNamespace - spec.securityContext.runAsUser + - spec.securityContext.runAsGroup - spec.securityContext.supplementalGroups + - spec.containers[*].securityContext.seLinuxOptions - spec.containers[*].securityContext.seccompProfile + - spec.containers[*].securityContext.capabilities - spec.containers[*].securityContext.readOnlyRootFilesystem + - spec.containers[*].securityContext.privileged - spec.containers[*].securityContext.allowPrivilegeEscalation + - spec.containers[*].securityContext.procMount - spec.containers[*].securityContext.runAsUser + - spec.containers[*].securityContext.runAsGroup" + properties: + name: + description: 'Name is the name of the operating system. + The currently supported values are linux and windows. + Additional value may be defined in future and can be + one of: https://github.com/opencontainers/runtime-spec/blob/master/config.md#platform-specific-configuration + Clients should expect to handle additional values and + treat unrecognized values in this field as os: null' + type: string + required: + - name + type: object + overhead: + 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: 'Overhead represents the resource overhead associated + with running a pod for a given RuntimeClass. This field + will be autopopulated at admission time by the RuntimeClass + admission controller. If the RuntimeClass admission controller + is enabled, overhead must not be set in Pod create requests. + The RuntimeClass admission controller will reject Pod create + requests which have the overhead already set. If RuntimeClass + is configured and selected in the PodSpec, Overhead will + be set to the value defined in the corresponding RuntimeClass, + otherwise it will remain unset and treated as zero. More + info: https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md' + type: object + preemptionPolicy: + description: PreemptionPolicy is the Policy for preempting + pods with lower priority. One of Never, PreemptLowerPriority. + Defaults to PreemptLowerPriority if unset. + type: string + priority: + description: The priority value. Various system components + use this field to find the priority of the pod. When Priority + Admission Controller is enabled, it prevents users from + setting this field. The admission controller populates this + field from PriorityClassName. The higher the value, the + higher the priority. + format: int32 + type: integer + priorityClassName: + description: If specified, indicates the pod's priority. "system-node-critical" + and "system-cluster-critical" are two special keywords which + indicate the highest priorities with the former being the + highest priority. Any other name must be defined by creating + a PriorityClass object with that name. If not specified, + the pod priority will be default or zero if there is no + default. + type: string + readinessGates: + description: 'If specified, all readiness gates will be evaluated + for pod readiness. A pod is ready when all its containers + are ready AND all conditions specified in the readiness + gates have status equal to "True" More info: https://git.k8s.io/enhancements/keps/sig-network/580-pod-readiness-gates' + items: + description: PodReadinessGate contains the reference to + a pod condition + properties: + conditionType: + description: ConditionType refers to a condition in + the pod's condition list with matching type. + type: string + required: + - conditionType + type: object + type: array + resourceClaims: + description: "ResourceClaims defines which ResourceClaims + must be allocated and reserved before the Pod is allowed + to start. The resources will be made available to those + containers which consume them by name. \n This is an alpha + field and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable." + items: + description: PodResourceClaim references exactly one ResourceClaim + through a ClaimSource. It adds a name to it that uniquely + identifies the ResourceClaim inside the Pod. Containers + that need access to the ResourceClaim reference it with + this name. + properties: + name: + description: Name uniquely identifies this resource + claim inside the pod. This must be a DNS_LABEL. + type: string + source: + description: Source describes where to find the ResourceClaim. + properties: + resourceClaimName: + description: ResourceClaimName is the name of a + ResourceClaim object in the same namespace as + this pod. + type: string + resourceClaimTemplateName: + description: "ResourceClaimTemplateName is the name + of a ResourceClaimTemplate object in the same + namespace as this pod. \n The template will be + used to create a new ResourceClaim, which will + be bound to this pod. When this pod is deleted, + the ResourceClaim will also be deleted. The pod + name and resource name, along with a generated + component, will be used to form a unique name + for the ResourceClaim, which will be recorded + in pod.status.resourceClaimStatuses. \n This field + is immutable and no changes will be made to the + corresponding ResourceClaim by the control plane + after creating the ResourceClaim." + type: string + type: object + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + restartPolicy: + description: 'Restart policy for all containers within the + pod. One of Always, OnFailure, Never. In some contexts, + only a subset of those values may be permitted. Default + to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy' + type: string + runtimeClassName: + description: 'RuntimeClassName refers to a RuntimeClass object + in the node.k8s.io group, which should be used to run this + pod. If no RuntimeClass resource matches the named class, + the pod will not be run. If unset or empty, the "legacy" + RuntimeClass will be used, which is an implicit class with + an empty definition that uses the default runtime handler. + More info: https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class' + type: string + schedulerName: + description: If specified, the pod will be dispatched by specified + scheduler. If not specified, the pod will be dispatched + by default scheduler. + type: string + schedulingGates: + description: "SchedulingGates is an opaque list of values + that if specified will block scheduling the pod. If schedulingGates + is not empty, the pod will stay in the SchedulingGated state + and the scheduler will not attempt to schedule the pod. + \n SchedulingGates can only be set at pod creation time, + and be removed only afterwards. \n This is a beta feature + enabled by the PodSchedulingReadiness feature gate." + items: + description: PodSchedulingGate is associated to a Pod to + guard its scheduling. + properties: + name: + description: Name of the scheduling gate. Each scheduling + gate must have a unique name field. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + securityContext: + description: 'SecurityContext holds pod-level security attributes + and common container settings. Optional: Defaults to empty. See + type description for default values of each field.' + properties: + fsGroup: + description: "A special supplemental group that applies + to all containers in a pod. Some volume types allow + the Kubelet to change the ownership of that volume to + be owned by the pod: \n 1. The owning GID will be the + FSGroup 2. The setgid bit is set (new files created + in the volume will be owned by FSGroup) 3. The permission + bits are OR'd with rw-rw---- \n If unset, the Kubelet + will not modify the ownership and permissions of any + volume. Note that this field cannot be set when spec.os.name + is windows." + format: int64 + type: integer + fsGroupChangePolicy: + description: 'fsGroupChangePolicy defines behavior of + changing ownership and permission of the volume before + being exposed inside Pod. This field will only apply + to volume types which support fsGroup based ownership(and + permissions). It will have no effect on ephemeral volume + types such as: secret, configmaps and emptydir. Valid + values are "OnRootMismatch" and "Always". If not specified, + "Always" is used. Note that this field cannot be set + when spec.os.name is windows.' + type: string + runAsGroup: + description: The GID to run the entrypoint of the container + process. Uses runtime default if unset. May also be + set in SecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence for that container. Note that this + field cannot be set when spec.os.name is windows. + 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 SecurityContext. 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 SecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence + for that container. Note that this field cannot be set + when spec.os.name is windows. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to all + containers. If unspecified, the container runtime will + allocate a random SELinux context for each container. May + also be set in SecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence for that container. Note that this + field cannot be set when spec.os.name is windows. + 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 + seccompProfile: + description: The seccomp options to use by the containers + in this pod. Note that this field cannot be set when + spec.os.name is windows. + properties: + localhostProfile: + description: localhostProfile indicates a profile + defined in a file on the node should be used. The + profile must be preconfigured on the node to work. + Must be a descending path, relative to the kubelet's + configured seccomp profile location. Must be set + if type is "Localhost". Must NOT be set for any + other type. + type: string + type: + description: "type indicates which kind of seccomp + profile will be applied. Valid options are: \n Localhost + - a profile defined in a file on the node should + be used. RuntimeDefault - the container runtime + default profile should be used. Unconfined - no + profile should be applied." + type: string + required: + - type + type: object + supplementalGroups: + description: A list of groups applied to the first process + run in each container, in addition to the container's + primary GID, the fsGroup (if specified), and group memberships + defined in the container image for the uid of the container + process. If unspecified, no additional groups are added + to any container. Note that group memberships defined + in the container image for the uid of the container + process are still effective, even if they are not included + in this list. Note that this field cannot be set when + spec.os.name is windows. + items: + format: int64 + type: integer + type: array + sysctls: + description: Sysctls hold a list of namespaced sysctls + used for the pod. Pods with unsupported sysctls (by + the container runtime) might fail to launch. Note that + this field cannot be set when spec.os.name is windows. + items: + description: Sysctl defines a kernel parameter to be + set + properties: + name: + description: Name of a property to set + type: string + value: + description: Value of a property to set + type: string + required: + - name + - value + type: object + type: array + windowsOptions: + description: The Windows specific settings applied to + all containers. If unspecified, the options within a + container's SecurityContext will be used. If set in + both SecurityContext and PodSecurityContext, the value + specified in SecurityContext takes precedence. Note + that this field cannot be set when spec.os.name is linux. + 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. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of + the GMSA credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container + should be run as a 'Host Process' container. All + of a Pod's containers must have the same effective + HostProcess value (it is not allowed to have a mix + of HostProcess containers and non-HostProcess containers). + In addition, if HostProcess is true then HostNetwork + must also be set to true. + type: boolean + 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. + type: string + type: object + type: object + serviceAccount: + description: 'DeprecatedServiceAccount is a depreciated alias + for ServiceAccountName. Deprecated: Use serviceAccountName + instead.' + type: string + serviceAccountName: + description: 'ServiceAccountName is the name of the ServiceAccount + to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/' + type: string + setHostnameAsFQDN: + description: If true the pod's hostname will be configured + as the pod's FQDN, rather than the leaf name (the default). + In Linux containers, this means setting the FQDN in the + hostname field of the kernel (the nodename field of struct + utsname). In Windows containers, this means setting the + registry value of hostname for the registry key HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters + to FQDN. If a pod does not have FQDN, this has no effect. + Default to false. + type: boolean + shareProcessNamespace: + description: 'Share a single process namespace between all + of the containers in a pod. When this is set containers + will be able to view and signal processes from other containers + in the same pod, and the first process in each container + will not be assigned PID 1. HostPID and ShareProcessNamespace + cannot both be set. Optional: Default to false.' + type: boolean + subdomain: + description: If specified, the fully qualified Pod hostname + will be "...svc.". If not specified, the pod will not have a domainname + at all. + type: string + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs to + terminate gracefully. May be decreased in delete request. + Value must be non-negative integer. The value zero indicates + stop immediately via the kill signal (no opportunity to + shut down). If this value is nil, the default grace period + will be used instead. The grace period is the duration in + seconds after the processes running in the pod are sent + a termination signal and the time when the processes are + forcibly halted with a kill signal. Set this value longer + than the expected cleanup time for your process. Defaults + to 30 seconds. + format: int64 + type: integer + tolerations: + description: If specified, the pod's tolerations. + items: + description: The pod this Toleration is attached to tolerates + any taint that matches the triple using + the matching operator . + properties: + effect: + description: Effect indicates the taint effect to match. + Empty means match all taint effects. When specified, + allowed values are NoSchedule, PreferNoSchedule and + NoExecute. + type: string + key: + description: Key is the taint key that the toleration + applies to. Empty means match all taint keys. If the + key is empty, operator must be Exists; this combination + means to match all values and all keys. + type: string + operator: + description: Operator represents a key's relationship + to the value. Valid operators are Exists and Equal. + Defaults to Equal. Exists is equivalent to wildcard + for value, so that a pod can tolerate all taints of + a particular category. + type: string + tolerationSeconds: + description: TolerationSeconds represents the period + of time the toleration (which must be of effect NoExecute, + otherwise this field is ignored) tolerates the taint. + By default, it is not set, which means tolerate the + taint forever (do not evict). Zero and negative values + will be treated as 0 (evict immediately) by the system. + format: int64 + type: integer + value: + description: Value is the taint value the toleration + matches to. If the operator is Exists, the value should + be empty, otherwise just a regular string. + type: string + type: object + type: array + topologySpreadConstraints: + description: TopologySpreadConstraints describes how a group + of pods ought to spread across topology domains. Scheduler + will schedule pods in a way which abides by the constraints. + All topologySpreadConstraints are ANDed. + items: + description: TopologySpreadConstraint specifies how to spread + matching pods among the given topology. + properties: + labelSelector: + description: LabelSelector is used to find matching + pods. Pods that match this label selector are counted + to determine the number of pods in their corresponding + topology domain. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is "In", + and the values array contains only "value". The + requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + description: "MatchLabelKeys is a set of pod label keys + to select the pods over which spreading will be calculated. + The keys are used to lookup values from the incoming + pod labels, those key-value labels are ANDed with + labelSelector to select the group of existing pods + over which spreading will be calculated for the incoming + pod. The same key is forbidden to exist in both MatchLabelKeys + and LabelSelector. MatchLabelKeys cannot be set when + LabelSelector isn't set. Keys that don't exist in + the incoming pod labels will be ignored. A null or + empty list means only match against labelSelector. + \n This is a beta field and requires the MatchLabelKeysInPodTopologySpread + feature gate to be enabled (enabled by default)." + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + description: 'MaxSkew describes the degree to which + pods may be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`, + it is the maximum permitted difference between the + number of matching pods in the target topology and + the global minimum. The global minimum is the minimum + number of matching pods in an eligible domain or zero + if the number of eligible domains is less than MinDomains. + For example, in a 3-zone cluster, MaxSkew is set to + 1, and pods with the same labelSelector spread as + 2/2/1: In this case, the global minimum is 1. | zone1 + | zone2 | zone3 | | P P | P P | P | - if MaxSkew + is 1, incoming pod can only be scheduled to zone3 + to become 2/2/2; scheduling it onto zone1(zone2) would + make the ActualSkew(3-1) on zone1(zone2) violate MaxSkew(1). + - if MaxSkew is 2, incoming pod can be scheduled onto + any zone. When `whenUnsatisfiable=ScheduleAnyway`, + it is used to give higher precedence to topologies + that satisfy it. It''s a required field. Default value + is 1 and 0 is not allowed.' + format: int32 + type: integer + minDomains: + description: "MinDomains indicates a minimum number + of eligible domains. When the number of eligible domains + with matching topology keys is less than minDomains, + Pod Topology Spread treats \"global minimum\" as 0, + and then the calculation of Skew is performed. And + when the number of eligible domains with matching + topology keys equals or greater than minDomains, this + value has no effect on scheduling. As a result, when + the number of eligible domains is less than minDomains, + scheduler won't schedule more than maxSkew Pods to + those domains. If value is nil, the constraint behaves + as if MinDomains is equal to 1. Valid values are integers + greater than 0. When value is not nil, WhenUnsatisfiable + must be DoNotSchedule. \n For example, in a 3-zone + cluster, MaxSkew is set to 2, MinDomains is set to + 5 and pods with the same labelSelector spread as 2/2/2: + | zone1 | zone2 | zone3 | | P P | P P | P P | + The number of domains is less than 5(MinDomains), + so \"global minimum\" is treated as 0. In this situation, + new pod with the same labelSelector cannot be scheduled, + because computed skew will be 3(3 - 0) if new Pod + is scheduled to any of the three zones, it will violate + MaxSkew. \n This is a beta field and requires the + MinDomainsInPodTopologySpread feature gate to be enabled + (enabled by default)." + format: int32 + type: integer + nodeAffinityPolicy: + description: "NodeAffinityPolicy indicates how we will + treat Pod's nodeAffinity/nodeSelector when calculating + pod topology spread skew. Options are: - Honor: only + nodes matching nodeAffinity/nodeSelector are included + in the calculations. - Ignore: nodeAffinity/nodeSelector + are ignored. All nodes are included in the calculations. + \n If this value is nil, the behavior is equivalent + to the Honor policy. This is a beta-level feature + default enabled by the NodeInclusionPolicyInPodTopologySpread + feature flag." + type: string + nodeTaintsPolicy: + description: "NodeTaintsPolicy indicates how we will + treat node taints when calculating pod topology spread + skew. Options are: - Honor: nodes without taints, + along with tainted nodes for which the incoming pod + has a toleration, are included. - Ignore: node taints + are ignored. All nodes are included. \n If this value + is nil, the behavior is equivalent to the Ignore policy. + This is a beta-level feature default enabled by the + NodeInclusionPolicyInPodTopologySpread feature flag." + type: string + topologyKey: + description: TopologyKey is the key of node labels. + Nodes that have a label with this key and identical + values are considered to be in the same topology. + We consider each as a "bucket", and try + to put balanced number of pods into each bucket. We + define a domain as a particular instance of a topology. + Also, we define an eligible domain as a domain whose + nodes meet the requirements of nodeAffinityPolicy + and nodeTaintsPolicy. e.g. If TopologyKey is "kubernetes.io/hostname", + each Node is a domain of that topology. And, if TopologyKey + is "topology.kubernetes.io/zone", each zone is a domain + of that topology. It's a required field. + type: string + whenUnsatisfiable: + description: 'WhenUnsatisfiable indicates how to deal + with a pod if it doesn''t satisfy the spread constraint. + - DoNotSchedule (default) tells the scheduler not + to schedule it. - ScheduleAnyway tells the scheduler + to schedule the pod in any location, but giving higher + precedence to topologies that would help reduce the + skew. A constraint is considered "Unsatisfiable" for + an incoming pod if and only if every possible node + assignment for that pod would violate "MaxSkew" on + some topology. For example, in a 3-zone cluster, MaxSkew + is set to 1, and pods with the same labelSelector + spread as 3/1/1: | zone1 | zone2 | zone3 | | P P P + | P | P | If WhenUnsatisfiable is set to DoNotSchedule, + incoming pod can only be scheduled to zone2(zone3) + to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) + satisfies MaxSkew(1). In other words, the cluster + can still be imbalanced, but scheduler won''t make + it *more* imbalanced. It''s a required field.' + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array + x-kubernetes-list-map-keys: + - topologyKey + - whenUnsatisfiable + x-kubernetes-list-type: map + volumes: + description: 'List of volumes that can be mounted by containers + belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes' + 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: 'fsType is the 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: 'partition is 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: 'readOnly value true will force the + readOnly setting in VolumeMounts. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: boolean + volumeID: + description: 'volumeID is 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: 'cachingMode is the Host Caching mode: + None, Read Only, Read Write.' + type: string + diskName: + description: diskName is the Name of the data disk + in the blob storage + type: string + diskURI: + description: diskURI is the URI of data disk in + the blob storage + type: string + fsType: + description: fsType is 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: 'kind expected values are 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: readOnly 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: readOnly defaults to false (read/write). + ReadOnly here will force the ReadOnly setting + in VolumeMounts. + type: boolean + secretName: + description: secretName is the name of secret that + contains Azure Storage Account Name and Key + type: string + shareName: + description: shareName is the azure 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: 'monitors is 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: 'path is Optional: Used as the mounted + root, rather than the full Ceph tree, default + is /' + type: string + readOnly: + description: 'readOnly is 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: 'secretFile is 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: 'secretRef is 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 + x-kubernetes-map-type: atomic + user: + description: 'user is 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: 'fsType is the 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: 'readOnly 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: 'secretRef is 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 + x-kubernetes-map-type: atomic + volumeID: + description: 'volumeID 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: 'defaultMode is optional: mode bits + used to set permissions on created files by default. + Must be an octal value between 0000 and 0777 or + a decimal value between 0 and 511. YAML accepts + both octal and decimal values, JSON requires decimal + values for mode bits. 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 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: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode bits + used to set permissions on this file. Must + be an octal value between 0000 and 0777 + or a decimal value between 0 and 511. YAML + accepts both octal and decimal values, JSON + requires decimal values for mode bits. 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: path is 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: optional specify whether the ConfigMap + or its keys must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + csi: + description: csi (Container Storage Interface) represents + ephemeral storage that is handled by certain external + CSI drivers (Beta 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: fsType 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 + x-kubernetes-map-type: atomic + readOnly: + description: readOnly 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 Optional: mode bits + used to set permissions on created files by default. + Must be an octal value between 0000 and 0777 or + a decimal value between 0 and 511. YAML accepts + both octal and decimal values, JSON requires decimal + values for mode bits. 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 + x-kubernetes-map-type: atomic + mode: + description: 'Optional: mode bits used to + set permissions on this file, must be an + octal value between 0000 and 0777 or a decimal + value between 0 and 511. YAML accepts both + octal and decimal values, JSON requires + decimal values for mode bits. 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 + x-kubernetes-map-type: atomic + 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: 'medium represents 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: 'sizeLimit is the 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: https://kubernetes.io/docs/concepts/storage/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 + ephemeral: + description: "ephemeral represents a volume that is + handled by a cluster storage driver. The volume's + lifecycle is tied to the pod that defines it - it + will be created before the pod starts, and deleted + when the pod is removed. \n Use this if: a) the volume + is only needed while the pod runs, b) features of + normal volumes like restoring from snapshot or capacity + tracking are needed, c) the storage driver is specified + through a storage class, and d) the storage driver + supports dynamic volume provisioning through a PersistentVolumeClaim + (see EphemeralVolumeSource for more information on + the connection between this volume type and PersistentVolumeClaim). + \n Use PersistentVolumeClaim or one of the vendor-specific + APIs for volumes that persist for longer than the + lifecycle of an individual pod. \n Use CSI for light-weight + local ephemeral volumes if the CSI driver is meant + to be used that way - see the documentation of the + driver for more information. \n A pod can use both + types of ephemeral volumes and persistent volumes + at the same time." + properties: + volumeClaimTemplate: + description: "Will be used to create a stand-alone + PVC to provision the volume. The pod in which + this EphemeralVolumeSource is embedded will be + the owner of the PVC, i.e. the PVC will be deleted + together with the pod. The name of the PVC will + be `-` where `` + is the name from the `PodSpec.Volumes` array entry. + Pod validation will reject the pod if the concatenated + name is not valid for a PVC (for example, too + long). \n An existing PVC with that name that + is not owned by the pod will *not* be used for + the pod to avoid using an unrelated volume by + mistake. Starting the pod is then blocked until + the unrelated PVC is removed. If such a pre-created + PVC is meant to be used by the pod, the PVC has + to updated with an owner reference to the pod + once the pod exists. Normally this should not + be necessary, but it may be useful when manually + reconstructing a broken cluster. \n This field + is read-only and no changes will be made by Kubernetes + to the PVC after it has been created. \n Required, + must not be nil." + properties: + metadata: + description: May contain labels and annotations + that will be copied into the PVC when creating + it. No other fields are allowed and will be + rejected during validation. + properties: + annotations: + additionalProperties: + type: string + type: object + finalizers: + items: + type: string + type: array + labels: + additionalProperties: + type: string + type: object + name: + type: string + namespace: + type: string + type: object + spec: + description: The specification for the PersistentVolumeClaim. + The entire content is copied unchanged into + the PVC that gets created from this template. + The same fields as in a PersistentVolumeClaim + are also valid here. + properties: + accessModes: + description: 'accessModes contains the desired + access modes the volume should have. More + info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' + items: + type: string + type: array + dataSource: + description: 'dataSource field can be used + to specify either: * An existing VolumeSnapshot + object (snapshot.storage.k8s.io/VolumeSnapshot) + * An existing PVC (PersistentVolumeClaim) + If the provisioner or an external controller + can support the specified data source, + it will create a new volume based on the + contents of the specified data source. + When the AnyVolumeDataSource feature gate + is enabled, dataSource contents will be + copied to dataSourceRef, and dataSourceRef + contents will be copied to dataSource + when dataSourceRef.namespace is not specified. + If the namespace is specified, then dataSourceRef + will not be copied to dataSource.' + properties: + apiGroup: + description: APIGroup is the group for + the resource being referenced. If + APIGroup is not specified, the specified + Kind must be in the core API group. + For any other third-party types, APIGroup + is required. + type: string + kind: + description: Kind is the type of resource + being referenced + type: string + name: + description: Name is the name of resource + being referenced + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + dataSourceRef: + description: 'dataSourceRef specifies the + object from which to populate the volume + with data, if a non-empty volume is desired. + This may be any object from a non-empty + API group (non core object) or a PersistentVolumeClaim + object. When this field is specified, + volume binding will only succeed if the + type of the specified object matches some + installed volume populator or dynamic + provisioner. This field will replace the + functionality of the dataSource field + and as such if both fields are non-empty, + they must have the same value. For backwards + compatibility, when namespace isn''t specified + in dataSourceRef, both fields (dataSource + and dataSourceRef) will be set to the + same value automatically if one of them + is empty and the other is non-empty. When + namespace is specified in dataSourceRef, + dataSource isn''t set to the same value + and must be empty. There are three important + differences between dataSource and dataSourceRef: + * While dataSource only allows two specific + types of objects, dataSourceRef allows + any non-core object, as well as PersistentVolumeClaim + objects. * While dataSource ignores disallowed + values (dropping them), dataSourceRef + preserves all values, and generates an + error if a disallowed value is specified. + * While dataSource only allows local objects, + dataSourceRef allows objects in any namespaces. + (Beta) Using this field requires the AnyVolumeDataSource + feature gate to be enabled. (Alpha) Using + the namespace field of dataSourceRef requires + the CrossNamespaceVolumeDataSource feature + gate to be enabled.' + properties: + apiGroup: + description: APIGroup is the group for + the resource being referenced. If + APIGroup is not specified, the specified + Kind must be in the core API group. + For any other third-party types, APIGroup + is required. + type: string + kind: + description: Kind is the type of resource + being referenced + type: string + name: + description: Name is the name of resource + being referenced + type: string + namespace: + description: Namespace is the namespace + of resource being referenced Note + that when a namespace is specified, + a gateway.networking.k8s.io/ReferenceGrant + object is required in the referent + namespace to allow that namespace's + owner to accept the reference. See + the ReferenceGrant documentation for + details. (Alpha) This field requires + the CrossNamespaceVolumeDataSource + feature gate to be enabled. + type: string + required: + - kind + - name + type: object + resources: + description: 'resources represents the minimum + resources the volume should have. If RecoverVolumeExpansionFailure + feature is enabled users are allowed to + specify resource requirements that are + lower than previous value but must still + be higher than capacity recorded in the + status field of the claim. More info: + https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' + properties: + claims: + description: "Claims lists the names + of resources, defined in spec.resourceClaims, + that are used by this container. \n + This is an alpha field and requires + enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. + It can only be set for containers." + items: + description: ResourceClaim references + one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the + name of one entry in pod.spec.resourceClaims + of the Pod where this field + is used. It makes that resource + available inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + 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-resources-containers/' + 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. + Requests cannot exceed Limits. More + info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + selector: + description: selector is a label query over + volumes to consider for binding. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of + {key,value} pairs. A single {key,value} + in the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are + ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + storageClassName: + description: 'storageClassName is the name + of the StorageClass required by the claim. + More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' + type: string + volumeMode: + description: volumeMode defines what type + of volume is required by the claim. Value + of Filesystem is implied when not included + in claim spec. + type: string + volumeName: + description: volumeName is the binding reference + to the PersistentVolume backing this claim. + type: string + type: object + required: + - spec + type: object + 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: 'fsType is the 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: 'lun is Optional: FC target lun number' + format: int32 + type: integer + readOnly: + description: 'readOnly is Optional: Defaults to + false (read/write). ReadOnly here will force the + ReadOnly setting in VolumeMounts.' + type: boolean + targetWWNs: + description: 'targetWWNs is Optional: FC target + worldwide names (WWNs)' + items: + type: string + type: array + wwids: + description: 'wwids 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: fsType is the 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: 'options is Optional: this field holds + extra command options if any.' + type: object + readOnly: + description: 'readOnly is Optional: defaults to + false (read/write). ReadOnly here will force the + ReadOnly setting in VolumeMounts.' + type: boolean + secretRef: + description: 'secretRef is 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 + x-kubernetes-map-type: atomic + 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: datasetName is Name of the dataset + stored as metadata -> name on the dataset for + Flocker should be considered as deprecated + type: string + datasetUUID: + description: datasetUUID is the 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: 'fsType is 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: 'partition is 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: 'pdName is 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: directory is the 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 is the URL + type: string + revision: + description: revision is the 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: 'endpoints 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: chapAuthDiscovery defines whether support + iSCSI Discovery CHAP authentication + type: boolean + chapAuthSession: + description: chapAuthSession defines whether support + iSCSI Session CHAP authentication + type: boolean + fsType: + description: 'fsType is the 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: initiatorName is the custom iSCSI Initiator + Name. If initiatorName is specified with iscsiInterface + simultaneously, new iSCSI interface : will be created for the connection. + type: string + iqn: + description: iqn is the target iSCSI Qualified Name. + type: string + iscsiInterface: + description: iscsiInterface is the interface Name + that uses an iSCSI transport. Defaults to 'default' + (tcp). + type: string + lun: + description: lun represents iSCSI Target Lun number. + format: int32 + type: integer + portals: + description: portals is the 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: secretRef is the 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 + x-kubernetes-map-type: atomic + targetPortal: + description: targetPortal is 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: 'name of the volume. 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: readOnly 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: fsType is the 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: pdID is the 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: readOnly 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: projected items for all in one resources + secrets, configmaps, and downward API + properties: + defaultMode: + description: defaultMode are the mode bits used + to set permissions on created files by default. + Must be an octal value between 0000 and 0777 or + a decimal value between 0 and 511. YAML accepts + both octal and decimal values, JSON requires decimal + values for mode bits. 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: sources is the list of volume projections + items: + description: Projection that may be projected + along with other supported volume types + properties: + configMap: + description: configMap information about the + configMap data to project + properties: + items: + description: items 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: key is the key to project. + type: string + mode: + description: 'mode is Optional: + mode bits used to set permissions + on this file. Must be an octal + value between 0000 and 0777 or + a decimal value between 0 and + 511. YAML accepts both octal and + decimal values, JSON requires + decimal values for mode bits. + 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: path is 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: optional specify whether + the ConfigMap or its keys must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + downwardAPI: + description: downwardAPI 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 + x-kubernetes-map-type: atomic + mode: + description: 'Optional: mode bits + used to set permissions on this + file, must be an octal value between + 0000 and 0777 or a decimal value + between 0 and 511. YAML accepts + both octal and decimal values, + JSON requires decimal values for + mode bits. 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 + x-kubernetes-map-type: atomic + required: + - path + type: object + type: array + type: object + secret: + description: secret information about the + secret data to project + properties: + items: + description: items 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: key is the key to project. + type: string + mode: + description: 'mode is Optional: + mode bits used to set permissions + on this file. Must be an octal + value between 0000 and 0777 or + a decimal value between 0 and + 511. YAML accepts both octal and + decimal values, JSON requires + decimal values for mode bits. + 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: path is 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: optional field specify whether + the Secret or its key must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + serviceAccountToken: + description: serviceAccountToken is 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 + 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: 'fsType is the 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: 'image is 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: 'monitors is 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: 'pool is 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 + x-kubernetes-map-type: atomic + user: + description: 'user is 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: fsType is the 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: gateway is the host address of the + ScaleIO API Gateway. + type: string + protectionDomain: + description: protectionDomain is the name of the + ScaleIO Protection Domain for the configured storage. + type: string + readOnly: + description: readOnly 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 + x-kubernetes-map-type: atomic + sslEnabled: + description: sslEnabled Flag enable/disable SSL + communication with Gateway, default false + type: boolean + storageMode: + description: storageMode indicates whether the storage + for a volume should be ThickProvisioned or ThinProvisioned. + Default is ThinProvisioned. + type: string + storagePool: + description: storagePool is the ScaleIO Storage + Pool associated with the protection domain. + type: string + system: + description: system is the name of the storage system + as configured in ScaleIO. + type: string + volumeName: + description: volumeName is 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: 'defaultMode is Optional: mode bits + used to set permissions on created files by default. + Must be an octal value between 0000 and 0777 or + a decimal value between 0 and 511. YAML accepts + both octal and decimal values, JSON requires decimal + values for mode bits. 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 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: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode bits + used to set permissions on this file. Must + be an octal value between 0000 and 0777 + or a decimal value between 0 and 511. YAML + accepts both octal and decimal values, JSON + requires decimal values for mode bits. 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: path is 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: optional field specify whether the + Secret or its keys must be defined + type: boolean + secretName: + description: 'secretName is the 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: fsType is the 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: readOnly 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 + x-kubernetes-map-type: atomic + 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: fsType is 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: storagePolicyID is the storage Policy + Based Management (SPBM) profile ID associated + with the StoragePolicyName. + type: string + storagePolicyName: + description: storagePolicyName is the storage Policy + Based Management (SPBM) profile name. + type: string + volumePath: + description: volumePath is the path that identifies + vSphere volume vmdk + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + required: + - containers + type: object + type: object + updateStrategy: + description: updateStrategy indicates the StatefulSetUpdateStrategy + that will be employed to update Pods in the RSM when a revision + is made to Template. UpdateStrategy.Type will be set to appsv1.OnDeleteStatefulSetStrategyType + if MemberUpdateStrategy is not nil + properties: + rollingUpdate: + description: RollingUpdate is used to communicate parameters when + Type is RollingUpdateStatefulSetStrategyType. + properties: + maxUnavailable: + anyOf: + - type: integer + - type: string + description: 'The maximum number of pods that can be unavailable + during the update. Value can be an absolute number (ex: + 5) or a percentage of desired pods (ex: 10%). Absolute number + is calculated from percentage by rounding up. This can not + be 0. Defaults to 1. This field is alpha-level and is only + honored by servers that enable the MaxUnavailableStatefulSet + feature. The field applies to all pods in the range 0 to + Replicas-1. That means if there is any unavailable pod in + the range 0 to Replicas-1, it will be counted towards MaxUnavailable.' + x-kubernetes-int-or-string: true + partition: + description: Partition indicates the ordinal at which the + StatefulSet should be partitioned for updates. During a + rolling update, all pods from ordinal Replicas-1 to Partition + are updated. All pods from ordinal Partition-1 to 0 remain + untouched. This is helpful in being able to do a canary + based deployment. The default value is 0. + format: int32 + type: integer + type: object + type: + description: Type indicates the type of the StatefulSetUpdateStrategy. + Default is RollingUpdate. + type: string + type: object + volumeClaimTemplates: + description: volumeClaimTemplates is a list of claims that pods are + allowed to reference. The ReplicatedStateMachine controller is responsible + for mapping network identities to claims in a way that maintains + the identity of a pod. Every claim in this list must have at least + one matching (by name) volumeMount in one container in the template. + A claim in this list takes precedence over any volumes in the template, + with the same name. + items: + description: PersistentVolumeClaim is a user's request for and claim + to a persistent volume + 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: + description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata' + properties: + annotations: + additionalProperties: + type: string + type: object + finalizers: + items: + type: string + type: array + labels: + additionalProperties: + type: string + type: object + name: + type: string + namespace: + type: string + type: object + spec: + description: 'spec defines the desired characteristics of a + volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + properties: + accessModes: + description: 'accessModes contains the desired access modes + the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' + items: + type: string + type: array + dataSource: + description: 'dataSource field can be used to specify either: + * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) + * An existing PVC (PersistentVolumeClaim) If the provisioner + or an external controller can support the specified data + source, it will create a new volume based on the contents + of the specified data source. When the AnyVolumeDataSource + feature gate is enabled, dataSource contents will be copied + to dataSourceRef, and dataSourceRef contents will be copied + to dataSource when dataSourceRef.namespace is not specified. + If the namespace is specified, then dataSourceRef will + not be copied to dataSource.' + properties: + apiGroup: + description: APIGroup is the group for the resource + being referenced. If APIGroup is not specified, the + specified Kind must be in the core API group. For + any other third-party types, APIGroup is required. + type: string + kind: + description: Kind is the type of resource being referenced + type: string + name: + description: Name is the name of resource being referenced + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + dataSourceRef: + description: 'dataSourceRef specifies the object from which + to populate the volume with data, if a non-empty volume + is desired. This may be any object from a non-empty API + group (non core object) or a PersistentVolumeClaim object. + When this field is specified, volume binding will only + succeed if the type of the specified object matches some + installed volume populator or dynamic provisioner. This + field will replace the functionality of the dataSource + field and as such if both fields are non-empty, they must + have the same value. For backwards compatibility, when + namespace isn''t specified in dataSourceRef, both fields + (dataSource and dataSourceRef) will be set to the same + value automatically if one of them is empty and the other + is non-empty. When namespace is specified in dataSourceRef, + dataSource isn''t set to the same value and must be empty. + There are three important differences between dataSource + and dataSourceRef: * While dataSource only allows two + specific types of objects, dataSourceRef allows any non-core + object, as well as PersistentVolumeClaim objects. * While + dataSource ignores disallowed values (dropping them), + dataSourceRef preserves all values, and generates an error + if a disallowed value is specified. * While dataSource + only allows local objects, dataSourceRef allows objects + in any namespaces. (Beta) Using this field requires the + AnyVolumeDataSource feature gate to be enabled. (Alpha) + Using the namespace field of dataSourceRef requires the + CrossNamespaceVolumeDataSource feature gate to be enabled.' + properties: + apiGroup: + description: APIGroup is the group for the resource + being referenced. If APIGroup is not specified, the + specified Kind must be in the core API group. For + any other third-party types, APIGroup is required. + type: string + kind: + description: Kind is the type of resource being referenced + type: string + name: + description: Name is the name of resource being referenced + type: string + namespace: + description: Namespace is the namespace of resource + being referenced Note that when a namespace is specified, + a gateway.networking.k8s.io/ReferenceGrant object + is required in the referent namespace to allow that + namespace's owner to accept the reference. See the + ReferenceGrant documentation for details. (Alpha) + This field requires the CrossNamespaceVolumeDataSource + feature gate to be enabled. + type: string + required: + - kind + - name + type: object + resources: + description: 'resources represents the minimum resources + the volume should have. If RecoverVolumeExpansionFailure + feature is enabled users are allowed to specify resource + requirements that are lower than previous value but must + still be higher than capacity recorded in the status field + of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the + DynamicResourceAllocation feature gate. \n This field + is immutable. It can only be set for containers." + items: + description: ResourceClaim references one entry in + PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry + in pod.spec.resourceClaims of the Pod where + this field is used. It makes that resource available + inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + 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-resources-containers/' + 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. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + selector: + description: selector is a label query over volumes to consider + for binding. + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + 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 + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. + A single {key,value} in the matchLabels map is equivalent + to an element of matchExpressions, whose key field + is "key", the operator is "In", and the values array + contains only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + storageClassName: + description: 'storageClassName is the name of the StorageClass + required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' + type: string + volumeMode: + description: volumeMode defines what type of volume is required + by the claim. Value of Filesystem is implied when not + included in claim spec. + type: string + volumeName: + description: volumeName is the binding reference to the + PersistentVolume backing this claim. + type: string + type: object + status: + description: 'status represents the current information/status + of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + properties: + accessModes: + description: 'accessModes contains the actual access modes + the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' + items: + type: string + type: array + allocatedResourceStatuses: + additionalProperties: + description: When a controller receives persistentvolume + claim update with ClaimResourceStatus for a resource + that it does not recognizes, then it should ignore that + update and let other controllers handle it. + type: string + description: "allocatedResourceStatuses stores status of + resource being resized for the given PVC. Key names follow + standard Kubernetes label syntax. Valid values are either: + * Un-prefixed keys: - storage - the capacity of the volume. + * Custom resources must use implementation-defined prefixed + names such as \"example.com/my-custom-resource\" Apart + from above values - keys that are unprefixed or have kubernetes.io + prefix are considered reserved and hence may not be used. + \n ClaimResourceStatus can be in any of following states: + - ControllerResizeInProgress: State set when resize controller + starts resizing the volume in control-plane. - ControllerResizeFailed: + State set when resize has failed in resize controller + with a terminal error. - NodeResizePending: State set + when resize controller has finished resizing the volume + but further resizing of volume is needed on the node. + - NodeResizeInProgress: State set when kubelet starts + resizing the volume. - NodeResizeFailed: State set when + resizing has failed in kubelet with a terminal error. + Transient errors don't set NodeResizeFailed. For example: + if expanding a PVC for more capacity - this field can + be one of the following states: - pvc.status.allocatedResourceStatus['storage'] + = \"ControllerResizeInProgress\" - pvc.status.allocatedResourceStatus['storage'] + = \"ControllerResizeFailed\" - pvc.status.allocatedResourceStatus['storage'] + = \"NodeResizePending\" - pvc.status.allocatedResourceStatus['storage'] + = \"NodeResizeInProgress\" - pvc.status.allocatedResourceStatus['storage'] + = \"NodeResizeFailed\" When this field is not set, it + means that no resize operation is in progress for the + given PVC. \n A controller that receives PVC update with + previously unknown resourceName or ClaimResourceStatus + should ignore the update for the purpose it was designed. + For example - a controller that only is responsible for + resizing capacity of the volume, should ignore PVC updates + that change other valid resources associated with PVC. + \n This is an alpha field and requires enabling RecoverVolumeExpansionFailure + feature." + type: object + x-kubernetes-map-type: granular + allocatedResources: + 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: "allocatedResources tracks the resources allocated + to a PVC including its capacity. Key names follow standard + Kubernetes label syntax. Valid values are either: * Un-prefixed + keys: - storage - the capacity of the volume. * Custom + resources must use implementation-defined prefixed names + such as \"example.com/my-custom-resource\" Apart from + above values - keys that are unprefixed or have kubernetes.io + prefix are considered reserved and hence may not be used. + \n Capacity reported here may be larger than the actual + capacity when a volume expansion operation is requested. + For storage quota, the larger value from allocatedResources + and PVC.spec.resources is used. If allocatedResources + is not set, PVC.spec.resources alone is used for quota + calculation. If a volume expansion capacity request is + lowered, allocatedResources is only lowered if there are + no expansion operations in progress and if the actual + volume capacity is equal or lower than the requested capacity. + \n A controller that receives PVC update with previously + unknown resourceName should ignore the update for the + purpose it was designed. For example - a controller that + only is responsible for resizing capacity of the volume, + should ignore PVC updates that change other valid resources + associated with PVC. \n This is an alpha field and requires + enabling RecoverVolumeExpansionFailure feature." + type: object + capacity: + 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: capacity represents the actual resources of + the underlying volume. + type: object + conditions: + description: conditions is the current Condition of persistent + volume claim. If underlying persistent volume is being + resized then the Condition will be set to 'ResizeStarted'. + items: + description: PersistentVolumeClaimCondition contains details + about state of pvc + properties: + lastProbeTime: + description: lastProbeTime is the time we probed the + condition. + format: date-time + type: string + lastTransitionTime: + description: lastTransitionTime is the time the condition + transitioned from one status to another. + format: date-time + type: string + message: + description: message is the human-readable message + indicating details about last transition. + type: string + reason: + description: reason is a unique, this should be a + short, machine understandable string that gives + the reason for condition's last transition. If it + reports "ResizeStarted" that means the underlying + persistent volume is being resized. + type: string + status: + type: string + type: + description: PersistentVolumeClaimConditionType is + a valid value of PersistentVolumeClaimCondition.Type + type: string + required: + - status + - type + type: object + type: array + phase: + description: phase represents the current phase of PersistentVolumeClaim. + type: string + type: object + type: object + type: array + required: + - selector + - serviceName + - template + type: object + status: + description: ReplicatedStateMachineStatus defines the observed state of + ReplicatedStateMachine + properties: + availableReplicas: + description: Total number of available pods (ready for at least minReadySeconds) + targeted by this statefulset. + format: int32 + type: integer + collisionCount: + description: collisionCount is the count of hash collisions for the + StatefulSet. The StatefulSet controller uses this field as a collision + avoidance mechanism when it needs to create the name for the newest + ControllerRevision. + format: int32 + type: integer + conditions: + description: Represents the latest available observations of a statefulset's + current state. + items: + description: StatefulSetCondition describes the state of a statefulset + at a certain point. + properties: + lastTransitionTime: + description: Last time the condition transitioned from one status + to another. + format: date-time + type: string + message: + description: A human readable message indicating details about + the transition. + type: string + reason: + description: The reason for the condition's last transition. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: Type of statefulset condition. + type: string + required: + - status + - type + type: object + type: array + currentGeneration: + description: CurrentGeneration, if not empty, indicates the version + of the RSM used to generate the underlying workload + format: int64 + type: integer + currentReplicas: + description: currentReplicas is the number of Pods created by the + StatefulSet controller from the StatefulSet version indicated by + currentRevision. + format: int32 + type: integer + currentRevision: + description: currentRevision, if not empty, indicates the version + of the StatefulSet used to generate Pods in the sequence [0,currentReplicas). + type: string + initReplicas: + description: InitReplicas is the number of pods(members) when cluster + first initialized it's set to spec.Replicas at object creation time + and never changes + format: int32 + type: integer + membersStatus: + description: members' status. + items: + properties: + podName: + default: Unknown + description: PodName pod name. + type: string + readyWithoutPrimary: + description: Is it required for rsm to have at least one primary + pod to be ready. + type: boolean + role: + properties: + accessMode: + default: ReadWrite + description: AccessMode, what service this member capable. + enum: + - None + - Readonly + - ReadWrite + type: string + canVote: + default: true + description: CanVote, whether this member has voting rights + type: boolean + isLeader: + default: false + description: IsLeader, whether this member is the leader + type: boolean + name: + default: leader + description: Name, role name. + type: string + required: + - accessMode + - name + type: object + required: + - podName + - role + type: object + type: array + observedGeneration: + description: observedGeneration is the most recent generation observed + for this StatefulSet. It corresponds to the StatefulSet's generation, + which is updated on mutation by the API Server. + format: int64 + type: integer + readyInitReplicas: + description: ReadyInitReplicas is the number of pods(members) already + in MembersStatus in the cluster initialization stage will never + change once equals to InitReplicas + format: int32 + type: integer + readyReplicas: + description: readyReplicas is the number of pods created for this + StatefulSet with a Ready Condition. + format: int32 + type: integer + replicas: + description: replicas is the number of Pods created by the StatefulSet + controller. + format: int32 + type: integer + updateRevision: + description: updateRevision, if not empty, indicates the version of + the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas) + type: string + updatedReplicas: + description: updatedReplicas is the number of Pods created by the + StatefulSet controller from the StatefulSet version indicated by + updateRevision. + format: int32 + type: integer + required: + - initReplicas + - replicas + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/data/kubeblocks-postgresql-operator/kubeblocks_helm_template.yaml b/data/kubeblocks-postgresql-operator/kubeblocks_helm_template.yaml new file mode 100644 index 0000000000..96cdfcd4fc --- /dev/null +++ b/data/kubeblocks-postgresql-operator/kubeblocks_helm_template.yaml @@ -0,0 +1,6217 @@ +--- +# Source: kubeblocks/templates/serviceaccount.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: kubeblocks + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +--- +# Source: kubeblocks/templates/serviceaccount.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: kubeblocks-addon-installer + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +--- +# Source: kubeblocks/templates/cloud-provider-secret.yaml +apiVersion: v1 +kind: Secret +metadata: + name: kubeblocks-cloud-provider + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +stringData: + csi-s3: | + secret: + accessKey: + secretKey: + region: + cloudProvider: + storageClass: + bucket: +--- +# Source: kubeblocks/templates/secret.yaml +apiVersion: v1 +kind: Secret +metadata: + name: kubeblocks-secret + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +type: Opaque +stringData: + dataProtectionEncryptionKey: kubeblocks-dp-aes256 +--- +# Source: kubeblocks/templates/applications/alertmanager-webhook-adaptor-values.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: alertmanager-webhook-adaptor-chart-kubeblocks-values + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +data: + values-kubeblocks-override.yaml: |- + affinity: + nodeAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - preference: + matchExpressions: + - key: kb-controller + operator: In + values: + - "true" + weight: 100 + configFiles: + config.yaml: {} + configMapOverrideName: config + image: + registry: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com +--- +# Source: kubeblocks/templates/applications/apecloud-otel-collector-values.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: apecloud-otel-collector-chart-kubeblocks-values + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +data: + values-kubeblocks-override.yaml: |- + enabled: false + image: + registry: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com +--- +# Source: kubeblocks/templates/applications/aws-loadbalancer-controller-values.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: aws-load-balancer-controller-chart-kubeblocks-values + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +data: + values-kubeblocks-override.yaml: |- + affinity: + nodeAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - preference: + matchExpressions: + - key: kb-controller + operator: In + values: + - "true" + weight: 100 + clusterName: "" + enabled: false + replicaCount: 1 + serviceAccount: + create: true + name: kubeblocks-service-account-aws-load-balancer-controller + tolerations: + - effect: NoSchedule + key: kb-controller + operator: Equal + value: "true" +--- +# Source: kubeblocks/templates/applications/csi-hostpath-driver-values.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: csi-hostpath-driver-chart-kubeblocks-values + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +data: + values-kubeblocks-override.yaml: |- + enabled: false + storageClass: + create: true + default: true +--- +# Source: kubeblocks/templates/applications/external-dns-values.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: external-dns-chart-kubeblocks-values + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +data: + values-kubeblocks-override.yaml: |- + domain: kubeblocks.io + enabled: false + tolerations: + - effect: NoSchedule + key: kb-controller + operator: Equal + value: "true" +--- +# Source: kubeblocks/templates/applications/grafana-values.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: grafana-chart-kubeblocks-values + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +data: + values-kubeblocks-override.yaml: |- + adminPassword: kubeblocks + adminUser: admin + affinity: + nodeAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - preference: + matchExpressions: + - key: kb-controller + operator: In + values: + - "true" + weight: 100 + defaultDashboardsTimezone: null + enabled: false + grafana.ini: + auth.anonymous: + enabled: true + hide_version: true + auth.basic: + enabled: false + image: + repository: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/grafana + tag: 9.2.4 + ingress: + annotations: {} + enabled: false + extraPaths: [] + hosts: + - chart-example.local + labels: {} + path: / + pathType: Prefix + tls: [] + rbac: + pspEnabled: false + replicas: 1 + resources: {} + service: + annotations: {} + appProtocol: "" + enabled: true + labels: {} + port: 80 + portName: service + targetPort: 3000 + type: ClusterIP + sidecar: + dashboards: + enabled: true + label: grafana_dashboard + labelValue: "1" + resource: configmap + searchNamespace: ALL + datasources: + defaultDatasourceEnabled: true + enabled: true + initDatasources: true + label: grafana_datasource + labelValue: "1" + resource: configmap + searchNamespace: ALL + skipReload: false + uid: prometheus + image: + repository: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/k8s-sidecar + tag: 1.19.2 + testFramework: + enabled: false + tolerations: + - effect: NoSchedule + key: kb-controller + operator: Equal + value: "true" +--- +# Source: kubeblocks/templates/applications/loki-values.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: loki-chart-kubeblocks-values + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +data: + values-kubeblocks-override.yaml: |- + enabled: false + loki: + auth_enabled: false + commonConfig: + replication_factor: 1 + compactor: + compaction_interval: 10m + delete_request_cancel_period: 2h + retention_delete_delay: 2h + retention_delete_worker_count: 150 + retention_enabled: true + shared_store: filesystem + working_directory: /var/loki/retention + limits_config: + max_query_lookback: 72h + retention_period: 72h + podSecurityContext: + runAsNonRoot: false + runAsUser: 0 + storage: + type: filesystem + monitoring: + dashboards: + enabled: false + lokiCanary: + enabled: false + rules: + enabled: false + selfMonitoring: + enabled: false + grafanaAgent: + installOperator: false + serviceMonitor: + enabled: false + singleBinary: + replicas: 1 + test: + enabled: false +--- +# Source: kubeblocks/templates/applications/prometheus-values.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: prometheus-chart-kubeblocks-values + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +data: + values-kubeblocks-override.yaml: |- + # set prometheus.alertmanager.image.repository + # set prometheus.nodeExporter.image.repository + # set prometheus configmapReload prometheus and alertmanager image.repository + # set prometheus.server.image.repository + alertmanager: + affinity: + nodeAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - preference: + matchExpressions: + - key: kb-controller + operator: In + values: + - "true" + weight: 100 + configMapOverrideName: alertmanager-config + containerSecurityContext: + allowPrivilegeEscalation: false + enabled: true + image: + repository: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/alertmanager + tag: v0.24.0 + ingress: + annotations: {} + enabled: false + extraLabels: {} + extraPaths: [] + hosts: [] + path: / + pathType: Prefix + tls: [] + persistentVolume: + enabled: false + size: 1Gi + replicaCount: 1 + resources: {} + securityContext: + fsGroup: 65534 + runAsGroup: 65534 + runAsNonRoot: false + runAsUser: 0 + service: + annotations: {} + clusterIP: "" + externalIPs: [] + labels: {} + loadBalancerIP: "" + loadBalancerSourceRanges: [] + servicePort: 80 + sessionAffinity: None + type: ClusterIP + statefulSet: + enabled: true + headless: + enableMeshPeer: true + tolerations: + - effect: NoSchedule + key: kb-controller + operator: Equal + value: "true" + alertmanagerFiles: + alertmanager.yml: + global: {} + receivers: + - name: default-receiver + route: + group_interval: 30s + group_wait: 5s + receiver: default-receiver + repeat_interval: 10m + configmapReload: + alertmanager: + image: + repository: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/configmap-reload + tag: v0.5.0 + prometheus: + image: + repository: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/configmap-reload + tag: v0.5.0 + enabled: false + kubeStateMetrics: + enabled: false + nodeExporter: + enabled: false + image: + repository: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/node-exporter + tag: v1.3.1 + pushgateway: + enabled: false + ruleFiles: + kafka_alert_rules.yaml: |- + group: + - name: KafkaExporter + rules: + - alert: KafkaTopicsReplicas + expr: 'sum(kafka_topic_partition_in_sync_replica) by (topic) < 3' + for: 0m + labels: + severity: critical + annotations: + summary: 'Kafka topics replicas (instance {{ $labels.app_kubernetes_io_instance }})' + description: 'Kafka topic in-sync partition\n VALUE = {{ $value }}\n LABELS = {{ $labels }}' + - alert: KafkaConsumersGroup + expr: 'sum(kafka_consumergroup_lag) by (consumergroup) > 50' + for: 1m + labels: + severity: critical + annotations: + summary: 'Kafka consumers group (instance {{ $labels.app_kubernetes_io_instance }})' + description: 'Kafka consumers group\n VALUE = {{ $value }}\n LABELS = {{ $labels }}' + - alert: KafkaBrokerDown + expr: 'kafka_brokers < 3' + for: 0m + labels: + severity: critical + annotations: + Summary: 'Kafka broker *{{ $labels.app_kubernetes_io_instance }}* alert status' + description: 'One of the Kafka broker *{{ $labels.app_kubernetes_io_instance }}* is down.' + kubelet_alert_rules.yml: | + groups: + - name: KubeletSummary + rules: + - alert: ContainerCpuUsageWarning + expr: 'rate(container_cpu_time_seconds_total[2m]) / container_cpu_limit * 100 > 70' + for: 2m + labels: + severity: warning + annotations: + summary: 'Container CPU usage is high (> 70%)' + description: 'Container CPU usage is {{ $value | printf "%.2f" }} percent. (pod: {{ $labels.k8s_pod_name }}, container: {{ $labels.k8s_container_name }})' + + - alert: ContainerCpuUsageCritical + expr: 'rate(container_cpu_time_seconds_total[2m]) / container_cpu_limit * 100 > 90' + for: 1m + labels: + severity: critical + annotations: + summary: 'Container CPU usage is very high (> 90%)' + description: 'Container CPU usage is {{ $value | printf "%.2f" }} percent. (pod: {{ $labels.k8s_pod_name }}, container: {{ $labels.k8s_container_name }})' + + - alert: ContainerMemoryUsage + expr: 'container_memory_working_set_bytes / container_memory_limit_bytes * 100 > 90' + for: 2m + labels: + severity: warning + annotations: + summary: 'Container Memory usage is high (> 90%)' + description: 'Container Memory usage is {{ $value | printf "%.2f" }} percent. (pod: {{ $labels.k8s_pod_name }}, container: {{ $labels.k8s_container_name }})' + + - alert: ContainerMemoryUsagePredict + expr: 'predict_linear(container_memory_working_set_bytes[15m], 30*60) - container_memory_limit_bytes > 0' + for: 5m + labels: + severity: critical + annotations: + summary: 'Container Memory predict usage may exceed the limit 30 minutes later' + description: 'Container Memory predict usage may exceed the limit 30 minutes later, the predict value is {{ $value | humanize1024 }}. (pod: {{ $labels.k8s_pod_name }}, container: {{ $labels.k8s_container_name }})' + + - alert: ContainerVolumeUsage + expr: '(k8s_volume_capacity_bytes - k8s_volume_available_bytes) / k8s_volume_capacity_bytes * 100 > 90' + for: 2m + labels: + severity: warning + annotations: + summary: 'Volume usage is high (> 90%)' + description: 'Volume usage is {{ $value | printf "%.2f" }} percent. (pod: {{ $labels.k8s_pod_name }}, volume: {{ $labels.k8s_volume_name }})' + mongodb_alert_rules.yml: "groups:\n - name: MongodbExporter\n rules:\n - + alert: MongodbDown\n expr: 'max_over_time(mongodb_up[1m]) == 0'\n for: + 0m\n labels:\n severity: critical\n annotations:\n summary: + 'MongoDB is Down'\n description: 'MongoDB instance is down\\n VALUE + = {{ $value }}\\n LABELS = {{ $labels }}'\n\n - alert: MongodbRestarted\n + \ expr: 'mongodb_instance_uptime_seconds < 60'\n for: 0m\n labels:\n + \ severity: info\n annotations:\n summary: 'Mongodb has + just been restarted (< 60s)'\n description: 'Mongodb has just been restarted + {{ $value | printf \"%.1f\" }} seconds ago\\n LABELS = {{ $labels }}'\n\n - + alert: MongodbReplicaMemberUnhealthy\n expr: 'max_over_time(mongodb_rs_members_health[1m]) + == 0'\n for: 0m\n labels:\n severity: critical\n annotations:\n + \ summary: 'Mongodb replica member is unhealthy'\n description: + 'MongoDB replica member is not healthy\\n VALUE = {{ $value }}\\n LABELS = {{ + $labels }}'\n\n - alert: MongodbReplicationLag\n expr: '(mongodb_rs_members_optimeDate{member_state=\"PRIMARY\"} + - on (pod) group_right mongodb_rs_members_optimeDate{member_state=\"SECONDARY\"}) + / 1000 > 10'\n for: 0m\n labels:\n severity: critical\n + \ annotations:\n summary: 'MongoDB replication lag (> 10s)'\n description: + 'Mongodb replication lag is more than 10s\\n VALUE = {{ $value }}\\n LABELS + = {{ $labels }}'\n\n - alert: MongodbReplicationHeadroom\n expr: 'sum(avg(mongodb_mongod_replset_oplog_head_timestamp + - mongodb_mongod_replset_oplog_tail_timestamp)) - sum(avg(mongodb_rs_members_optimeDate{member_state=\"PRIMARY\"} + - on (pod) group_right mongodb_rs_members_optimeDate{member_state=\"SECONDARY\"})) + <= 0'\n for: 0m\n labels:\n severity: critical\n annotations:\n + \ summary: 'MongoDB replication headroom (< 0)'\n description: + 'MongoDB replication headroom is <= 0\\n VALUE = {{ $value }}\\n LABELS = {{ + $labels }}'\n\n - alert: MongodbNumberCursorsOpen\n expr: 'mongodb_ss_metrics_cursor_open{csr_type=\"total\"} + > 10 * 1000'\n for: 2m\n labels:\n severity: warning\n + \ annotations:\n summary: 'MongoDB opened cursors num (> 10k)'\n + \ description: 'Too many cursors opened by MongoDB for clients (> 10k)\\n + \ VALUE = {{ $value }}\\n LABELS = {{ $labels }}'\n\n - alert: MongodbCursorsTimeouts\n + \ expr: 'increase(mongodb_ss_metrics_cursor_timedOut[1m]) > 100'\n for: + 2m\n labels:\n severity: warning\n annotations:\n summary: + 'MongoDB cursors timeouts (>100/minute)' \n description: 'Too many cursors + are timing out (> 100/minute)\\n VALUE = {{ $value }}\\n LABELS = {{ $labels + }}'\n\n - alert: MongodbTooManyConnections\n expr: 'avg by(pod) (rate(mongodb_ss_connections{conn_type=\"current\"}[1m])) + / avg by(pod) (sum (mongodb_ss_connections) by(pod)) * 100 > 80'\n for: + 2m\n labels:\n severity: warning\n annotations:\n summary: + 'MongoDB too many connections (> 80%)'\n description: 'Too many connections + (> 80%)\\n VALUE = {{ $value }}\\n LABELS = {{ $labels }}'\n\n - alert: + MongodbVirtualMemoryUsage\n expr: '(sum(mongodb_ss_mem_virtual) BY (pod) + / sum(mongodb_ss_mem_resident) BY (pod)) > 100'\n for: 2m\n labels:\n + \ severity: warning\n annotations:\n summary: MongoDB + virtual memory usage high\n description: \"High memory usage: the quotient + of (mem_virtual / mem_resident) is more than 100\\n VALUE = {{ $value }}\\n LABELS + = {{ $labels }}\"" + mysql_alert_rules.yml: | + groups: + - name: MysqldExporter + rules: + - alert: MysqlDown + expr: 'max_over_time(mysql_up[1m]) == 0' + for: 0m + labels: + severity: critical + annotations: + summary: 'MySQL is down' + description: 'MySQL is down. (instance: {{ $labels.pod }})' + + - alert: MysqlRestarted + expr: 'mysql_global_status_uptime < 60' + for: 0m + labels: + severity: info + annotations: + summary: 'MySQL has just been restarted (< 60s)' + description: 'MySQL has just been restarted {{ $value | printf "%.1f" }} seconds ago. (instance: {{ $labels.pod }})' + + - alert: MysqlTooManyConnections + expr: 'sum(max_over_time(mysql_global_status_threads_connected[1m]) / mysql_global_variables_max_connections) BY (namespace,app_kubernetes_io_instance,pod) * 100 > 80' + for: 2m + labels: + severity: warning + annotations: + summary: 'MySQL has too many connections (> 80%)' + description: '{{ $value | printf "%.2f" }} percent of MySQL connections are in use. (instance: {{ $labels.pod }})' + + - alert: MysqlConnectionErrors + expr: 'sum(increase(mysql_global_status_connection_errors_total[1m])) BY (namespace,app_kubernetes_io_instance,pod) > 0' + for: 2m + labels: + severity: warning + annotations: + summary: 'MySQL connection errors' + description: 'MySQL has connection errors and the value is {{ $value | printf "%.2f" }}. (instance: {{ $labels.pod }})' + + - alert: MysqlHighThreadsRunning + expr: 'sum(max_over_time(mysql_global_status_threads_running[1m]) / mysql_global_variables_max_connections) BY (namespace,app_kubernetes_io_instance,pod) * 100 > 60' + for: 2m + labels: + severity: warning + annotations: + summary: 'MySQL high threads running (> 60%)' + description: '{{ $value | printf "%.2f" }} percent of MySQL connections are in running state. (instance: {{ $labels.pod }})' + + - alert: MysqlSlowQueries + expr: 'sum(increase(mysql_global_status_slow_queries[1m])) BY (namespace,app_kubernetes_io_instance,pod) > 0' + for: 2m + labels: + severity: info + annotations: + summary: 'MySQL slow queries' + description: 'MySQL server has {{ $value | printf "%.2f" }} slow query. (instance: {{ $labels.pod }})' + + - alert: MysqlInnodbLogWaits + expr: 'sum(rate(mysql_global_status_innodb_log_waits[5m])) BY (namespace,app_kubernetes_io_instance,pod) > 10' + for: 2m + labels: + severity: warning + annotations: + summary: 'MySQL InnoDB log waits (> 10)' + description: 'MySQL innodb log writes stalling and the value is {{ $value | printf "%.2f" }}. (instance: {{ $labels.pod }})' + + - alert: MysqlInnodbBufferPoolHits + expr: 'sum(rate(mysql_global_status_innodb_buffer_pool_reads[5m]) / rate(mysql_global_status_innodb_buffer_pool_read_requests[5m])) BY (namespace,app_kubernetes_io_instance,pod) * 100 > 5' + for: 2m + labels: + severity: warning + annotations: + summary: 'MySQL InnoDB high read requests rate hitting disk (> 5%)' + description: 'High number of logical reads that InnoDB could not satisfy from the buffer pool, and had to read directly from disk. The value is {{ $value | printf "%.2f" }} percent. (instance: {{ $labels.pod }})' + postgresql_alert_rules.yml: | + groups: + - name: PostgreSQLExporter + rules: + - alert: PostgreSQLDown + expr: 'max_over_time(pg_up[1m]) == 0' + for: 0m + labels: + severity: critical + annotations: + summary: 'PostgreSQL is down' + description: 'PostgreSQL is down. (instance: {{ $labels.pod }})' + + - alert: PostgreSQLRestarted + expr: 'time() - pg_postmaster_start_time_seconds < 60' + for: 0m + labels: + severity: info + annotations: + summary: 'PostgreSQL has just been restarted (< 60s)' + description: 'PostgreSQL has just been restarted {{ $value | printf "%.1f" }} seconds ago. (instance: {{ $labels.pod }})' + + - alert: PostgreSQLExporterError + expr: 'pg_exporter_last_scrape_error > 0' + for: 0m + labels: + severity: warning + annotations: + summary: 'PostgreSQL exporter scrape error' + description: 'PostgreSQL exporter has {{ $value | printf "%.2f" }} scrape errors. A query may be buggy in query.yaml. (instance: {{ $labels.pod }})' + + - alert: PostgreSQLTooManySlowQueries + expr: | + max by(namespace,app_kubernetes_io_instance,pod,datname) ( + max_over_time(pg_stat_activity_max_tx_duration{datname!~"template.*"}[2m]) + ) > 60 + for: 2m + labels: + severity: warning + annotations: + summary: 'PostgreSQL database has high number of slow queries' + description: 'PostgreSQL database has slow queries and the value is {{ $value | printf "%.2f" }}. (instance: {{ $labels.pod }}, database: {{ $labels.datname }})' + + - alert: PostgreSQLTooManyConnections + expr: | + sum by (namespace,app_kubernetes_io_instance,pod) (pg_stat_activity_count{datname!~"template.*"}) + > on(namespace,app_kubernetes_io_instance,pod) + (pg_settings_max_connections - pg_settings_superuser_reserved_connections) * 0.8 + for: 2m + labels: + severity: warning + annotations: + summary: 'PostgreSQL too many connections (> 80%)' + description: 'PostgreSQL has too many connections and the value is {{ $value | printf "%.2f" }} percent. (instance: {{ $labels.pod }})' + + - alert: PostgreSQLDeadLocks + expr: 'increase(pg_stat_database_deadlocks_total{datname!~"template.*", datname!=""}[2m]) > 5' + for: 2m + labels: + severity: warning + annotations: + summary: 'PostgreSQL database has dead locks (> 5)' + description: 'PostgreSQL database has {{ $value | printf "%.2f"}} dead locks. (instance: {{ $labels.pod }}, database: {{ $labels.datname }})' + + - alert: PostgreSQLHighRollbackRate + expr: | + rate(pg_stat_database_xact_rollback_total{datname!~"template.*", datname!=""}[2m]) + / + rate(pg_stat_database_xact_commit_total{datname!~"template.*", datname!=""}[2m]) + > 0.1 + for: 2m + labels: + severity: warning + annotations: + summary: 'PostgreSQL database has high rollback rate (> 10%)' + description: 'Ratio of transactions being aborted compared to committed is {{ $value | printf "%.2f"}} percent. (instance: {{ $labels.pod }}, database: {{ $labels.datname }})' + + - alert: PostgreSQLTooManyLocksAcquired + expr: | + sum by (namespace,app_kubernetes_io_instance,pod) (pg_locks_count) + / on(namespace,app_kubernetes_io_instance,pod) + (pg_settings_max_locks_per_transaction * pg_settings_max_connections) + > 0.2 + for: 2m + labels: + severity: warning + annotations: + summary: 'PostgreSQL has too many locks acquired (> 20%)' + description: 'Too many locks acquired on the database and the value is {{ $value | printf "%.2f" }} percent. (instance: {{ $labels.pod }})' + + - alert: PostgreSQLCacheHitRatio + expr: | + avg by (namespace,app_kubernetes_io_instance,pod,datname) ( + rate(pg_stat_database_blks_hit_total{datname!~"template.*", datname!=""}[2m]) + / + ( + rate( + pg_stat_database_blks_hit_total{datname!~"template.*", datname!=""}[2m] + ) + + + rate( + pg_stat_database_blks_read_total{datname!~"template.*", datname!=""}[2m] + ) + ) + ) < 0.9 + for: 2m + labels: + severity: warning + annotations: + summary: 'PostgreSQL database has low cache hit rate (< 90%)' + description: 'Low cache hit rate and the value is {{ $value | printf "%.2f" }} percent. (instance: {{ $labels.pod }}, database: {{ $labels.datname }})' + + - alert: PostgreSQLMaxWriteBufferReached + expr: 'rate(pg_stat_bgwriter_maxwritten_clean_total[2m]) > 0' + for: 2m + labels: + severity: warning + annotations: + summary: 'PostgreSQL write buffers reached max' + description: 'PostgreSQL background writer stops for max and the value is {{ $value | printf "%.2f" }}. (instance: {{ $labels.pod }})' + + - alert: PostgreSQLHighWALFilesArchiveErrorRate + expr: | + rate(pg_stat_archiver_failed_count_total[2m]) + / ( + rate(pg_stat_archiver_archived_count_total[2m]) + rate(pg_stat_archiver_failed_count_total[2m]) + ) > 0.1 + for: 2m + labels: + severity: warning + annotations: + summary: 'PostgreSQL has high error rate in WAL files archiver(> 10%)' + description: 'PostgreSQL high error rate in WAL files archiver and the value is {{ $value | printf "%.2f" }} percent. (instance: {{ $labels.pod }})' + + - alert: PostgreSQLTableNotAutoVacuumed + expr: | + (pg_stat_user_tables_last_autovacuum > 0) + and + (time() - pg_stat_user_tables_last_autovacuum) + > 24 * 60 * 60 * 10 + for: 0m + labels: + severity: warning + annotations: + summary: 'PostgreSQL table in database has not been auto vacuumed for 10 days' + description: 'Table {{ $labels.relname }} in database has not been auto vacuumed for 10 days. (instance: {{ $labels.pod }}, database: {{ $labels.datname }})' + + - alert: PostgreSQLTableNotAutoAnalyzed + expr: | + (pg_stat_user_tables_last_autoanalyze > 0) + and + (time() - pg_stat_user_tables_last_autoanalyze) + > 24 * 60 * 60 * 10 + for: 0m + labels: + severity: warning + annotations: + summary: 'PostgreSQL table in database has not been auto analyzed for 10 days' + description: 'Table {{ $labels.relname }} in database has not been auto analyzed for 10 days. (instance: {{ $labels.pod }}, database: {{ $labels.datname }})' + + - alert: PostgreSQLTableTooManyDeadTuples + expr: | + (pg_stat_user_tables_n_dead_tup > 10000) + / + (pg_stat_user_tables_n_live_tup + pg_stat_user_tables_n_dead_tup) + >= 0.1 + for: 2m + labels: + severity: warning + annotations: + summary: 'PostgreSQL table in database has too many dead tuples (> 10%)' + description: 'Table {{ $labels.relname }} in database dead tuples is too large and the value is {{ $value | printf "%.2f" }} percent. (instance: {{ $labels.pod }}, database: {{ $labels.datname }})' + redis_alert_rules.yml: | + groups: + - name: RedisExporter + rules: + - alert: RedisDown + expr: 'redis_up == 0' + for: 5m + labels: + severity: critical + annotations: + summary: 'Redis is down' + description: 'Redis is down. (instance: {{ $labels.pod }})' + + - alert: RedisCPUHigh + expr: '(rate(redis_cpu_sys_seconds_total[1m]) + rate(redis_cpu_user_seconds_total[1m])) * 100 > 80' + for: 2m + labels: + severity: warning + annotations: + summary: 'Out of CPU (> 80%)' + description: 'Redis is running out of CPU and the value is {{ $value | printf "%.2f" }} percent. (instance: {{ $labels.pod }})' + + - alert: RedisMemoryHigh + expr: '(redis_memory_max_bytes == 0 or redis_memory_used_bytes * 100 / redis_memory_max_bytes) > 90' + for: 5m + labels: + severity: warning + annotations: + summary: 'Out of memory (> 90%)' + description: 'Redis is running out of memory and the value is {{ $value | printf "%.2f" }} percent. (instance: {{ $labels.pod }})' + + - alert: RedisTooManyConnections + expr: 'redis_connected_clients * 100 / redis_config_maxclients > 80' + for: 1m + labels: + severity: warning + annotations: + summary: 'Redis has too many connections (> 80%)' + description: 'Redis has too many connections and the value is {{ $value | printf "%.2f" }} percent. (instance: {{ $labels.pod }})' + + - alert: RedisRejectedConnections + expr: 'increase(redis_rejected_connections_total[1m]) > 0' + for: 5m + labels: + severity: error + annotations: + summary: 'Redis has rejected connections' + description: '{{ $value | printf "%.2f" }} connections to Redis has been rejected. (instance: {{ $labels.pod }})' + + - alert: RedisKeyEviction + expr: 'increase(redis_evicted_keys_total[5m]) > 0' + for: 1s + labels: + severity: error + annotations: + summary: 'Redis has evicted keys' + description: 'Redis has evicted keys in the last 5 minutes and the value is {{ $value | printf "%.2f" }}. (instance: {{ $labels.pod }})' + + - alert: RedisMissingMaster + expr: 'count by (app_kubernetes_io_instance) (redis_instance_info{role="master"}) < 1' + for: 30s + labels: + severity: critical + annotations: + summary: 'Redis missing master' + description: 'Redis cluster has no node marked as master.' + + - alert: RedisDisconnectedSlaves + expr: 'count without (instance, job) (redis_connected_slaves) - sum without (instance, job) (redis_connected_slaves) - 1 > 1' + for: 0m + labels: + severity: critical + annotations: + summary: 'Redis disconnected slaves' + description: 'Redis not replicating for all slaves. Consider reviewing the redis replication status. (instance: {{ $labels.pod }})' + + - alert: RedisReplicationBroken + expr: 'delta(redis_connected_slaves[1m]) < 0' + for: 0m + labels: + severity: critical + annotations: + summary: 'Redis replication broken' + description: 'Redis instance lost a slave. (instance: {{ $labels.pod }})' + server: + affinity: + nodeAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - preference: + matchExpressions: + - key: kb-controller + operator: In + values: + - "true" + weight: 100 + containerSecurityContext: + allowPrivilegeEscalation: false + enabled: true + extraArgs: + enable-feature: memory-snapshot-on-shutdown + log.level: info + storage.tsdb.min-block-duration: 30m + storage.tsdb.retention.size: 10GB + extraFlags: + - web.enable-lifecycle + - web.enable-remote-write-receiver + global: + evaluation_interval: 15s + scrape_interval: 15s + scrape_timeout: 10s + image: + repository: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/prometheus + tag: v2.44.0 + ingress: + annotations: {} + enabled: false + extraLabels: {} + extraPaths: [] + hosts: [] + path: / + pathType: Prefix + tls: [] + persistentVolume: + enabled: false + size: 20Gi + remoteWrite: [] + replicaCount: 1 + resources: {} + retention: 2d + routePrefix: / + securityContext: + fsGroup: 65534 + runAsGroup: 65534 + runAsNonRoot: false + runAsUser: 0 + service: + annotations: {} + clusterIP: "" + enabled: true + externalIPs: [] + gRPC: + enabled: false + servicePort: 10901 + labels: {} + loadBalancerIP: "" + loadBalancerSourceRanges: [] + servicePort: 80 + sessionAffinity: None + statefulsetReplica: + enabled: false + replica: 0 + type: ClusterIP + statefulSet: + enabled: true + tolerations: + - effect: NoSchedule + key: kb-controller + operator: Equal + value: "true" + serverFiles: + prometheus.yml: + rule_files: + - /etc/config/recording_rules.yml + - /etc/config/alerting_rules.yml + - /etc/config/kubelet_alert_rules.yml + - /etc/config/mysql_alert_rules.yml + - /etc/config/postgresql_alert_rules.yml + - /etc/config/redis_alert_rules.yml + - /etc/config/kafka_alert_rules.yml + - /etc/config/mongodb_alert_rules.yml + scrape_configs: + - job_name: prometheus + static_configs: + - targets: + - localhost:9090 + - honor_labels: true + job_name: kubeblocks-service + kubernetes_sd_configs: + - role: endpoints + relabel_configs: + - action: keep + regex: kubeblocks + source_labels: + - __meta_kubernetes_service_label_app_kubernetes_io_managed_by + - action: drop + regex: agamotto + source_labels: + - __meta_kubernetes_service_label_monitor_kubeblocks_io_managed_by + - action: keep + regex: true + source_labels: + - __meta_kubernetes_service_annotation_monitor_kubeblocks_io_scrape + - action: replace + regex: (https?) + source_labels: + - __meta_kubernetes_service_annotation_monitor_kubeblocks_io_scheme + target_label: __scheme__ + - action: replace + regex: (.+) + source_labels: + - __meta_kubernetes_service_annotation_monitor_kubeblocks_io_path + target_label: __metrics_path__ + - action: replace + regex: (.+?)(?::\d+)?;(\d+) + replacement: $1:$2 + source_labels: + - __address__ + - __meta_kubernetes_service_annotation_monitor_kubeblocks_io_port + target_label: __address__ + - action: labelmap + regex: __meta_kubernetes_service_annotation_monitor_kubeblocks_io_param_(.+) + replacement: __param_$1 + - action: labelmap + regex: __meta_kubernetes_service_label_(.+) + - action: replace + source_labels: + - __meta_kubernetes_namespace + target_label: namespace + - action: replace + source_labels: + - __meta_kubernetes_service_name + target_label: service + - action: replace + source_labels: + - __meta_kubernetes_pod_node_name + target_label: node + - action: replace + source_labels: + - __meta_kubernetes_pod_name + target_label: pod + - action: drop + regex: Pending|Succeeded|Failed|Completed + source_labels: + - __meta_kubernetes_pod_phase + - honor_labels: true + job_name: kubeblocks-agamotto + kubernetes_sd_configs: + - role: endpoints + relabel_configs: + - action: keep + regex: agamotto + source_labels: + - __meta_kubernetes_service_label_monitor_kubeblocks_io_managed_by + - action: keep + regex: true + source_labels: + - __meta_kubernetes_service_annotation_monitor_kubeblocks_io_scrape + - action: replace + regex: (https?) + source_labels: + - __meta_kubernetes_service_annotation_monitor_kubeblocks_io_scheme + target_label: __scheme__ + - action: replace + regex: (.+) + source_labels: + - __meta_kubernetes_service_annotation_monitor_kubeblocks_io_path + target_label: __metrics_path__ + - action: replace + regex: (.+?)(?::\d+)?;(\d+) + replacement: $1:$2 + source_labels: + - __address__ + - __meta_kubernetes_service_annotation_monitor_kubeblocks_io_port + target_label: __address__ + - action: labelmap + regex: __meta_kubernetes_service_annotation_monitor_kubeblocks_io_param_(.+) + replacement: __param_$1 + - action: drop + regex: Pending|Succeeded|Failed|Completed + source_labels: + - __meta_kubernetes_pod_phase +--- +# Source: kubeblocks/templates/applications/snapshot-controller-values.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: snapshot-controller-chart-kubeblocks-values + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +data: + values-kubeblocks-override.yaml: |- + affinity: + nodeAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - preference: + matchExpressions: + - key: kb-controller + operator: In + values: + - "true" + weight: 100 + enabled: true + image: + repository: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/snapshot-controller + tag: v6.2.1 + replicaCount: 1 + tolerations: + - effect: NoSchedule + key: kb-controller + operator: Equal + value: "true" + volumeSnapshotClasses: + - deletionPolicy: Delete + driver: hostpath.csi.k8s.io + name: default-vsc +--- +# Source: kubeblocks/templates/configmap.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: kubeblocks-manager-config + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +data: + config.yaml: | + # data plane tolerations + DATA_PLANE_TOLERATIONS: '[{"effect":"NoSchedule","key":"kb-data","operator":"Equal","value":"true"}]' + + # data plane affinity + DATA_PLANE_AFFINITY: '{"nodeAffinity":{"preferredDuringSchedulingIgnoredDuringExecution":[{"preference":{"matchExpressions":[{"key":"kb-data","operator":"In","values":["true"]}]},"weight":100}]}}' + + # the default storage class name. + DEFAULT_STORAGE_CLASS: "" +--- +# Source: kubeblocks/templates/configmap.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: kubeblocks-host-ports + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +data: {} +--- +# Source: kubeblocks/templates/grafana/configmaps-datasources.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: kubeblocks-grafana-datasource + namespace: acto-namespace + annotations: + null + labels: + grafana_datasource: "1" + app: kubeblocks-grafana-datasource + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +data: + datasource.yaml: |- + apiVersion: 1 + datasources: + - name: Prometheus + type: prometheus + uid: prometheus + url: http://kb-addon-prometheus-server.acto-namespace:80/ + access: proxy + isDefault: true + jsonData: + timeInterval: 15s + - name: Prometheus-15s + type: prometheus + uid: prometheus-15 + url: http://kb-addon-prometheus-server.acto-namespace:80/ + access: proxy + isDefault: false + jsonData: + timeInterval: 15s + - name: Loki + type: loki + uid: loki-kubeblocks + access: proxy + url: http://loki-gateway:80 + jsonData: + maxLines: 1000 +--- +# Source: kubeblocks/templates/prometheus/alertmanager.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + name: kb-addon-prometheus-alertmanager-config +data: + alertmanager.yml: | + global: { } + receivers: + - name: default-receiver + route: + group_by: [ 'alertname', 'namespace', 'app_kubernetes_io_instance' ] + group_interval: 30s + group_wait: 5s + receiver: default-receiver + repeat_interval: 10m + routes: + - receiver: default-receiver + group_by: ['alertname', 'instance', 'pod'] + matchers: + - alertname=~"Container.*" +--- +# Source: kubeblocks/templates/prometheus/webhook-adaptor.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + name: kb-addon-alertmanager-webhook-adaptor-config +data: + config.yml: | + receivers: [ ] +--- +# Source: kubeblocks/templates/rbac/apps_backuppolicytemplate_editor_role.yaml +# permissions for end users to edit backuppolicytemplates. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-backuppolicytemplate-editor-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - apps.kubeblocks.io + resources: + - backuppolicytemplates + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - apps.kubeblocks.io + resources: + - backuppolicytemplates/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/apps_backuppolicytemplate_viewer_role.yaml +# permissions for end users to view backuppolicytemplates. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-backuppolicytemplate-viewer-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - apps.kubeblocks.io + resources: + - backuppolicytemplates + verbs: + - get + - list + - watch +- apiGroups: + - apps.kubeblocks.io + resources: + - backuppolicytemplates/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/apps_cluster_editor_role.yaml +# permissions for end users to edit clusters. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-cluster-editor-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - apps.kubeblocks.io + resources: + - clusters + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - apps.kubeblocks.io + resources: + - clusters/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/apps_cluster_viewer_role.yaml +# permissions for end users to view clusters. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-cluster-viewer-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - apps.kubeblocks.io + resources: + - clusters + verbs: + - get + - list + - watch +- apiGroups: + - apps.kubeblocks.io + resources: + - clusters/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/apps_clusterdefinition_editor_role.yaml +# permissions for end users to edit clusterdefinitions. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-clusterdefinition-editor-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - apps.kubeblocks.io + resources: + - clusterdefinitions + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - apps.kubeblocks.io + resources: + - clusterdefinitions/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/apps_clusterdefinition_viewer_role.yaml +# permissions for end users to view clusterdefinitions. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-clusterdefinition-viewer-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - apps.kubeblocks.io + resources: + - clusterdefinitions + verbs: + - get + - list + - watch +- apiGroups: + - apps.kubeblocks.io + resources: + - clusterdefinitions/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/apps_clusterversion_editor_role.yaml +# permissions for end users to edit clusterversions. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-clusterversion-editor-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - apps.kubeblocks.io + resources: + - clusterversions + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - apps.kubeblocks.io + resources: + - clusterversions/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/apps_clusterversion_viewer_role.yaml +# permissions for end users to view clusterversions. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-clusterversion-viewer-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - apps.kubeblocks.io + resources: + - clusterversions + verbs: + - get + - list + - watch +- apiGroups: + - apps.kubeblocks.io + resources: + - clusterversions/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/apps_configconstraint_editor_role.yaml +# permissions for end users to edit configconstraints. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-configconstraint-editor-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - apps.kubeblocks.io + resources: + - configconstraints + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - apps.kubeblocks.io + resources: + - configconstraints/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/apps_configconstraint_viewer_role.yaml +# permissions for end users to view configconstraints. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-configconstraint-viewer-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - apps.kubeblocks.io + resources: + - configconstraints + verbs: + - get + - list + - watch +- apiGroups: + - apps.kubeblocks.io + resources: + - configconstraints/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/auth_proxy_client_clusterrole.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-metrics-reader + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- nonResourceURLs: + - "/metrics" + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/auth_proxy_role.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-proxy-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - authentication.k8s.io + resources: + - tokenreviews + verbs: + - create +- apiGroups: + - authorization.k8s.io + resources: + - subjectaccessreviews + verbs: + - create +--- +# Source: kubeblocks/templates/rbac/cluster_pod_required_role.yaml +# permissions for end users to edit clusters. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-cluster-pod-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +aggregationRule: + clusterRoleSelectors: + - matchLabels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/required-by: pod +--- +# Source: kubeblocks/templates/rbac/cluster_pod_required_role.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-lorry-pod-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/required-by: pod +rules: +- apiGroups: + - "" + resources: + - events + verbs: + - create +- apiGroups: + - "" + resources: + - configmaps + verbs: + - create + - get + - list + - patch + - update + - delete +- apiGroups: + - apps.kubeblocks.io + resources: + - clusters + verbs: + - get + - list +- apiGroups: + - apps.kubeblocks.io + resources: + - clusters/status + verbs: + - get +- apiGroups: + - "" + resources: + - pods + verbs: + - get + - list +--- +# Source: kubeblocks/templates/rbac/cluster_pod_required_role.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-patroni-pod-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/required-by: pod +rules: +- apiGroups: + - "" + resources: + - configmaps + verbs: + - create + - get + - list + - patch + - update + - watch + # delete is required only for 'patronictl remove' + - delete +- apiGroups: + - "" + resources: + - endpoints + verbs: + - get + - patch + - update + - create + - list + - watch + # delete is required only for 'patronictl remove' + - delete +- apiGroups: + - "" + resources: + - pods + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +--- +# Source: kubeblocks/templates/rbac/cluster_pod_required_role.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-backup-pod-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/required-by: pod +rules: +- apiGroups: + - "dataprotection.kubeblocks.io" + resources: + - backups/status + verbs: + - get + - update + - patch +- apiGroups: + - "dataprotection.kubeblocks.io" + resources: + - backups + verbs: + - create +--- +# Source: kubeblocks/templates/rbac/cluster_pod_required_role.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-volume-protection-pod-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/required-by: pod +rules: +- apiGroups: + - "" + resources: + - nodes + - nodes/stats + verbs: + - get + - list +--- +# Source: kubeblocks/templates/rbac/clusterrole.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +aggregationRule: + clusterRoleSelectors: + - matchLabels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks +--- +# Source: kubeblocks/templates/rbac/clusterrole.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-manager-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: + - apiGroups: + - apps + resources: + - deployments + verbs: + - create + - delete + - deletecollection + - get + - list + - patch + - update + - watch + - apiGroups: + - apps + resources: + - deployments/finalizers + verbs: + - update + - apiGroups: + - apps + resources: + - deployments/status + verbs: + - get + - apiGroups: + - apps + resources: + - statefulsets + verbs: + - create + - delete + - deletecollection + - get + - list + - patch + - update + - watch + - apiGroups: + - apps + resources: + - statefulsets/finalizers + verbs: + - update + - apiGroups: + - apps + resources: + - statefulsets/status + verbs: + - get + - apiGroups: + - apps.kubeblocks.io + resources: + - backuppolicytemplates + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - apps.kubeblocks.io + resources: + - backuppolicytemplates/finalizers + verbs: + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - backuppolicytemplates/status + verbs: + - get + - patch + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - clusterdefinitions + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - apps.kubeblocks.io + resources: + - clusterdefinitions/finalizers + verbs: + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - clusterdefinitions/status + verbs: + - get + - patch + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - clusters + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - apps.kubeblocks.io + resources: + - clusters/finalizers + verbs: + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - clusters/status + verbs: + - get + - patch + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - clusterversions + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - apps.kubeblocks.io + resources: + - clusterversions/finalizers + verbs: + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - clusterversions/status + verbs: + - get + - patch + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - componentclassdefinitions + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - apps.kubeblocks.io + resources: + - componentclassdefinitions/finalizers + verbs: + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - componentclassdefinitions/status + verbs: + - get + - patch + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - componentdefinitions + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - apps.kubeblocks.io + resources: + - componentdefinitions/finalizers + verbs: + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - componentdefinitions/status + verbs: + - get + - patch + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - componentresourceconstraints + verbs: + - get + - list + - watch + - apiGroups: + - apps.kubeblocks.io + resources: + - components + verbs: + - create + - delete + - deletecollection + - get + - list + - patch + - update + - watch + - apiGroups: + - apps.kubeblocks.io + resources: + - components/finalizers + verbs: + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - components/status + verbs: + - get + - patch + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - configconstraints + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - apps.kubeblocks.io + resources: + - configconstraints/finalizers + verbs: + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - configconstraints/status + verbs: + - get + - patch + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - configurations + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - apps.kubeblocks.io + resources: + - configurations/finalizers + verbs: + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - configurations/status + verbs: + - get + - patch + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - opsdefinitions + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - apps.kubeblocks.io + resources: + - opsdefinitions/finalizers + verbs: + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - opsdefinitions/status + verbs: + - get + - patch + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - opsrequests + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - apps.kubeblocks.io + resources: + - opsrequests/finalizers + verbs: + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - opsrequests/status + verbs: + - get + - patch + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - servicedescriptors + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - apps.kubeblocks.io + resources: + - servicedescriptors/finalizers + verbs: + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - servicedescriptors/status + verbs: + - get + - patch + - update + - apiGroups: + - batch + resources: + - cronjobs + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - batch + resources: + - cronjobs/finalizers + verbs: + - patch + - update + - apiGroups: + - batch + resources: + - cronjobs/status + verbs: + - get + - apiGroups: + - batch + resources: + - jobs + verbs: + - create + - delete + - deletecollection + - get + - list + - patch + - update + - watch + - apiGroups: + - batch + resources: + - jobs/finalizers + verbs: + - update + - apiGroups: + - batch + resources: + - jobs/status + verbs: + - get + - apiGroups: + - coordination.k8s.io + resources: + - leases + verbs: + - create + - get + - list + - patch + - update + - watch + - apiGroups: + - "" + resources: + - configmap + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - "" + resources: + - configmap/finalizers + verbs: + - update + - apiGroups: + - "" + resources: + - configmaps + verbs: + - create + - delete + - deletecollection + - get + - list + - patch + - update + - watch + - apiGroups: + - "" + resources: + - configmaps/finalizers + verbs: + - update + - apiGroups: + - "" + resources: + - events + verbs: + - create + - get + - list + - patch + - watch + - apiGroups: + - "" + resources: + - persistentvolumeclaims + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - "" + resources: + - persistentvolumeclaims/finalizers + verbs: + - update + - apiGroups: + - "" + resources: + - persistentvolumeclaims/status + verbs: + - get + - patch + - update + - apiGroups: + - "" + resources: + - persistentvolumes + verbs: + - get + - list + - patch + - update + - watch + - apiGroups: + - "" + resources: + - pods + verbs: + - delete + - deletecollection + - get + - list + - patch + - update + - watch + - apiGroups: + - "" + resources: + - pods/exec + verbs: + - create + - apiGroups: + - "" + resources: + - pods/finalizers + verbs: + - update + - apiGroups: + - "" + resources: + - pods/log + verbs: + - get + - list + - apiGroups: + - "" + resources: + - secrets + verbs: + - create + - delete + - deletecollection + - get + - list + - patch + - update + - watch + - apiGroups: + - "" + resources: + - secrets/finalizers + verbs: + - update + - apiGroups: + - "" + resources: + - serviceaccounts + verbs: + - get + - list + - watch + - apiGroups: + - "" + resources: + - serviceaccounts/status + verbs: + - get + - apiGroups: + - "" + resources: + - services + verbs: + - create + - delete + - deletecollection + - get + - list + - patch + - update + - watch + - apiGroups: + - "" + resources: + - services/finalizers + verbs: + - update + - apiGroups: + - "" + resources: + - services/status + verbs: + - get + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - actionsets + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - actionsets/finalizers + verbs: + - update + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - actionsets/status + verbs: + - get + - patch + - update + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - backuppolicies + verbs: + - create + - delete + - deletecollection + - get + - list + - patch + - update + - watch + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - backuppolicies/finalizers + verbs: + - update + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - backuppolicies/status + verbs: + - get + - patch + - update + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - backuprepos + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - backuprepos/finalizers + verbs: + - update + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - backuprepos/status + verbs: + - get + - patch + - update + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - backups + verbs: + - create + - delete + - deletecollection + - get + - list + - patch + - update + - watch + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - backups/finalizers + verbs: + - update + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - backups/status + verbs: + - get + - patch + - update + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - backupschedules + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - backupschedules/finalizers + verbs: + - update + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - backupschedules/status + verbs: + - get + - patch + - update + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - restores + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - restores/finalizers + verbs: + - update + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - restores/status + verbs: + - get + - patch + - update + - apiGroups: + - extensions.kubeblocks.io + resources: + - addons + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - extensions.kubeblocks.io + resources: + - addons/finalizers + verbs: + - update + - apiGroups: + - extensions.kubeblocks.io + resources: + - addons/status + verbs: + - get + - patch + - update + - apiGroups: + - policy + resources: + - poddisruptionbudgets + verbs: + - create + - delete + - deletecollection + - get + - list + - patch + - update + - watch + - apiGroups: + - policy + resources: + - poddisruptionbudgets/finalizers + verbs: + - update + - apiGroups: + - rbac.authorization.k8s.io + resources: + - clusterrolebindings + verbs: + - get + - list + - watch + - apiGroups: + - rbac.authorization.k8s.io + resources: + - clusterrolebindings/status + verbs: + - get + - apiGroups: + - rbac.authorization.k8s.io + resources: + - rolebindings + verbs: + - get + - list + - watch + - apiGroups: + - rbac.authorization.k8s.io + resources: + - rolebindings/status + verbs: + - get + - apiGroups: + - snapshot.storage.k8s.io + resources: + - volumesnapshotclasses + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - snapshot.storage.k8s.io + resources: + - volumesnapshotclasses/finalizers + verbs: + - patch + - update + - apiGroups: + - snapshot.storage.k8s.io + resources: + - volumesnapshots + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - snapshot.storage.k8s.io + resources: + - volumesnapshots/finalizers + verbs: + - patch + - update + - apiGroups: + - storage.k8s.io + resources: + - csidrivers + verbs: + - get + - list + - watch + - apiGroups: + - storage.k8s.io + resources: + - storageclasses + verbs: + - create + - delete + - get + - list + - watch + - apiGroups: + - storage.kubeblocks.io + resources: + - storageproviders + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - storage.kubeblocks.io + resources: + - storageproviders/finalizers + verbs: + - update + - apiGroups: + - storage.kubeblocks.io + resources: + - storageproviders/status + verbs: + - get + - patch + - update + - apiGroups: + - workloads.kubeblocks.io + resources: + - replicatedstatemachines + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - workloads.kubeblocks.io + resources: + - replicatedstatemachines/finalizers + verbs: + - update + - apiGroups: + - workloads.kubeblocks.io + resources: + - replicatedstatemachines/status + verbs: + - get + - patch + - update +--- +# Source: kubeblocks/templates/rbac/dataprotection_backup_editor_role.yaml +# permissions for end users to edit backups. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-backup-editor-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - dataprotection.kubeblocks.io + resources: + - backups + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - dataprotection.kubeblocks.io + resources: + - backups/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/dataprotection_backup_viewer_role.yaml +# permissions for end users to view backups. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-backup-viewer-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - dataprotection.kubeblocks.io + resources: + - backups + verbs: + - get + - list + - watch +- apiGroups: + - dataprotection.kubeblocks.io + resources: + - backups/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/dataprotection_backuppolicy_editor_role.yaml +# permissions for end users to edit backuppolicies. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-backuppolicy-editor-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - dataprotection.kubeblocks.io + resources: + - backuppolicies + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - dataprotection.kubeblocks.io + resources: + - backuppolicies/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/dataprotection_backuppolicy_viewer_role.yaml +# permissions for end users to view backuppolicies. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-backuppolicy-viewer-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - dataprotection.kubeblocks.io + resources: + - backuppolicies + verbs: + - get + - list + - watch +- apiGroups: + - dataprotection.kubeblocks.io + resources: + - backuppolicies/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/dataprotection_backuptool_editor_role.yaml +# permissions for end users to edit backuptools. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-backuptool-editor-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - dataprotection.kubeblocks.io + resources: + - backuptools + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - dataprotection.kubeblocks.io + resources: + - backuptools/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/dataprotection_backuptool_viewer_role.yaml +# permissions for end users to view backuptools. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-backuptool-viewer-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - dataprotection.kubeblocks.io + resources: + - backuptools + verbs: + - get + - list + - watch +- apiGroups: + - dataprotection.kubeblocks.io + resources: + - backuptools/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/dataprotection_restore_editor_role.yaml +# permissions for end users to edit restores. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-restore-editor-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - dataprotection.kubeblocks.io + resources: + - restores + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - dataprotection.kubeblocks.io + resources: + - restores/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/dataprotection_restore_viewer_role.yaml +# permissions for end users to view restores. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-restore-viewer-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - dataprotection.kubeblocks.io + resources: + - restores + verbs: + - get + - list + - watch +- apiGroups: + - dataprotection.kubeblocks.io + resources: + - restores/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/extensions_addon_editor_role.yaml +# permissions for end users to edit addons. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-editor-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - extensions.kubeblocks.io + resources: + - addons + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - extensions.kubeblocks.io + resources: + - addons/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/extensions_addon_viewer_role.yaml +# permissions for end users to view addons. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-viewer-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - extensions.kubeblocks.io + resources: + - addons + verbs: + - get + - list + - watch +- apiGroups: + - extensions.kubeblocks.io + resources: + - addons/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/opsrequest_editor_role.yaml +# permissions for end users to edit opsrequests. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-opsrequest-editor-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - apps.kubeblocks.io + resources: + - opsrequests + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - apps.kubeblocks.io + resources: + - opsrequests/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/opsrequest_viewer_role.yaml +# permissions for end users to view opsrequests. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-opsrequest-viewer-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - apps.kubeblocks.io + resources: + - opsrequests + verbs: + - get + - list + - watch +- apiGroups: + - apps.kubeblocks.io + resources: + - opsrequests/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/rbac_manager_role.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-rbac-manager-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - "" + resources: + - serviceaccounts + verbs: + - create + - delete + - get + - list + - patch + - update +- apiGroups: + - "" + resources: + - serviceaccounts/finalizers + verbs: + - update +- apiGroups: + - "" + resources: + - serviceaccounts/status + verbs: + - get + - patch + - update +- apiGroups: + - rbac.authorization.k8s.io + resources: + - rolebindings + verbs: + - create + - delete + - get + - list + - patch + - update +- apiGroups: + - rbac.authorization.k8s.io + resources: + - rolebindings/finalizers + verbs: + - update +- apiGroups: + - rbac.authorization.k8s.io + resources: + - rolebindings/status + verbs: + - get + - patch + - update +- apiGroups: + - rbac.authorization.k8s.io + resources: + - clusterrolebindings + verbs: + - create + - delete + - get + - list + - patch + - update +- apiGroups: + - rbac.authorization.k8s.io + resources: + - clusterrolebindings/finalizers + verbs: + - update +- apiGroups: + - rbac.authorization.k8s.io + resources: + - clusterrolebindings/status + verbs: + - get + - patch + - update +--- +# Source: kubeblocks/templates/rbac/workloads_replicatedstatemachine_editor_role.yaml +# permissions for end users to edit replicatedstatemachines. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/name: clusterrole + app.kubernetes.io/instance: replicatedstatemachine-editor-role + app.kubernetes.io/component: rbac + app.kubernetes.io/created-by: kubeblocks + app.kubernetes.io/part-of: kubeblocks + app.kubernetes.io/managed-by: kustomize + name: replicatedstatemachine-editor-role +rules: +- apiGroups: + - workloads.kubeblocks.io + resources: + - replicatedstatemachines + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - workloads.kubeblocks.io + resources: + - replicatedstatemachines/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/workloads_replicatedstatemachine_viewer_role.yaml +# permissions for end users to view replicatedstatemachines. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/name: clusterrole + app.kubernetes.io/instance: replicatedstatemachine-viewer-role + app.kubernetes.io/component: rbac + app.kubernetes.io/created-by: kubeblocks + app.kubernetes.io/part-of: kubeblocks + app.kubernetes.io/managed-by: kustomize + name: replicatedstatemachines-viewer-role +rules: +- apiGroups: + - workloads.kubeblocks.io + resources: + - replicatedstatemachines + verbs: + - get + - list + - watch +- apiGroups: + - workloads.kubeblocks.io + resources: + - replicatedstatemachines/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/auth_proxy_role_binding.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: kubeblocks-proxy-rolebinding + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: kubeblocks-proxy-role +subjects: +- kind: ServiceAccount + name: kubeblocks + namespace: acto-namespace +--- +# Source: kubeblocks/templates/rbac/clusterrole_binding.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: kubeblocks + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: kubeblocks +subjects: +- kind: ServiceAccount + name: kubeblocks + namespace: acto-namespace +--- +# Source: kubeblocks/templates/rbac/clusterrole_binding.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: kubeblocks-cluster-admin + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: cluster-admin +subjects: + - kind: ServiceAccount + name: kubeblocks-addon-installer + namespace: acto-namespace +--- +# Source: kubeblocks/templates/rbac/leader_election_role.yaml +# permissions to do leader election. +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: kubeblocks-leader-election-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - coordination.k8s.io + resources: + - leases + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - "" + resources: + - events + verbs: + - create + - patch +--- +# Source: kubeblocks/templates/rbac/leader_election_role_binding.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: kubeblocks-leader-election-rolebinding + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: kubeblocks-leader-election-role +subjects: +- kind: ServiceAccount + name: kubeblocks-controller-manager + namespace: acto-namespace +--- +# Source: kubeblocks/templates/service.yaml +apiVersion: v1 +kind: Service +metadata: + name: kubeblocks + labels: + control-plane: controller-manager + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +spec: + type: ClusterIP + ports: + - port: 9443 + targetPort: webhook-server + protocol: TCP + name: webhook-server + selector: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks +--- +# Source: kubeblocks/templates/dataprotection.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: kubeblocks-dataprotection + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/component: "dataprotection" +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + strategy: + rollingUpdate: + maxSurge: 1 + maxUnavailable: 40% + type: RollingUpdate + template: + metadata: + labels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + spec: + priorityClassName: + serviceAccountName: kubeblocks + securityContext: + runAsNonRoot: true + initContainers: # only download tools image to local + - name: tools + image: "infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-tools:0.8.1" + imagePullPolicy: IfNotPresent + resources: + {} + command: + - /bin/true + containers: + - name: dataprotection + args: + - "--health-probe-bind-address=:8081" + - "--metrics-bind-address=:8080" + - "--leader-elect" + - "--leader-elect-id=abd03fda" + - "--zap-devel=false" + - "--zap-time-encoding=iso8601" + - "--zap-encoder=console" + env: + - name: CM_NAMESPACE + value: acto-namespace + - name: CM_AFFINITY + value: "{\"nodeAffinity\":{\"preferredDuringSchedulingIgnoredDuringExecution\":[{\"preference\":{\"matchExpressions\":[{\"key\":\"kb-controller\",\"operator\":\"In\",\"values\":[\"true\"]}]},\"weight\":100}]}}" + - name: CM_TOLERATIONS + value: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + - name: KUBEBLOCKS_IMAGE_PULL_POLICY + value: IfNotPresent + - name: KUBEBLOCKS_TOOLS_IMAGE + value: "infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-tools:0.8.1" + - name: KUBEBLOCKS_SERVICEACCOUNT_NAME + value: kubeblocks + - name: DP_ENCRYPTION_KEY + valueFrom: + secretKeyRef: + name: kubeblocks-secret + key: dataProtectionEncryptionKey + - name: DATASAFED_IMAGE + value: "infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/datasafed:0.1.0" + - name: GC_FREQUENCY_SECONDS + value: "3600" + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + image: "infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-dataprotection:0.8.1" + imagePullPolicy: IfNotPresent + ports: + - name: webhook-server + containerPort: 9443 + protocol: TCP + - name: health + containerPort: 8081 + protocol: TCP + - name: metrics + containerPort: 8080 + protocol: TCP + livenessProbe: + httpGet: + path: /healthz + port: health + initialDelaySeconds: 15 + periodSeconds: 20 + readinessProbe: + httpGet: + path: /readyz + port: health + initialDelaySeconds: 5 + periodSeconds: 10 + resources: + {} + volumeMounts: + - mountPath: /etc/kubeblocks + name: manager-config + dnsPolicy: ClusterFirst + affinity: + nodeAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - preference: + matchExpressions: + - key: kb-controller + operator: In + values: + - "true" + weight: 100 + tolerations: + - effect: NoSchedule + key: kb-controller + operator: Equal + value: "true" + terminationGracePeriodSeconds: 10 + volumes: + - name: manager-config + configMap: + name: kubeblocks-manager-config +--- +# Source: kubeblocks/templates/deployment.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: kubeblocks + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/component: "apps" +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + strategy: + rollingUpdate: + maxSurge: 1 + maxUnavailable: 40% + type: RollingUpdate + template: + metadata: + labels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + spec: + priorityClassName: + serviceAccountName: kubeblocks + securityContext: + runAsNonRoot: true + initContainers: # only download tools image to local + - name: tools + image: "infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-tools:0.8.1" + imagePullPolicy: IfNotPresent + resources: + {} + command: + - /bin/true + - name: datascript + image: "infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-datascript:0.8.1" + imagePullPolicy: IfNotPresent + resources: + {} + command: + - /bin/true + containers: + - name: manager + args: + - "--health-probe-bind-address=:8081" + - "--metrics-bind-address=:8080" + - "--leader-elect" + - "--zap-devel=false" + - "--zap-time-encoding=iso8601" + - "--zap-encoder=console" + - "--extensions=true" + - "--apps=true" + - "--workloads=true" + env: + - name: CM_NAMESPACE + value: acto-namespace + - name: CM_AFFINITY + value: "{\"nodeAffinity\":{\"preferredDuringSchedulingIgnoredDuringExecution\":[{\"preference\":{\"matchExpressions\":[{\"key\":\"kb-controller\",\"operator\":\"In\",\"values\":[\"true\"]}]},\"weight\":100}]}}" + - name: CM_TOLERATIONS + value: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + - name: KUBEBLOCKS_IMAGE_PULL_POLICY + value: IfNotPresent + - name: KUBEBLOCKS_TOOLS_IMAGE + value: "infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-tools:0.8.1" + - name: KUBEBLOCKS_DATASCRIPT_CLIENTS_IMAGE + value: "infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-datascript:0.8.1" + - name: KUBEBLOCKS_SERVICEACCOUNT_NAME + value: kubeblocks + - name: ENABLE_RBAC_MANAGER + value: "true" + - name: ADDON_JOB_TTL + value: + - name: ADDON_JOB_IMAGE_PULL_POLICY + value: IfNotPresent + - name: KUBEBLOCKS_ADDON_SA_NAME + value: kubeblocks-addon-installer + - name: KUBEBLOCKS_ADDON_HELM_INSTALL_OPTIONS + value: --atomic --cleanup-on-fail --wait --insecure-skip-tls-verify + - name: DP_ENCRYPTION_KEY + valueFrom: + secretKeyRef: + name: kubeblocks-secret + key: dataProtectionEncryptionKey + - name: KUBE_PROVIDER + value: "" + - name: HOST_PORT_INCLUDE_RANGES + value: '1025-65536' + - name: HOST_PORT_EXCLUDE_RANGES + value: '6443,10250,10257,10259,2379-2380,30000-32767' + - name: HOST_PORT_CM_NAME + value: kubeblocks-host-ports + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + image: "infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks:0.8.1" + imagePullPolicy: IfNotPresent + ports: + - name: webhook-server + containerPort: 9443 + protocol: TCP + - name: health + containerPort: 8081 + protocol: TCP + - name: metrics + containerPort: 8080 + protocol: TCP + livenessProbe: + httpGet: + path: /healthz + port: health + initialDelaySeconds: 15 + periodSeconds: 20 + readinessProbe: + httpGet: + path: /readyz + port: health + initialDelaySeconds: 5 + periodSeconds: 10 + resources: + {} + volumeMounts: + - mountPath: /etc/kubeblocks + name: manager-config + dnsPolicy: ClusterFirst + affinity: + nodeAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - preference: + matchExpressions: + - key: kb-controller + operator: In + values: + - "true" + weight: 100 + tolerations: + - effect: NoSchedule + key: kb-controller + operator: Equal + value: "true" + terminationGracePeriodSeconds: 10 + volumes: + - name: manager-config + configMap: + name: kubeblocks-manager-config +--- +# Source: kubeblocks/templates/addons/apecloud-mysql-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: apecloud-mysql + labels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + addon.kubeblocks.io/version: 0.8.0-beta.5 + addon.kubeblocks.io/name: apecloud-mysql + addon.kubeblocks.io/provider: apecloud + addon.kubeblocks.io/model: RDBMS + annotations: + addon.kubeblocks.io/kubeblocks-version: '>=0.7.0' +spec: + description: 'ApeCloud MySQL is a database that is compatible with MySQL syntax and achieves high availability through the utilization of the RAFT consensus protocol.' + type: Helm + helm: + chartLocationURL: file:///apecloud-mysql-0.8.0-beta.5.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + installOptions: + defaultInstallValues: + - enabled: true + installable: + autoInstall: true +--- +# Source: kubeblocks/templates/addons/clickhouse-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: clickhouse + labels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + addon.kubeblocks.io/version: 0.7.1 + addon.kubeblocks.io/name: clickhouse + addon.kubeblocks.io/provider: community + addon.kubeblocks.io/model: RDBMS + annotations: + addon.kubeblocks.io/kubeblocks-version: '>=0.7.0' +spec: + description: 'ClickHouse is an open-source column-oriented OLAP database management system. Use it to boost your database performance while providing linear scalability and hardware efficiency.' + type: Helm + helm: + chartLocationURL: file:///clickhouse-0.7.1.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + installOptions: + defaultInstallValues: + - enabled: true + installable: + autoInstall: true +--- +# Source: kubeblocks/templates/addons/elasticsearch-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: elasticsearch + labels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + addon.kubeblocks.io/version: 0.7.0 + addon.kubeblocks.io/name: elasticsearch + addon.kubeblocks.io/provider: community + addon.kubeblocks.io/model: search-engine + annotations: + addon.kubeblocks.io/kubeblocks-version: '>=0.7.0' +spec: + description: 'Elasticsearch is a distributed search and analytics engine. It is used for web search, log monitoring, and real-time analytics. Ideal for Big Data applications.' + type: Helm + helm: + chartLocationURL: file:///elasticsearch-0.7.0.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + installOptions: + defaultInstallValues: + - enabled: true + installable: + autoInstall: false +--- +# Source: kubeblocks/templates/addons/foxlake-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: foxlake + labels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + addon.kubeblocks.io/version: 0.7.0 + addon.kubeblocks.io/name: foxlake + addon.kubeblocks.io/provider: apecloud + addon.kubeblocks.io/model: RDBMS + annotations: + addon.kubeblocks.io/kubeblocks-version: '>=0.7.0' +spec: + description: 'ApeCloud FoxLake is an open-source cloud-native data warehouse.' + type: Helm + helm: + chartLocationURL: file:///foxlake-0.7.0.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + installOptions: + defaultInstallValues: + - enabled: true + installable: + autoInstall: false +--- +# Source: kubeblocks/templates/addons/kafka-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: kafka + labels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + addon.kubeblocks.io/version: 0.8.0-alpha.5 + addon.kubeblocks.io/name: kafka + addon.kubeblocks.io/provider: community + addon.kubeblocks.io/model: streaming + annotations: + addon.kubeblocks.io/kubeblocks-version: '>=0.7.0' +spec: + description: 'Apache Kafka is a distributed streaming platform designed to build real-time pipelines and can be used as a message broker or as a replacement for a log aggregation solution for big data applications.' + type: Helm + helm: + chartLocationURL: file:///kafka-0.8.0-alpha.5.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + installOptions: + defaultInstallValues: + - enabled: true + installable: + autoInstall: true +--- +# Source: kubeblocks/templates/addons/llm-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: llm + labels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + addon.kubeblocks.io/version: 0.7.0 + addon.kubeblocks.io/name: llm + addon.kubeblocks.io/provider: community + addon.kubeblocks.io/model: LLM + annotations: + addon.kubeblocks.io/kubeblocks-version: '>=0.7.0' +spec: + description: 'Large Language Models.' + type: Helm + helm: + chartLocationURL: file:///llm-0.7.0.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + installOptions: + defaultInstallValues: + - enabled: true + installable: + autoInstall: false +--- +# Source: kubeblocks/templates/addons/milvus-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: milvus + labels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + addon.kubeblocks.io/version: 2.3.2 + addon.kubeblocks.io/name: milvus + addon.kubeblocks.io/provider: community + addon.kubeblocks.io/model: vector + annotations: + addon.kubeblocks.io/kubeblocks-version: '>=0.7.0' +spec: + description: 'Milvus is an open source (Apache-2.0 licensed) vector database built to power embedding similarity search and AI applications.' + type: Helm + helm: + chartLocationURL: file:///milvus-2.3.2.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + installOptions: + defaultInstallValues: + - enabled: true + installable: + autoInstall: false +--- +# Source: kubeblocks/templates/addons/mongodb-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: mongodb + labels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + addon.kubeblocks.io/version: 0.7.0 + addon.kubeblocks.io/name: mongodb + addon.kubeblocks.io/provider: apecloud + addon.kubeblocks.io/model: document + annotations: + addon.kubeblocks.io/kubeblocks-version: '>=0.7.0' +spec: + description: 'MongoDB is a document database designed for ease of application development and scaling.' + type: Helm + helm: + chartLocationURL: file:///mongodb-0.7.0.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + installOptions: + defaultInstallValues: + - enabled: true + installable: + autoInstall: true +--- +# Source: kubeblocks/templates/addons/mysql-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: mysql + labels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + addon.kubeblocks.io/version: 0.7.0 + addon.kubeblocks.io/name: mysql + addon.kubeblocks.io/provider: community + addon.kubeblocks.io/model: RDBMS + annotations: + addon.kubeblocks.io/kubeblocks-version: '>=0.7.0' +spec: + description: 'MySQL is a widely used, open-source relational database management system (RDBMS).' + type: Helm + helm: + chartLocationURL: file:///mysql-0.7.0.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + installOptions: + defaultInstallValues: + - enabled: true + installable: + autoInstall: false +--- +# Source: kubeblocks/templates/addons/oceanbase-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: oceanbase + labels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + addon.kubeblocks.io/version: 0.8.1 + addon.kubeblocks.io/name: oceanbase + addon.kubeblocks.io/provider: community + addon.kubeblocks.io/model: RDBMS + annotations: + addon.kubeblocks.io/kubeblocks-version: '>=0.8.0' +spec: + description: 'OceanBase Database is an enterprise-level native distributed database independently developed by Ant Group.' + type: Helm + helm: + chartLocationURL: file:///oceanbase-0.8.1.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + installOptions: + defaultInstallValues: + - enabled: true + installable: + autoInstall: false +--- +# Source: kubeblocks/templates/addons/opensearch-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: opensearch + labels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + addon.kubeblocks.io/version: 0.7.0 + addon.kubeblocks.io/name: opensearch + addon.kubeblocks.io/provider: community + addon.kubeblocks.io/model: search-engine + annotations: + addon.kubeblocks.io/kubeblocks-version: '>=0.7.0' +spec: + description: 'OpenSearch is a scalable, flexible, and extensible open-source software suite for search, analytics, and observability applications licensed under Apache 2.0.' + type: Helm + helm: + chartLocationURL: file:///opensearch-0.7.0.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + installOptions: + defaultInstallValues: + - enabled: true + installable: + autoInstall: false +--- +# Source: kubeblocks/templates/addons/polardbx-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: polardbx + labels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + addon.kubeblocks.io/version: 0.7.0 + addon.kubeblocks.io/name: polardbx + addon.kubeblocks.io/provider: community + addon.kubeblocks.io/model: RDBMS + annotations: + addon.kubeblocks.io/kubeblocks-version: '>=0.7.0' +spec: + description: 'PolarDB-X is a cloud native distributed SQL Database designed for high concurrency, massive storage, complex querying scenarios.' + type: Helm + helm: + chartLocationURL: file:///polardbx-0.7.0.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + installOptions: + defaultInstallValues: + - enabled: true + installable: + autoInstall: false +--- +# Source: kubeblocks/templates/addons/postgresql-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: postgresql + labels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + addon.kubeblocks.io/version: 0.8.0 + addon.kubeblocks.io/name: postgresql + addon.kubeblocks.io/provider: community + addon.kubeblocks.io/model: RDBMS + annotations: + addon.kubeblocks.io/kubeblocks-version: '>=0.7.0' +spec: + description: 'PostgreSQL (Postgres) is an open source object-relational database known for reliability and data integrity. ACID-compliant, it supports foreign keys, joins, views, triggers and stored procedures.' + type: Helm + helm: + chartLocationURL: file:///postgresql-0.8.0.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + installOptions: + defaultInstallValues: + - enabled: true + installable: + autoInstall: true +--- +# Source: kubeblocks/templates/addons/pulsar-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: pulsar + labels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + addon.kubeblocks.io/version: 0.7.0 + addon.kubeblocks.io/name: pulsar + addon.kubeblocks.io/provider: community + addon.kubeblocks.io/model: streaming + annotations: + addon.kubeblocks.io/kubeblocks-version: '>=0.7.0' +spec: + description: 'Apache® Pulsar™ is an open-source, distributed messaging and streaming platform built for the cloud.' + type: Helm + helm: + chartLocationURL: file:///pulsar-0.7.0.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + installOptions: + defaultInstallValues: + - enabled: true + installable: + autoInstall: true +--- +# Source: kubeblocks/templates/addons/qdrant-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: qdrant + labels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + addon.kubeblocks.io/version: 0.7.0 + addon.kubeblocks.io/name: qdrant + addon.kubeblocks.io/provider: community + addon.kubeblocks.io/model: vector + annotations: + addon.kubeblocks.io/kubeblocks-version: '>=0.7.0' +spec: + description: 'Qdrant is an open source (Apache-2.0 licensed), vector similarity search engine and vector database.' + type: Helm + helm: + chartLocationURL: file:///qdrant-0.7.0.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + installOptions: + defaultInstallValues: + - enabled: true + installable: + autoInstall: false +--- +# Source: kubeblocks/templates/addons/redis-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: redis + labels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + addon.kubeblocks.io/version: 0.8.1 + addon.kubeblocks.io/name: redis + addon.kubeblocks.io/provider: community + addon.kubeblocks.io/model: key-value + annotations: + addon.kubeblocks.io/kubeblocks-version: '>=0.8.0' +spec: + description: 'Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache and message broker.' + type: Helm + helm: + chartLocationURL: file:///redis-0.8.1.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + installOptions: + defaultInstallValues: + - enabled: true + installable: + autoInstall: true +--- +# Source: kubeblocks/templates/addons/weaviate-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: weaviate + labels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + addon.kubeblocks.io/version: 0.8.0 + addon.kubeblocks.io/name: weaviate + addon.kubeblocks.io/provider: community + addon.kubeblocks.io/model: vector + annotations: + addon.kubeblocks.io/kubeblocks-version: '>=0.7.0' +spec: + description: 'Weaviate is an open-source (BSD-3.0 licensed) vector database. It allows you to store data objects and vector embeddings from your favorite ML-models, and scale seamlessly into billions of data objects.' + type: Helm + helm: + chartLocationURL: file:///weaviate-0.8.0.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + installOptions: + defaultInstallValues: + - enabled: true + installable: + autoInstall: false +--- +# Source: kubeblocks/templates/addons/xinference-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: xinference + labels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + addon.kubeblocks.io/version: 0.1.0 + addon.kubeblocks.io/name: xinference + addon.kubeblocks.io/provider: community + addon.kubeblocks.io/model: LLM + annotations: + addon.kubeblocks.io/kubeblocks-version: '>=0.7.0' +spec: + description: 'Xorbits Inference(Xinference) is a powerful and versatile library designed to serve language, speech recognition, and multimodal models.' + type: Helm + helm: + chartLocationURL: file:///xinference-0.1.0.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + installOptions: + defaultInstallValues: + - enabled: true + installable: + autoInstall: false +--- +# Source: kubeblocks/templates/applications/alertmanager-webhook-adaptor-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: alertmanager-webhook-adaptor + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + "addon.kubeblocks.io/provider": apecloud + "addon.kubeblocks.io/version": "0.1.4" +spec: + description: 'alertmanager webhook adaptor for extending alertmanager notification channels' + type: Helm + + helm: + chartLocationURL: file:///alertmanager-webhook-adaptor-0.1.4.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + + installOptions: + + installValues: + configMapRefs: + - name: alertmanager-webhook-adaptor-chart-kubeblocks-values + key: values-kubeblocks-override.yaml + + valuesMapping: + valueMap: + replicaCount: replicaCount + + jsonMap: + tolerations: tolerations + + resources: + cpu: + requests: resources.requests.cpu + limits: resources.limits.cpu + memory: + requests: resources.requests.memory + limits: resources.limits.memory + + defaultInstallValues: + - replicas: 1 + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + + installable: + autoInstall: false +--- +# Source: kubeblocks/templates/applications/apecloud-otel-collector-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: apecloud-otel-collector + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + "addon.kubeblocks.io/provider": apecloud + "addon.kubeblocks.io/version": "0.1.2-beta.3" +spec: + description: apecloud-otel-collector is a high-performance data collection agent with luxuriant function, which inspired by OpenTelemetry. + type: Helm + + helm: + chartLocationURL: file:///apecloud-otel-collector-0.1.2-beta.3.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + + installOptions: + + installValues: + configMapRefs: + - name: apecloud-otel-collector-chart-kubeblocks-values + key: values-kubeblocks-override.yaml + + valuesMapping: + valueMap: + + jsonMap: + tolerations: tolerations + + resources: + cpu: + requests: resources.requests.cpu + limits: resources.limits.cpu + memory: + requests: resources.requests.memory + limits: resources.limits.memory + + defaultInstallValues: + - enabled: true + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"},{\"effect\":\"NoSchedule\",\"key\":\"kb-data\",\"operator\":\"Equal\",\"value\":\"true\"}]" + + installable: + autoInstall: false +--- +# Source: kubeblocks/templates/applications/aws-loadbalancer-controller-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: aws-load-balancer-controller + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + "addon.kubeblocks.io/provider": community + "addon.kubeblocks.io/version": "1.4.8" +spec: + description: The AWS Load Balancer Controller manages AWS Elastic Load Balancers for a Kubernetes cluster. + type: Helm + + helm: + chartLocationURL: file:///aws-load-balancer-controller-1.4.8.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + + installOptions: + + installValues: + configMapRefs: + - name: aws-load-balancer-controller-chart-kubeblocks-values + key: values-kubeblocks-override.yaml + + setValues: + - clusterName= + + valuesMapping: + valueMap: + replicaCount: replicaCount + + jsonMap: + tolerations: tolerations + + resources: + cpu: + requests: resources.requests.cpu + limits: resources.limits.cpu + memory: + requests: resources.requests.memory + limits: resources.limits.memory + + defaultInstallValues: + - replicas: 1 + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + + installable: + autoInstall: false + selectors: + - key: KubeGitVersion + operator: Contains + values: + - eks +--- +# Source: kubeblocks/templates/applications/bytebase-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: bytebase + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + "addon.kubeblocks.io/provider": community + "addon.kubeblocks.io/version": "0.7.0" +spec: + description: 'Bytebase is Database DevOps and CI/CD for Developer, DBA and Platform Engineering team.' + type: Helm + + helm: + chartLocationURL: file:///bytebase-0.7.0.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + installOptions: + + installable: + autoInstall: false + + defaultInstallValues: + - enabled: true +--- +# Source: kubeblocks/templates/applications/chaos-mesh-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: fault-chaos-mesh + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + "addon.kubeblocks.io/provider": apecloud + "addon.kubeblocks.io/version": "2.5.2" +spec: + description: 'Chaos Mesh is an open-source chaos engineering tool that facilitates testing the resiliency and reliability of distributed systems by introducing various failure scenarios in a controlled manner.' + + type: Helm + + helm: + chartLocationURL: file:///chaos-mesh-2.5.2.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + + installOptions: + + installValues: + setValues: + - "version=2.5.2" + - "chaosDaemon.privileged=true" + - "dnsServer.create=true" + - "chaosDaemon.runtime=containerd" + - "chaosDaemon.socketPath=/run/containerd/containerd.sock" + - "images.registry=infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com" + - "controllerManager.image.repository=apecloud/chaos-mesh" + - "chaosDaemon.image.repository=apecloud/chaos-daemon" + - "dashboard.image.repository=apecloud/chaos-dashboard" + + valuesMapping: + valueMap: + replicaCount: controllerManager.replicaCount + jsonMap: + tolerations: controllerManager.tolerations + resources: + cpu: + requests: controllerManager.resources.requests.cpu + memory: + requests: controllerManager.resources.requests.memory + + extras: + - name: chaosDaemon + jsonMap: + tolerations: chaosDaemon.tolerations + + - name: dashboard + valueMap: + replicaCount: dashboard.replicaCount + jsonMap: + tolerations: dashboard.tolerations + resources: + cpu: + requests: dashboard.resources.requests.cpu + memory: + requests: dashboard.resources.requests.memory + + - name: dnsServer + jsonMap: + tolerations: dnsServer.tolerations + resources: + cpu: + requests: dnsServer.resources.requests.cpu + memory: + requests: dnsServer.resources.requests.memory + + installable: + autoInstall: false + + defaultInstallValues: + - enabled: false + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + extras: + - name: chaosDaemon + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + - name: dashboard + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + - name: dnsServer + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" +--- +# Source: kubeblocks/templates/applications/csi-driver-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: kubeblocks-csi-driver + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + "addon.kubeblocks.io/provider": community + "addon.kubeblocks.io/version": "0.1.4" +spec: + description: 'KubeBlocks CSI driver provides a container storage interface used by Container Orchestrators + to manage the lifecycle of block storage for cloud vendors.' + type: Helm + + helm: + chartLocationURL: file:///kubeblocks-csi-driver-0.1.4.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + + installOptions: + + valuesMapping: + valueMap: + replicaCount: controller.replicaCount + jsonMap: + tolerations: controller.tolerations + + resources: + cpu: + requests: controller.resources.requests.cpu + limits: controller.resources.limits.cpu + memory: + requests: controller.resources.requests.memory + limits: controller.resources.limits.memory + extras: + - name: node + jsonMap: + tolerations: node.tolerations + + resources: + cpu: + requests: node.resources.requests.cpu + limits: node.resources.limits.cpu + memory: + requests: node.resources.requests.memory + limits: node.resources.limits.memory + + defaultInstallValues: + - enabled: false + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + extras: + - name: node + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + + + installable: + autoInstall: false + selectors: + - key: KubeGitVersion + operator: Contains + values: + - eks +--- +# Source: kubeblocks/templates/applications/csi-driver-nfs-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: csi-driver-nfs + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + "addon.kubeblocks.io/provider": community + "addon.kubeblocks.io/version": "4.5.0" +spec: + description: Container Storage Interface (CSI) driver for NFS based volumes + type: Helm + + helm: + chartLocationURL: file:///csi-driver-nfs-4.5.0.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + + installOptions: + + installValues: + + valuesMapping: + valueMap: + replicaCount: controller.replicas + jsonMap: + tolerations: controller.tolerations + + defaultInstallValues: + - enabled: true + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + + installable: + autoInstall: false +--- +# Source: kubeblocks/templates/applications/csi-hostpath-driver-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: csi-hostpath-driver + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + "addon.kubeblocks.io/provider": community + "addon.kubeblocks.io/version": "0.7.0" +spec: + description: Container Storage Interface (CSI) driver for HostPath volumes + type: Helm + + helm: + chartLocationURL: file:///csi-hostpath-driver-0.7.0.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + + installOptions: + + installValues: + configMapRefs: + - name: csi-hostpath-driver-chart-kubeblocks-values + key: values-kubeblocks-override.yaml + + valuesMapping: + jsonMap: + tolerations: tolerations + + defaultInstallValues: + - enabled: true + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + + installable: + autoInstall: false + selectors: + - key: KubeGitVersion + operator: DoesNotContain + values: + - eks + - aliyun. + - gke + - tke + - aks +--- +# Source: kubeblocks/templates/applications/csi-s3-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: csi-s3 + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + "addon.kubeblocks.io/provider": community + "addon.kubeblocks.io/version": "0.7.0" +spec: + description: Container Storage Interface (CSI) driver for S3 volumes + type: Helm + + helm: + chartLocationURL: file:///csi-s3-0.7.0.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + + installOptions: + + installValues: + secretRefs: + - name: kubeblocks-cloud-provider + key: csi-s3 + + valuesMapping: + jsonMap: + tolerations: tolerations + extras: + - name: daemonset + jsonMap: + tolerations: daemonsetTolerations + + defaultInstallValues: + - enabled: true + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + + installable: + autoInstall: false +--- +# Source: kubeblocks/templates/applications/external-dns-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: external-dns + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + "addon.kubeblocks.io/provider": community + "addon.kubeblocks.io/version": "6.20.4" +spec: + description: >- + ExternalDNS synchronizes exposed Kubernetes Services and Ingresses with DNS providers. + + type: Helm + + helm: + chartLocationURL: file:///external-dns-6.20.4.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + + installOptions: + + installValues: + configMapRefs: + - name: external-dns-chart-kubeblocks-values + key: values-kubeblocks-override.yaml + + valuesMapping: + valueMap: + replicaCount: replicaCount + + jsonMap: + tolerations: tolerations + + resources: + cpu: + requests: resources.requests.cpu + limits: resources.limits.cpu + memory: + requests: resources.requests.memory + limits: resources.limits.memory + + defaultInstallValues: + - replicas: 1 + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + + installable: + autoInstall: false +--- +# Source: kubeblocks/templates/applications/grafana-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: grafana + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + "addon.kubeblocks.io/provider": community + "addon.kubeblocks.io/version": "6.43.5" +spec: + description: The leading tool for querying and visualizing time series and metrics. + type: Helm + + helm: + chartLocationURL: file:///grafana-6.43.5.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + + installOptions: + + installValues: + configMapRefs: + - name: grafana-chart-kubeblocks-values + key: values-kubeblocks-override.yaml + + valuesMapping: + valueMap: + replicaCount: replicas + storageClass: persistence.storageClassName + persistentVolumeEnabled: persistence.enabled + + jsonMap: + tolerations: tolerations + + resources: + storage: persistence.size + cpu: + requests: resources.requests.cpu + limits: resources.limits.cpu + memory: + requests: resources.requests.memory + limits: resources.limits.memory + + defaultInstallValues: + - replicas: 1 + storageClass: + resources: + requests: + storage: 1Gi + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + + - selectors: + - key: KubeGitVersion + operator: Contains + values: + - aliyun + replicas: 1 + resources: + requests: + storage: 20Gi + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + + installable: + autoInstall: false +--- +# Source: kubeblocks/templates/applications/jupyter-notebook-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: jupyter-notebook + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + "addon.kubeblocks.io/provider": community + "addon.kubeblocks.io/version": "0.7.0" +spec: + description: 'Jupyter Notebook: Interactive coding, documentation, and visualization tool with multi-language support for data analysis and education.' + type: Helm + + helm: + chartLocationURL: file:///jupyter-notebook-0.7.0.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + + installOptions: + + installable: + autoInstall: false + + defaultInstallValues: + - enabled: true +--- +# Source: kubeblocks/templates/applications/jupyterhub-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: jupyter-hub + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + "addon.kubeblocks.io/provider": community + "addon.kubeblocks.io/version": "0.1.0" +spec: + description: 'JupyterHub is a multi-user platform for hosting Jupyter Notebooks.' + type: Helm + + helm: + chartLocationURL: file:///jupyterhub-0.1.0.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + + installOptions: + + installable: + autoInstall: false + + defaultInstallValues: + - enabled: true +--- +# Source: kubeblocks/templates/applications/kubebench-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: kubebench + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + "addon.kubeblocks.io/provider": apecloud + "addon.kubeblocks.io/version": "0.0.1" +spec: + description: 'A Kubernetes operator for running benchmark tests on databases to evaluate their performance.' + + type: Helm + + helm: + chartLocationURL: file:///kubebench-0.0.1.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + + installOptions: + + valuesMapping: + valueMap: + replicaCount: replicaCount + + jsonMap: + tolerations: tolerations + + resources: + cpu: + requests: resources.requests.cpu + limits: resources.limits.cpu + memory: + requests: resources.requests.memory + limits: resources.limits.memory + + installable: + autoInstall: false + + defaultInstallValues: + - enabled: true + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" +--- +# Source: kubeblocks/templates/applications/loki-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: loki + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + "addon.kubeblocks.io/provider": community + "addon.kubeblocks.io/version": "5.8.9" +spec: + description: Grafana Loki is a horizontally scalable, highly available, and multi-tenant log aggregation system, which inspired by Prometheus. + type: Helm + + helm: + chartLocationURL: file:///loki-5.8.9.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + + installOptions: + + installValues: + configMapRefs: + - name: loki-chart-kubeblocks-values + key: values-kubeblocks-override.yaml + + valuesMapping: + valueMap: + replicaCount: singleBinary.replicas + storageClass: singleBinary.persistence.storageClass + persistentVolumeEnabled: singleBinary.persistence.enabled + + jsonMap: + tolerations: global.tolerations + + resources: + storage: singleBinary.persistence.size + + defaultInstallValues: + - replicas: 1 + storageClass: + resources: + requests: + storage: 8Gi + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + # for ACK, the smallest storage size is 20Gi, the format of GitVersion is v1.24.6-aliyun.1 + - selectors: + - key: KubeGitVersion + operator: Contains + values: + - aliyun + replicas: 1 + resources: + requests: + storage: 20Gi + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + # for TKE, the smallest storage size is 10Gi, the format of GitVersion is v1.24.4-tke.5 + - selectors: + - key: KubeGitVersion + operator: Contains + values: + - tke + replicas: 1 + resources: + requests: + storage: 10Gi + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + + installable: + autoInstall: false +--- +# Source: kubeblocks/templates/applications/migration-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: migration + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + "addon.kubeblocks.io/provider": apecloud + "addon.kubeblocks.io/version": "0.1.1" +spec: + description: 'Migration is a tool for migrating data between two databases.' + + type: Helm + + helm: + chartLocationURL: file:///dt-platform-0.1.1.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + + installOptions: + + valuesMapping: + valueMap: + replicaCount: replicaCount + + jsonMap: + tolerations: tolerations + + resources: + cpu: + requests: resources.requests.cpu + limits: resources.limits.cpu + memory: + requests: resources.requests.memory + limits: resources.limits.memory + + installable: + autoInstall: false + + defaultInstallValues: + - enabled: true + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" +--- +# Source: kubeblocks/templates/applications/minio.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: minio + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + "addon.kubeblocks.io/provider": community + "addon.kubeblocks.io/version": "12.8.12" +spec: + description: 'MinIO(R) is an object storage server, compatible with Amazon S3 cloud storage service, mainly used for storing unstructured data (such as photos, videos, log files, etc.).' + type: Helm + + helm: + chartLocationURL: file:///minio-12.8.12.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + + installOptions: + + installValues: + setValues: + - auth.rootUser=kubeblocks + - auth.rootPassword=kubeblocks + - extraEnvVars[0].name=MINIO_BROWSER_LOGIN_ANIMATION + - extraEnvVars[0].value=off + installable: + autoInstall: false + + defaultInstallValues: + - enabled: true +--- +# Source: kubeblocks/templates/applications/nvidia-gpu-exporter-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: nvidia-gpu-exporter + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + "addon.kubeblocks.io/provider": community + "addon.kubeblocks.io/version": "0.3.1" +spec: + description: 'Nvidia GPU exporter for prometheus using nvidia-smi binary' + type: Helm + + helm: + chartLocationURL: file:///nvidia-gpu-exporter-0.3.1.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + + installOptions: + + installable: + autoInstall: false + selectors: + - key: KubeGitVersion + operator: Contains + values: + - eks + + defaultInstallValues: + - enabled: true +--- +# Source: kubeblocks/templates/applications/nyancat-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: nyancat + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + "addon.kubeblocks.io/provider": apecloud + "addon.kubeblocks.io/version": "0.7.0" +spec: + description: 'Deploys a nyancat application in a cluster. + Nyancat is a demo application for showing database cluster availability.' + type: Helm + + helm: + chartLocationURL: file:///nyancat-0.7.0.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + + installOptions: + + valuesMapping: + valueMap: + replicaCount: replicaCount + + jsonMap: + tolerations: tolerations + + resources: + cpu: + requests: resources.requests.cpu + limits: resources.limits.cpu + memory: + requests: resources.requests.memory + limits: resources.limits.memory + + defaultInstallValues: + - replicas: 1 + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + + installable: + autoInstall: false +--- +# Source: kubeblocks/templates/applications/prometheus-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: prometheus + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + "addon.kubeblocks.io/provider": community + "addon.kubeblocks.io/version": "15.16.1" +spec: + description: Prometheus is a monitoring system and time series database. + type: Helm + + helm: + chartLocationURL: file:///prometheus-15.16.1.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + + installOptions: + + installValues: + configMapRefs: + - name: prometheus-chart-kubeblocks-values + key: values-kubeblocks-override.yaml + + valuesMapping: + valueMap: + replicaCount: server.replicaCount + storageClass: server.persistentVolume.storageClass + persistentVolumeEnabled: server.persistentVolume.enabled + + jsonMap: + tolerations: server.tolerations + + resources: + storage: server.persistentVolume.size + cpu: + requests: server.resources.requests.cpu + limits: server.resources.limits.cpu + memory: + requests: server.resources.requests.memory + limits: server.resources.limits.memory + extras: + - name: alertmanager + valueMap: + replicaCount: alertmanager.replicaCount + storageClass: alertmanager.persistentVolume.storageClass + persistentVolumeEnabled: alertmanager.persistentVolume.enabled + + jsonMap: + tolerations: alertmanager.tolerations + + resources: + storage: alertmanager.persistentVolume.size + cpu: + requests: alertmanager.resources.requests.cpu + limits: alertmanager.resources.limits.cpu + memory: + requests: alertmanager.resources.requests.memory + limits: alertmanager.resources.limits.memory + + defaultInstallValues: + - replicas: 1 + resources: + requests: + storage: 20Gi + memory: 512Mi + limits: + memory: 4Gi + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + + extras: + - name: alertmanager + replicas: 1 + resources: + requests: + storage: 4Gi + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + + # for ACK, the smallest storage size is 20Gi, the format of GitVersion is v1.24.6-aliyun.1 + - selectors: + - key: KubeGitVersion + operator: Contains + values: + - aliyun + replicas: 1 + resources: + requests: + storage: 20Gi + memory: 512Mi + limits: + memory: 4Gi + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + + extras: + - name: alertmanager + replicas: 1 + resources: + requests: + storage: 20Gi + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + + # for TKE, the smallest storage size is 10Gi, the format of GitVersion is v1.24.4-tke.5 + - selectors: + - key: KubeGitVersion + operator: Contains + values: + - tke + replicas: 1 + resources: + requests: + storage: 20Gi + memory: 512Mi + limits: + memory: 4Gi + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + + extras: + - name: alertmanager + replicas: 1 + resources: + requests: + storage: 10Gi + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + + installable: + autoInstall: false +--- +# Source: kubeblocks/templates/applications/pyroscope-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: pyroscope-server + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + "addon.kubeblocks.io/provider": community + "addon.kubeblocks.io/version": "0.2.92" +spec: + description: Open Source Continuous Profiling Server. + type: Helm + + helm: + chartLocationURL: file:///pyroscope-0.2.92.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + + installOptions: + + valuesMapping: + valueMap: + + jsonMap: + tolerations: tolerations + + resources: + cpu: + requests: resources.requests.cpu + limits: resources.limits.cpu + memory: + requests: resources.requests.memory + limits: resources.limits.memory + + defaultInstallValues: + - enabled: true + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + + installable: + autoInstall: false +--- +# Source: kubeblocks/templates/applications/snapshot-controller-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: snapshot-controller + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + "addon.kubeblocks.io/provider": community + "addon.kubeblocks.io/version": "1.7.2" +spec: + description: 'Deploys a Snapshot Controller in a cluster. Snapshot Controllers are + often bundled with the Kubernetes distribution, this chart is meant for cases where + it is not. ' + type: Helm + + helm: + chartLocationURL: file:///snapshot-controller-1.7.2.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + + installOptions: + + installValues: + configMapRefs: + - name: snapshot-controller-chart-kubeblocks-values + key: values-kubeblocks-override.yaml + + valuesMapping: + valueMap: + replicaCount: replicaCount + storageClass: volumeSnapshotClasses[0].driver + + jsonMap: + tolerations: tolerations + + resources: + cpu: + requests: resources.requests.cpu + limits: resources.limits.cpu + memory: + requests: resources.requests.memory + limits: resources.limits.memory + + defaultInstallValues: + - enabled: true + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + + - selectors: + - key: KubeGitVersion + operator: Contains + values: + - eks + storageClass: ebs.csi.aws.com + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + + - selectors: + - key: KubeGitVersion + operator: Contains + values: + - gke + storageClass: pd.csi.storage.gke.io + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + + - selectors: + - key: KubeGitVersion + operator: Contains + values: + - aks + storageClass: disk.csi.azure.com + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + + installable: + autoInstall: true + selectors: + - key: KubeGitVersion + operator: DoesNotContain + values: + - tke + - aliyun. + - key: KubeProvider + operator: DoesNotContain + values: + - huaweiCloud + - azure +--- +# Source: kubeblocks/templates/applications/vmagent-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: victoria-metrics-agent + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + "addon.kubeblocks.io/provider": community + "addon.kubeblocks.io/version": "0.8.41" +spec: + description: 'vmagent is a tiny agent which helps you collect metrics from various sources, relabel and filter the collected metrics and store them in VictoriaMetrics or any other storage systems via Prometheus remote_write protocol.' + type: Helm + + helm: + chartLocationURL: file:///victoria-metrics-agent-0.8.41.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + + installOptions: + + valuesMapping: + valueMap: + replicaCount: replicaCount + + jsonMap: + tolerations: tolerations + + resources: + cpu: + requests: resources.requests.cpu + limits: resources.limits.cpu + memory: + requests: resources.requests.memory + limits: resources.limits.memory + + defaultInstallValues: + - replicas: 1 + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + + installable: + autoInstall: false +--- +# Source: kubeblocks/templates/class/componentclassconstraint.yaml +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: ComponentResourceConstraint +metadata: + name: kb-resource-constraint-general + labels: + resourceconstraint.kubeblocks.io/provider: kubeblocks + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +spec: + rules: + - name: general + cpu: + min: "0.5" + max: 64 + step: "0.5" + memory: + minPerCPU: 1Gi + maxPerCPU: 32Gi + storage: + min: 20Gi + max: 10Ti +--- +# Source: kubeblocks/templates/opsdefinition.yaml +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsDefinition +metadata: + name: switchover +spec: + varsRef: + podSelectionStrategy: Available + vars: + - name: TARGET_POD_IP + valueFrom: + envVarRef: + envName: KB_POD_IP + - name: LORRY_HTTP_PORT + valueFrom: + envVarRef: + envName: LORRY_HTTP_PORT + parametersSchema: + openAPIV3Schema: + properties: + primary: + description: "old primary instance name(pod Name)." + type: string + candidate: + description: | + candidate instance name(pod Name). if candidate is not empty, will promote it to primary. + otherwise promote a randomly selected pod to primary. + type: string + type: object + jobSpec: + backoffLimit: 0 + template: + spec: + containers: + - name: switchover + image: docker.io/apecloud/kubeblocks-tools:latest + imagePullPolicy: IfNotPresent + command: + - sh + - -c + - | + set -e + # do switchover + url="http://${TARGET_POD_IP}:${LORRY_HTTP_PORT}/v1.0/switchover" + params="{\"parameters\": {\"primary\":\"${primary}\",\"candidate\":\"${candidate}\"}}" + echo "curl ${url}, parameters: ${params}" + res=`curl -s -X POST -H 'Content-Type: application/json' "${url}" -d "${params}"` + echo "curl result: ${res}" + + # check if switchover successfully. + echo "INFO: start to check if switchover successfully, timeout is 60s" + executedUnix=$(date +%s) + while true; do + sleep 5 + if [ ! -z ${candidate} ]; then + # if candidate specified, only check it + role=$(kubectl get pod ${candidate} -ojson | jq -r '.metadata.labels["kubeblocks.io/role"]') + if [ "$role" == "primary" ] || [ "$role" == "leader" ] || [ "$role" == "master" ]; then + echo "INFO: switchover successfully, ${candidate} is ${role}" + exit 0 + fi + else + # check if the candidate instance has been promote to primary + pods=$(kubectl get pod -l apps.kubeblocks.io/component-name=${KB_COMP_NAME},app.kubernetes.io/instance=${KB_CLUSTER_NAME} | awk 'NR > 1 {print $1}') + for podName in ${pods}; do + if [ "${podName}" != "${primary}" ];then + role=$(kubectl get pod ${podName} -ojson | jq -r '.metadata.labels["kubeblocks.io/role"]') + if [ "$role" == "primary" ] || [ "$role" == "leader" ] || [ "$role" == "master" ]; then + echo "INFO: switchover successfully, ${podName} is ${role}" + exit 0 + fi + fi + done + fi + currentUnix=$(date +%s) + diff_time=$((${currentUnix}-${executedUnix})) + if [ ${diff_time} -ge 60 ]; then + echo "ERROR: switchover failed." + exit 1 + fi + done + preConditions: + - rule: + expression: '{{ eq .component.status.phase "Running" }}' + message: "Component is not in Running status." +--- +# Source: kubeblocks/templates/storageprovider/cos.yaml +# cos is a storage provider for [Tencent Cloud Object Storage](https://cloud.tencent.com/product/cos) +apiVersion: storage.kubeblocks.io/v1alpha1 +kind: StorageProvider +metadata: + name: cos + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +spec: + csiDriverName: ru.yandex.s3.csi + csiDriverSecretTemplate: | + accessKeyID: {{ index .Parameters "accessKeyId" }} + secretAccessKey: {{ index .Parameters "secretAccessKey" }} + {{- $region := index .Parameters "region" }} + {{- $endpoint := index .Parameters "endpoint" }} + {{- if not $endpoint }} + {{- $endpoint = (printf "https://cos.%s.myqcloud.com" $region) }} + {{- end }} + endpoint: {{ $endpoint }} + + storageClassTemplate: | + provisioner: ru.yandex.s3.csi + parameters: + mounter: geesefs + # you can set mount options here, for example limit memory cache size (recommended) + options: {{ printf "--memory-limit 64 --dir-mode 0777 --file-mode 0666 %s --subdomain" (index .Parameters "mountOptions") }} + bucket: {{ index .Parameters "bucket" }} + csi.storage.k8s.io/provisioner-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/provisioner-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/controller-publish-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/controller-publish-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/node-stage-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/node-stage-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/node-publish-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/node-publish-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + + datasafedConfigTemplate: | + [storage] + type = s3 + provider = TencentCOS + env_auth = false + access_key_id = {{ index .Parameters "accessKeyId" }} + secret_access_key = {{ index .Parameters "secretAccessKey" }} + endpoint = {{ printf "cos.%s.myqcloud.com" .Parameters.region }} + root = {{ index .Parameters "bucket" }} + chunk_size = 50Mi + + parametersSchema: + openAPIV3Schema: + type: "object" + properties: + region: + type: string + description: "COS region, e.g. cn-guangzhou" + bucket: + type: string + description: "COS bucket" + endpoint: + type: string + description: "COS endpoint (optional)" + mountOptions: + type: string + description: "mount options for geesefs" + accessKeyId: + type: string + description: "COS access key" + secretAccessKey: + type: string + description: "COS secret key" + + required: + - bucket + - region + - accessKeyId + - secretAccessKey + + credentialFields: + - accessKeyId + - secretAccessKey +--- +# Source: kubeblocks/templates/storageprovider/ftp.yaml +apiVersion: storage.kubeblocks.io/v1alpha1 +kind: StorageProvider +metadata: + name: ftp + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +spec: + datasafedConfigTemplate: | + [storage] + type = ftp + host = {{ .Parameters.ftpHost }} + port = {{ if ne .Parameters.ftpPort "0" }}{{ .Parameters.ftpPort }}{{ else }}21{{ end }} + user = {{ .Parameters.ftpUser }} + pass.need_obscure = {{ .Parameters.ftpPassword }} + tls = {{ .Parameters.ftpTls | default false }} + + parametersSchema: + openAPIV3Schema: + type: "object" + properties: + ftpHost: + type: string + description: "Host of the FTP server" + ftpPort: + type: integer + description: "Port of the FTP server (optional)" + default: 21 + ftpUser: + type: string + description: "the FTP user" + ftpPassword: + type: string + description: "the password of the user" + ftpTls: + type: boolean + description: "enable FTP over TLS (optional)" + default: false + + required: + - ftpHost + - ftpUser + - ftpPassword + + credentialFields: + - ftpUser + - ftpPassword +--- +# Source: kubeblocks/templates/storageprovider/gcs-s3comp.yaml +# gcs-s3comp is a storage provider for [Google Cloud Storage](https://cloud.google.com/storage/), by using its S3-compatible API. +apiVersion: storage.kubeblocks.io/v1alpha1 +kind: StorageProvider +metadata: + name: gcs-s3comp + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +spec: + csiDriverName: ru.yandex.s3.csi + csiDriverSecretTemplate: | + {{- $endpoint := index .Parameters "endpoint" }} + {{- if not $endpoint }} + {{- $endpoint = (printf "https://storage.googleapis.com") }} + {{- end }} + accessKeyID: {{ index .Parameters "accessKeyId" }} + secretAccessKey: {{ index .Parameters "secretAccessKey" }} + endpoint: {{ $endpoint }} + + storageClassTemplate: | + provisioner: ru.yandex.s3.csi + parameters: + mounter: geesefs + # you can set mount options here, for example limit memory cache size (recommended) + options: {{ printf "--memory-limit 64 --dir-mode 0777 --file-mode 0666 %s --subdomain" (index .Parameters "mountOptions") }} + bucket: {{ index .Parameters "bucket" }} + csi.storage.k8s.io/provisioner-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/provisioner-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/controller-publish-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/controller-publish-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/node-stage-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/node-stage-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/node-publish-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/node-publish-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + + datasafedConfigTemplate: | + [storage] + type = s3 + provider = GCS + env_auth = false + access_key_id = {{ index .Parameters "accessKeyId" }} + secret_access_key = {{ index .Parameters "secretAccessKey" }} + {{- $endpoint := index .Parameters "endpoint" }} + {{- if not $endpoint }} + {{- $endpoint = (printf "https://storage.googleapis.com") }} + {{- end }} + endpoint = {{ $endpoint }} + root = {{ index .Parameters "bucket" }} + chunk_size = 50Mi + + parametersSchema: + openAPIV3Schema: + type: "object" + properties: + region: + type: string + description: "GCS region, e.g. auto" + bucket: + type: string + description: "GCS bucket" + endpoint: + type: string + description: "GCS endpoint (optional)" + mountOptions: + type: string + description: "mount options for geesefs" + accessKeyId: + type: string + description: "GCS access key" + secretAccessKey: + type: string + description: "GCS secret key" + + required: + - bucket + - region + - accessKeyId + - secretAccessKey + + credentialFields: + - accessKeyId + - secretAccessKey +--- +# Source: kubeblocks/templates/storageprovider/minio.yaml +apiVersion: storage.kubeblocks.io/v1alpha1 +kind: StorageProvider +metadata: + name: minio + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +spec: + csiDriverName: ru.yandex.s3.csi + csiDriverSecretTemplate: | + accessKeyID: {{ index .Parameters "accessKeyId" }} + secretAccessKey: {{ index .Parameters "secretAccessKey" }} + endpoint: {{ index .Parameters "endpoint" }} + + storageClassTemplate: | + provisioner: ru.yandex.s3.csi + parameters: + mounter: geesefs + # you can set mount options here, for example limit memory cache size (recommended) + options: {{ printf "--memory-limit 64 --dir-mode 0777 --file-mode 0666 %s" (index .Parameters "mountOptions") }} + bucket: {{ index .Parameters "bucket" }} + csi.storage.k8s.io/provisioner-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/provisioner-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/controller-publish-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/controller-publish-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/node-stage-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/node-stage-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/node-publish-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/node-publish-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + + datasafedConfigTemplate: | + [storage] + type = s3 + provider = Minio + env_auth = false + access_key_id = {{ index .Parameters "accessKeyId" }} + secret_access_key = {{ index .Parameters "secretAccessKey" }} + endpoint = {{ index .Parameters "endpoint" }} + root = {{ index .Parameters "bucket" }} + chunk_size = 50Mi + + parametersSchema: + openAPIV3Schema: + type: "object" + properties: + bucket: + type: string + description: "MinIO bucket" + endpoint: + type: string + description: "MinIO endpoint" + mountOptions: + type: string + description: "mount options for geesefs" + accessKeyId: + type: string + description: "MinIO access key" + secretAccessKey: + type: string + description: "MinIO secret key" + + required: + - bucket + - endpoint + - accessKeyId + - secretAccessKey + + credentialFields: + - accessKeyId + - secretAccessKey +--- +# Source: kubeblocks/templates/storageprovider/nfs.yaml +apiVersion: storage.kubeblocks.io/v1alpha1 +kind: StorageProvider +metadata: + name: nfs + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +spec: + csiDriverName: nfs.csi.k8s.io + + storageClassTemplate: | + provisioner: nfs.csi.k8s.io + parameters: + server: {{ .Parameters.nfsServer }} + share: {{ .Parameters.nfsShare }} + subDir: {{ .Parameters.nfsSubDir }} + mountPermissions: "0777" + {{- if .Parameters.nfsMountOptions }} + {{- $options := splitList " " .Parameters.nfsMountOptions }} + mountOptions: {{ $options | toJson }} + {{- end }} + + parametersSchema: + openAPIV3Schema: + type: "object" + properties: + nfsServer: + type: string + description: "NFS Server address" + nfsShare: + type: string + description: "NFS share path" + default: "/" + nfsSubDir: + type: string + description: "sub directory under nfs share" + nfsMountOptions: + type: string + description: "extra mount options" + + required: + - nfsServer +--- +# Source: kubeblocks/templates/storageprovider/obs.yaml +# obs is a storage provider for [Huawei OBS](https://www.huaweicloud.com/product/obs.html) object storage. +apiVersion: storage.kubeblocks.io/v1alpha1 +kind: StorageProvider +metadata: + name: obs + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +spec: + csiDriverName: ru.yandex.s3.csi + csiDriverSecretTemplate: | + accessKeyID: {{ index .Parameters "accessKeyId" }} + secretAccessKey: {{ index .Parameters "secretAccessKey" }} + {{- $region := index .Parameters "region" }} + {{- $endpoint := index .Parameters "endpoint" }} + {{- if not $endpoint }} + {{- $endpoint = (printf "https://obs.%s.myhuaweicloud.com" $region) }} + {{- end }} + endpoint: {{ $endpoint }} + + storageClassTemplate: | + provisioner: ru.yandex.s3.csi + parameters: + mounter: geesefs + # you can set mount options here, for example limit memory cache size (recommended) + options: {{ printf "--memory-limit 64 --dir-mode 0777 --file-mode 0666 %s --subdomain" (index .Parameters "mountOptions") }} + bucket: {{ index .Parameters "bucket" }} + csi.storage.k8s.io/provisioner-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/provisioner-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/controller-publish-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/controller-publish-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/node-stage-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/node-stage-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/node-publish-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/node-publish-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + + datasafedConfigTemplate: | + [storage] + type = s3 + provider = HuaweiOBS + env_auth = false + access_key_id = {{ index .Parameters "accessKeyId" }} + secret_access_key = {{ index .Parameters "secretAccessKey" }} + region = {{ index .Parameters "region" }} + endpoint = {{ printf "obs.%s.myhuaweicloud.com" .Parameters.region }} + root = {{ index .Parameters "bucket" }} + chunk_size = 50Mi + + parametersSchema: + openAPIV3Schema: + type: "object" + properties: + region: + type: string + description: "OBS region, e.g. cn-north-4" + bucket: + type: string + description: "OBS bucket" + endpoint: + type: string + description: "OBS endpoint (optional)" + mountOptions: + type: string + description: "mount options for geesefs" + accessKeyId: + type: string + description: "OBS access key" + secretAccessKey: + type: string + description: "OBS secret key" + + required: + - bucket + - region + - accessKeyId + - secretAccessKey + + credentialFields: + - accessKeyId + - secretAccessKey +--- +# Source: kubeblocks/templates/storageprovider/oss.yaml +apiVersion: storage.kubeblocks.io/v1alpha1 +kind: StorageProvider +metadata: + name: oss + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +spec: + csiDriverName: ru.yandex.s3.csi + csiDriverSecretTemplate: | + accessKeyID: {{ index .Parameters "accessKeyId" }} + secretAccessKey: {{ index .Parameters "secretAccessKey" }} + {{- $region := index .Parameters "region" }} + {{- $endpoint := index .Parameters "endpoint" }} + {{- if not $endpoint }} + {{- $endpoint = (printf "https://oss-%s.aliyuncs.com" $region) }} + {{- end }} + endpoint: {{ $endpoint }} + + storageClassTemplate: | + provisioner: ru.yandex.s3.csi + parameters: + mounter: geesefs + # you can set mount options here, for example limit memory cache size (recommended) + options: {{ printf "--memory-limit 64 --dir-mode 0777 --file-mode 0666 %s --subdomain" (index .Parameters "mountOptions") }} + bucket: {{ index .Parameters "bucket" }} + csi.storage.k8s.io/provisioner-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/provisioner-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/controller-publish-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/controller-publish-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/node-stage-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/node-stage-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/node-publish-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/node-publish-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + + datasafedConfigTemplate: | + [storage] + type = s3 + provider = Alibaba + env_auth = false + access_key_id = {{ index .Parameters "accessKeyId" }} + secret_access_key = {{ index .Parameters "secretAccessKey" }} + endpoint = {{- printf "oss-%s.aliyuncs.com" .Parameters.region }} + root = {{ index .Parameters "bucket" }} + chunk_size = 50Mi + + parametersSchema: + openAPIV3Schema: + type: "object" + properties: + region: + type: string + description: "OSS region, e.g. cn-hangzhou" + bucket: + type: string + description: "OSS bucket" + endpoint: + type: string + description: "OSS endpoint (optional)" + mountOptions: + type: string + description: "mount options for geesefs" + accessKeyId: + type: string + description: "OSS access key" + secretAccessKey: + type: string + description: "OSS secret key" + + required: + - bucket + - region + - accessKeyId + - secretAccessKey + + credentialFields: + - accessKeyId + - secretAccessKey +--- +# Source: kubeblocks/templates/storageprovider/pvc.yaml +apiVersion: storage.kubeblocks.io/v1alpha1 +kind: StorageProvider +metadata: + name: pvc + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +spec: + persistentVolumeClaimTemplate: | + spec: + storageClassName: {{ .Parameters.storageClassName | default "" }} + accessModes: + - {{ .Parameters.accessMode | default "ReadWriteOnce" }} + volumeMode: {{ .Parameters.volumeMode | default "Filesystem" }} + + parametersSchema: + openAPIV3Schema: + type: "object" + properties: + storageClassName: + type: string + description: "the name of the StorageClass used to create the PVC" + accessMode: + type: string + description: "the access mode used to create the PVC" + default: "ReadWriteOnce" + enum: ["ReadWriteOnce", "ReadWriteMany", "ReadWriteOncePod"] + volumeMode: + type: string + description: "the volume mode used to create the PVC" + default: "Filesystem" + enum: ["Filesystem", "Block"] +--- +# Source: kubeblocks/templates/storageprovider/s3.yaml +apiVersion: storage.kubeblocks.io/v1alpha1 +kind: StorageProvider +metadata: + name: s3 + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +spec: + csiDriverName: ru.yandex.s3.csi + csiDriverSecretTemplate: | + accessKeyID: {{ index .Parameters "accessKeyId" }} + secretAccessKey: {{ index .Parameters "secretAccessKey" }} + {{- $region := index .Parameters "region" }} + {{- $endpoint := index .Parameters "endpoint" }} + {{- if not $endpoint }} + {{- if hasPrefix "cn-" $region }} + {{- $endpoint = (printf "https://s3.%s.amazonaws.com.cn" $region) }} + {{- else }} + {{- $endpoint = (printf "https://s3.%s.amazonaws.com" $region) }} + {{- end }} + {{- end }} + endpoint: {{ $endpoint }} + + storageClassTemplate: | + provisioner: ru.yandex.s3.csi + parameters: + mounter: geesefs + # you can set mount options here, for example limit memory cache size (recommended) + options: {{ printf "--memory-limit 64 --dir-mode 0777 --file-mode 0666 %s --region %s" (index .Parameters "mountOptions") (index .Parameters "region") }} + bucket: {{ index .Parameters "bucket" }} + csi.storage.k8s.io/provisioner-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/provisioner-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/controller-publish-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/controller-publish-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/node-stage-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/node-stage-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/node-publish-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/node-publish-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + + datasafedConfigTemplate: | + [storage] + type = s3 + provider = AWS + env_auth = false + access_key_id = {{ index .Parameters "accessKeyId" }} + secret_access_key = {{ index .Parameters "secretAccessKey" }} + region = {{ index .Parameters "region" }} + endpoint = {{ index .Parameters "endpoint" }} + root = {{ index .Parameters "bucket" }} + chunk_size = 50Mi + + parametersSchema: + openAPIV3Schema: + type: "object" + properties: + region: + type: string + description: "AWS region, e.g. us-west-1" + bucket: + type: string + description: "S3 bucket" + endpoint: + type: string + description: "S3 endpoint (optional)" + mountOptions: + type: string + description: "mount options for geesefs" + accessKeyId: + type: string + description: "AWS access key" + secretAccessKey: + type: string + description: "AWS secret key" + + required: + - bucket + - region + - accessKeyId + - secretAccessKey + + credentialFields: + - accessKeyId + - secretAccessKey +--- +# Source: kubeblocks/templates/tests/test-connection.yaml +apiVersion: v1 +kind: Pod +metadata: + name: "kubeblocks-test-connection" + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + annotations: + "helm.sh/hook": test +spec: + containers: + - name: wget + image: busybox + command: ['wget'] + args: ['kubeblocks:9443'] + restartPolicy: Never +--- +# Source: kubeblocks/templates/pre-delete-addon-job.yaml +apiVersion: batch/v1 +kind: Job +metadata: + name: kubeblocks-addon-removal + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + annotations: + "helm.sh/hook": pre-delete + "helm.sh/hook-delete-policy": hook-succeeded +spec: + ttlSecondsAfterFinished: 0 + template: + metadata: + name: kubeblocks-addon-removal + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + spec: + serviceAccountName: kubeblocks + securityContext: + runAsNonRoot: true + restartPolicy: OnFailure + containers: + - name: post-install-job + image: "infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-tools:0.8.1" + imagePullPolicy: IfNotPresent + command: + - kubectl + args: + - delete + - addons.extensions.kubeblocks.io + - --selector=app.kubernetes.io/managed-by=Helm,app.kubernetes.io/instance=kubeblocks + affinity: + nodeAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - preference: + matchExpressions: + - key: kb-controller + operator: In + values: + - "true" + weight: 100 + tolerations: + - effect: NoSchedule + key: kb-controller + operator: Equal + value: "true" diff --git a/data/kubeblocks-postgresql-operator/kubeblocks_manifest.yaml b/data/kubeblocks-postgresql-operator/kubeblocks_manifest.yaml new file mode 100644 index 0000000000..1260f6b15f --- /dev/null +++ b/data/kubeblocks-postgresql-operator/kubeblocks_manifest.yaml @@ -0,0 +1,6141 @@ +--- +# Source: kubeblocks/templates/serviceaccount.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: kubeblocks + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +--- +# Source: kubeblocks/templates/serviceaccount.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: kubeblocks-addon-installer + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +--- +# Source: kubeblocks/templates/cloud-provider-secret.yaml +apiVersion: v1 +kind: Secret +metadata: + name: kubeblocks-cloud-provider + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +stringData: + csi-s3: | + secret: + accessKey: + secretKey: + region: + cloudProvider: + storageClass: + bucket: +--- +# Source: kubeblocks/templates/secret.yaml +apiVersion: v1 +kind: Secret +metadata: + name: kubeblocks-secret + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +type: Opaque +stringData: + dataProtectionEncryptionKey: kubeblocks-dp-aes256 +--- +# Source: kubeblocks/templates/applications/alertmanager-webhook-adaptor-values.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: alertmanager-webhook-adaptor-chart-kubeblocks-values + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +data: + values-kubeblocks-override.yaml: |- + affinity: + nodeAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - preference: + matchExpressions: + - key: kb-controller + operator: In + values: + - "true" + weight: 100 + configFiles: + config.yaml: {} + configMapOverrideName: config + image: + registry: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com +--- +# Source: kubeblocks/templates/applications/apecloud-otel-collector-values.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: apecloud-otel-collector-chart-kubeblocks-values + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +data: + values-kubeblocks-override.yaml: |- + enabled: false + image: + registry: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com +--- +# Source: kubeblocks/templates/applications/aws-loadbalancer-controller-values.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: aws-load-balancer-controller-chart-kubeblocks-values + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +data: + values-kubeblocks-override.yaml: |- + affinity: + nodeAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - preference: + matchExpressions: + - key: kb-controller + operator: In + values: + - "true" + weight: 100 + clusterName: "" + enabled: false + replicaCount: 1 + serviceAccount: + create: true + name: kubeblocks-service-account-aws-load-balancer-controller + tolerations: + - effect: NoSchedule + key: kb-controller + operator: Equal + value: "true" +--- +# Source: kubeblocks/templates/applications/csi-hostpath-driver-values.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: csi-hostpath-driver-chart-kubeblocks-values + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +data: + values-kubeblocks-override.yaml: |- + enabled: false + storageClass: + create: true + default: true +--- +# Source: kubeblocks/templates/applications/external-dns-values.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: external-dns-chart-kubeblocks-values + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +data: + values-kubeblocks-override.yaml: |- + domain: kubeblocks.io + enabled: false + tolerations: + - effect: NoSchedule + key: kb-controller + operator: Equal + value: "true" +--- +# Source: kubeblocks/templates/applications/grafana-values.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: grafana-chart-kubeblocks-values + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +data: + values-kubeblocks-override.yaml: |- + adminPassword: kubeblocks + adminUser: admin + affinity: + nodeAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - preference: + matchExpressions: + - key: kb-controller + operator: In + values: + - "true" + weight: 100 + defaultDashboardsTimezone: null + enabled: false + grafana.ini: + auth.anonymous: + enabled: true + hide_version: true + auth.basic: + enabled: false + image: + repository: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/grafana + tag: 9.2.4 + ingress: + annotations: {} + enabled: false + extraPaths: [] + hosts: + - chart-example.local + labels: {} + path: / + pathType: Prefix + tls: [] + rbac: + pspEnabled: false + replicas: 1 + resources: {} + service: + annotations: {} + appProtocol: "" + enabled: true + labels: {} + port: 80 + portName: service + targetPort: 3000 + type: ClusterIP + sidecar: + dashboards: + enabled: true + label: grafana_dashboard + labelValue: "1" + resource: configmap + searchNamespace: ALL + datasources: + defaultDatasourceEnabled: true + enabled: true + initDatasources: true + label: grafana_datasource + labelValue: "1" + resource: configmap + searchNamespace: ALL + skipReload: false + uid: prometheus + image: + repository: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/k8s-sidecar + tag: 1.19.2 + testFramework: + enabled: false + tolerations: + - effect: NoSchedule + key: kb-controller + operator: Equal + value: "true" +--- +# Source: kubeblocks/templates/applications/loki-values.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: loki-chart-kubeblocks-values + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +data: + values-kubeblocks-override.yaml: |- + enabled: false + loki: + auth_enabled: false + commonConfig: + replication_factor: 1 + compactor: + compaction_interval: 10m + delete_request_cancel_period: 2h + retention_delete_delay: 2h + retention_delete_worker_count: 150 + retention_enabled: true + shared_store: filesystem + working_directory: /var/loki/retention + limits_config: + max_query_lookback: 72h + retention_period: 72h + podSecurityContext: + runAsNonRoot: false + runAsUser: 0 + storage: + type: filesystem + monitoring: + dashboards: + enabled: false + lokiCanary: + enabled: false + rules: + enabled: false + selfMonitoring: + enabled: false + grafanaAgent: + installOperator: false + serviceMonitor: + enabled: false + singleBinary: + replicas: 1 + test: + enabled: false +--- +# Source: kubeblocks/templates/applications/prometheus-values.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: prometheus-chart-kubeblocks-values + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +data: + values-kubeblocks-override.yaml: |- + # set prometheus.alertmanager.image.repository + # set prometheus.nodeExporter.image.repository + # set prometheus configmapReload prometheus and alertmanager image.repository + # set prometheus.server.image.repository + alertmanager: + affinity: + nodeAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - preference: + matchExpressions: + - key: kb-controller + operator: In + values: + - "true" + weight: 100 + configMapOverrideName: alertmanager-config + containerSecurityContext: + allowPrivilegeEscalation: false + enabled: true + image: + repository: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/alertmanager + tag: v0.24.0 + ingress: + annotations: {} + enabled: false + extraLabels: {} + extraPaths: [] + hosts: [] + path: / + pathType: Prefix + tls: [] + persistentVolume: + enabled: false + size: 1Gi + replicaCount: 1 + resources: {} + securityContext: + fsGroup: 65534 + runAsGroup: 65534 + runAsNonRoot: false + runAsUser: 0 + service: + annotations: {} + clusterIP: "" + externalIPs: [] + labels: {} + loadBalancerIP: "" + loadBalancerSourceRanges: [] + servicePort: 80 + sessionAffinity: None + type: ClusterIP + statefulSet: + enabled: true + headless: + enableMeshPeer: true + tolerations: + - effect: NoSchedule + key: kb-controller + operator: Equal + value: "true" + alertmanagerFiles: + alertmanager.yml: + global: {} + receivers: + - name: default-receiver + route: + group_interval: 30s + group_wait: 5s + receiver: default-receiver + repeat_interval: 10m + configmapReload: + alertmanager: + image: + repository: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/configmap-reload + tag: v0.5.0 + prometheus: + image: + repository: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/configmap-reload + tag: v0.5.0 + enabled: false + kubeStateMetrics: + enabled: false + nodeExporter: + enabled: false + image: + repository: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/node-exporter + tag: v1.3.1 + pushgateway: + enabled: false + ruleFiles: + kafka_alert_rules.yaml: |- + group: + - name: KafkaExporter + rules: + - alert: KafkaTopicsReplicas + expr: 'sum(kafka_topic_partition_in_sync_replica) by (topic) < 3' + for: 0m + labels: + severity: critical + annotations: + summary: 'Kafka topics replicas (instance {{ $labels.app_kubernetes_io_instance }})' + description: 'Kafka topic in-sync partition\n VALUE = {{ $value }}\n LABELS = {{ $labels }}' + - alert: KafkaConsumersGroup + expr: 'sum(kafka_consumergroup_lag) by (consumergroup) > 50' + for: 1m + labels: + severity: critical + annotations: + summary: 'Kafka consumers group (instance {{ $labels.app_kubernetes_io_instance }})' + description: 'Kafka consumers group\n VALUE = {{ $value }}\n LABELS = {{ $labels }}' + - alert: KafkaBrokerDown + expr: 'kafka_brokers < 3' + for: 0m + labels: + severity: critical + annotations: + Summary: 'Kafka broker *{{ $labels.app_kubernetes_io_instance }}* alert status' + description: 'One of the Kafka broker *{{ $labels.app_kubernetes_io_instance }}* is down.' + kubelet_alert_rules.yml: | + groups: + - name: KubeletSummary + rules: + - alert: ContainerCpuUsageWarning + expr: 'rate(container_cpu_time_seconds_total[2m]) / container_cpu_limit * 100 > 70' + for: 2m + labels: + severity: warning + annotations: + summary: 'Container CPU usage is high (> 70%)' + description: 'Container CPU usage is {{ $value | printf "%.2f" }} percent. (pod: {{ $labels.k8s_pod_name }}, container: {{ $labels.k8s_container_name }})' + + - alert: ContainerCpuUsageCritical + expr: 'rate(container_cpu_time_seconds_total[2m]) / container_cpu_limit * 100 > 90' + for: 1m + labels: + severity: critical + annotations: + summary: 'Container CPU usage is very high (> 90%)' + description: 'Container CPU usage is {{ $value | printf "%.2f" }} percent. (pod: {{ $labels.k8s_pod_name }}, container: {{ $labels.k8s_container_name }})' + + - alert: ContainerMemoryUsage + expr: 'container_memory_working_set_bytes / container_memory_limit_bytes * 100 > 90' + for: 2m + labels: + severity: warning + annotations: + summary: 'Container Memory usage is high (> 90%)' + description: 'Container Memory usage is {{ $value | printf "%.2f" }} percent. (pod: {{ $labels.k8s_pod_name }}, container: {{ $labels.k8s_container_name }})' + + - alert: ContainerMemoryUsagePredict + expr: 'predict_linear(container_memory_working_set_bytes[15m], 30*60) - container_memory_limit_bytes > 0' + for: 5m + labels: + severity: critical + annotations: + summary: 'Container Memory predict usage may exceed the limit 30 minutes later' + description: 'Container Memory predict usage may exceed the limit 30 minutes later, the predict value is {{ $value | humanize1024 }}. (pod: {{ $labels.k8s_pod_name }}, container: {{ $labels.k8s_container_name }})' + + - alert: ContainerVolumeUsage + expr: '(k8s_volume_capacity_bytes - k8s_volume_available_bytes) / k8s_volume_capacity_bytes * 100 > 90' + for: 2m + labels: + severity: warning + annotations: + summary: 'Volume usage is high (> 90%)' + description: 'Volume usage is {{ $value | printf "%.2f" }} percent. (pod: {{ $labels.k8s_pod_name }}, volume: {{ $labels.k8s_volume_name }})' + mongodb_alert_rules.yml: "groups:\n - name: MongodbExporter\n rules:\n - + alert: MongodbDown\n expr: 'max_over_time(mongodb_up[1m]) == 0'\n for: + 0m\n labels:\n severity: critical\n annotations:\n summary: + 'MongoDB is Down'\n description: 'MongoDB instance is down\\n VALUE + = {{ $value }}\\n LABELS = {{ $labels }}'\n\n - alert: MongodbRestarted\n + \ expr: 'mongodb_instance_uptime_seconds < 60'\n for: 0m\n labels:\n + \ severity: info\n annotations:\n summary: 'Mongodb has + just been restarted (< 60s)'\n description: 'Mongodb has just been restarted + {{ $value | printf \"%.1f\" }} seconds ago\\n LABELS = {{ $labels }}'\n\n - + alert: MongodbReplicaMemberUnhealthy\n expr: 'max_over_time(mongodb_rs_members_health[1m]) + == 0'\n for: 0m\n labels:\n severity: critical\n annotations:\n + \ summary: 'Mongodb replica member is unhealthy'\n description: + 'MongoDB replica member is not healthy\\n VALUE = {{ $value }}\\n LABELS = {{ + $labels }}'\n\n - alert: MongodbReplicationLag\n expr: '(mongodb_rs_members_optimeDate{member_state=\"PRIMARY\"} + - on (pod) group_right mongodb_rs_members_optimeDate{member_state=\"SECONDARY\"}) + / 1000 > 10'\n for: 0m\n labels:\n severity: critical\n + \ annotations:\n summary: 'MongoDB replication lag (> 10s)'\n description: + 'Mongodb replication lag is more than 10s\\n VALUE = {{ $value }}\\n LABELS + = {{ $labels }}'\n\n - alert: MongodbReplicationHeadroom\n expr: 'sum(avg(mongodb_mongod_replset_oplog_head_timestamp + - mongodb_mongod_replset_oplog_tail_timestamp)) - sum(avg(mongodb_rs_members_optimeDate{member_state=\"PRIMARY\"} + - on (pod) group_right mongodb_rs_members_optimeDate{member_state=\"SECONDARY\"})) + <= 0'\n for: 0m\n labels:\n severity: critical\n annotations:\n + \ summary: 'MongoDB replication headroom (< 0)'\n description: + 'MongoDB replication headroom is <= 0\\n VALUE = {{ $value }}\\n LABELS = {{ + $labels }}'\n\n - alert: MongodbNumberCursorsOpen\n expr: 'mongodb_ss_metrics_cursor_open{csr_type=\"total\"} + > 10 * 1000'\n for: 2m\n labels:\n severity: warning\n + \ annotations:\n summary: 'MongoDB opened cursors num (> 10k)'\n + \ description: 'Too many cursors opened by MongoDB for clients (> 10k)\\n + \ VALUE = {{ $value }}\\n LABELS = {{ $labels }}'\n\n - alert: MongodbCursorsTimeouts\n + \ expr: 'increase(mongodb_ss_metrics_cursor_timedOut[1m]) > 100'\n for: + 2m\n labels:\n severity: warning\n annotations:\n summary: + 'MongoDB cursors timeouts (>100/minute)' \n description: 'Too many cursors + are timing out (> 100/minute)\\n VALUE = {{ $value }}\\n LABELS = {{ $labels + }}'\n\n - alert: MongodbTooManyConnections\n expr: 'avg by(pod) (rate(mongodb_ss_connections{conn_type=\"current\"}[1m])) + / avg by(pod) (sum (mongodb_ss_connections) by(pod)) * 100 > 80'\n for: + 2m\n labels:\n severity: warning\n annotations:\n summary: + 'MongoDB too many connections (> 80%)'\n description: 'Too many connections + (> 80%)\\n VALUE = {{ $value }}\\n LABELS = {{ $labels }}'\n\n - alert: + MongodbVirtualMemoryUsage\n expr: '(sum(mongodb_ss_mem_virtual) BY (pod) + / sum(mongodb_ss_mem_resident) BY (pod)) > 100'\n for: 2m\n labels:\n + \ severity: warning\n annotations:\n summary: MongoDB + virtual memory usage high\n description: \"High memory usage: the quotient + of (mem_virtual / mem_resident) is more than 100\\n VALUE = {{ $value }}\\n LABELS + = {{ $labels }}\"" + mysql_alert_rules.yml: | + groups: + - name: MysqldExporter + rules: + - alert: MysqlDown + expr: 'max_over_time(mysql_up[1m]) == 0' + for: 0m + labels: + severity: critical + annotations: + summary: 'MySQL is down' + description: 'MySQL is down. (instance: {{ $labels.pod }})' + + - alert: MysqlRestarted + expr: 'mysql_global_status_uptime < 60' + for: 0m + labels: + severity: info + annotations: + summary: 'MySQL has just been restarted (< 60s)' + description: 'MySQL has just been restarted {{ $value | printf "%.1f" }} seconds ago. (instance: {{ $labels.pod }})' + + - alert: MysqlTooManyConnections + expr: 'sum(max_over_time(mysql_global_status_threads_connected[1m]) / mysql_global_variables_max_connections) BY (namespace,app_kubernetes_io_instance,pod) * 100 > 80' + for: 2m + labels: + severity: warning + annotations: + summary: 'MySQL has too many connections (> 80%)' + description: '{{ $value | printf "%.2f" }} percent of MySQL connections are in use. (instance: {{ $labels.pod }})' + + - alert: MysqlConnectionErrors + expr: 'sum(increase(mysql_global_status_connection_errors_total[1m])) BY (namespace,app_kubernetes_io_instance,pod) > 0' + for: 2m + labels: + severity: warning + annotations: + summary: 'MySQL connection errors' + description: 'MySQL has connection errors and the value is {{ $value | printf "%.2f" }}. (instance: {{ $labels.pod }})' + + - alert: MysqlHighThreadsRunning + expr: 'sum(max_over_time(mysql_global_status_threads_running[1m]) / mysql_global_variables_max_connections) BY (namespace,app_kubernetes_io_instance,pod) * 100 > 60' + for: 2m + labels: + severity: warning + annotations: + summary: 'MySQL high threads running (> 60%)' + description: '{{ $value | printf "%.2f" }} percent of MySQL connections are in running state. (instance: {{ $labels.pod }})' + + - alert: MysqlSlowQueries + expr: 'sum(increase(mysql_global_status_slow_queries[1m])) BY (namespace,app_kubernetes_io_instance,pod) > 0' + for: 2m + labels: + severity: info + annotations: + summary: 'MySQL slow queries' + description: 'MySQL server has {{ $value | printf "%.2f" }} slow query. (instance: {{ $labels.pod }})' + + - alert: MysqlInnodbLogWaits + expr: 'sum(rate(mysql_global_status_innodb_log_waits[5m])) BY (namespace,app_kubernetes_io_instance,pod) > 10' + for: 2m + labels: + severity: warning + annotations: + summary: 'MySQL InnoDB log waits (> 10)' + description: 'MySQL innodb log writes stalling and the value is {{ $value | printf "%.2f" }}. (instance: {{ $labels.pod }})' + + - alert: MysqlInnodbBufferPoolHits + expr: 'sum(rate(mysql_global_status_innodb_buffer_pool_reads[5m]) / rate(mysql_global_status_innodb_buffer_pool_read_requests[5m])) BY (namespace,app_kubernetes_io_instance,pod) * 100 > 5' + for: 2m + labels: + severity: warning + annotations: + summary: 'MySQL InnoDB high read requests rate hitting disk (> 5%)' + description: 'High number of logical reads that InnoDB could not satisfy from the buffer pool, and had to read directly from disk. The value is {{ $value | printf "%.2f" }} percent. (instance: {{ $labels.pod }})' + postgresql_alert_rules.yml: | + groups: + - name: PostgreSQLExporter + rules: + - alert: PostgreSQLDown + expr: 'max_over_time(pg_up[1m]) == 0' + for: 0m + labels: + severity: critical + annotations: + summary: 'PostgreSQL is down' + description: 'PostgreSQL is down. (instance: {{ $labels.pod }})' + + - alert: PostgreSQLRestarted + expr: 'time() - pg_postmaster_start_time_seconds < 60' + for: 0m + labels: + severity: info + annotations: + summary: 'PostgreSQL has just been restarted (< 60s)' + description: 'PostgreSQL has just been restarted {{ $value | printf "%.1f" }} seconds ago. (instance: {{ $labels.pod }})' + + - alert: PostgreSQLExporterError + expr: 'pg_exporter_last_scrape_error > 0' + for: 0m + labels: + severity: warning + annotations: + summary: 'PostgreSQL exporter scrape error' + description: 'PostgreSQL exporter has {{ $value | printf "%.2f" }} scrape errors. A query may be buggy in query.yaml. (instance: {{ $labels.pod }})' + + - alert: PostgreSQLTooManySlowQueries + expr: | + max by(namespace,app_kubernetes_io_instance,pod,datname) ( + max_over_time(pg_stat_activity_max_tx_duration{datname!~"template.*"}[2m]) + ) > 60 + for: 2m + labels: + severity: warning + annotations: + summary: 'PostgreSQL database has high number of slow queries' + description: 'PostgreSQL database has slow queries and the value is {{ $value | printf "%.2f" }}. (instance: {{ $labels.pod }}, database: {{ $labels.datname }})' + + - alert: PostgreSQLTooManyConnections + expr: | + sum by (namespace,app_kubernetes_io_instance,pod) (pg_stat_activity_count{datname!~"template.*"}) + > on(namespace,app_kubernetes_io_instance,pod) + (pg_settings_max_connections - pg_settings_superuser_reserved_connections) * 0.8 + for: 2m + labels: + severity: warning + annotations: + summary: 'PostgreSQL too many connections (> 80%)' + description: 'PostgreSQL has too many connections and the value is {{ $value | printf "%.2f" }} percent. (instance: {{ $labels.pod }})' + + - alert: PostgreSQLDeadLocks + expr: 'increase(pg_stat_database_deadlocks_total{datname!~"template.*", datname!=""}[2m]) > 5' + for: 2m + labels: + severity: warning + annotations: + summary: 'PostgreSQL database has dead locks (> 5)' + description: 'PostgreSQL database has {{ $value | printf "%.2f"}} dead locks. (instance: {{ $labels.pod }}, database: {{ $labels.datname }})' + + - alert: PostgreSQLHighRollbackRate + expr: | + rate(pg_stat_database_xact_rollback_total{datname!~"template.*", datname!=""}[2m]) + / + rate(pg_stat_database_xact_commit_total{datname!~"template.*", datname!=""}[2m]) + > 0.1 + for: 2m + labels: + severity: warning + annotations: + summary: 'PostgreSQL database has high rollback rate (> 10%)' + description: 'Ratio of transactions being aborted compared to committed is {{ $value | printf "%.2f"}} percent. (instance: {{ $labels.pod }}, database: {{ $labels.datname }})' + + - alert: PostgreSQLTooManyLocksAcquired + expr: | + sum by (namespace,app_kubernetes_io_instance,pod) (pg_locks_count) + / on(namespace,app_kubernetes_io_instance,pod) + (pg_settings_max_locks_per_transaction * pg_settings_max_connections) + > 0.2 + for: 2m + labels: + severity: warning + annotations: + summary: 'PostgreSQL has too many locks acquired (> 20%)' + description: 'Too many locks acquired on the database and the value is {{ $value | printf "%.2f" }} percent. (instance: {{ $labels.pod }})' + + - alert: PostgreSQLCacheHitRatio + expr: | + avg by (namespace,app_kubernetes_io_instance,pod,datname) ( + rate(pg_stat_database_blks_hit_total{datname!~"template.*", datname!=""}[2m]) + / + ( + rate( + pg_stat_database_blks_hit_total{datname!~"template.*", datname!=""}[2m] + ) + + + rate( + pg_stat_database_blks_read_total{datname!~"template.*", datname!=""}[2m] + ) + ) + ) < 0.9 + for: 2m + labels: + severity: warning + annotations: + summary: 'PostgreSQL database has low cache hit rate (< 90%)' + description: 'Low cache hit rate and the value is {{ $value | printf "%.2f" }} percent. (instance: {{ $labels.pod }}, database: {{ $labels.datname }})' + + - alert: PostgreSQLMaxWriteBufferReached + expr: 'rate(pg_stat_bgwriter_maxwritten_clean_total[2m]) > 0' + for: 2m + labels: + severity: warning + annotations: + summary: 'PostgreSQL write buffers reached max' + description: 'PostgreSQL background writer stops for max and the value is {{ $value | printf "%.2f" }}. (instance: {{ $labels.pod }})' + + - alert: PostgreSQLHighWALFilesArchiveErrorRate + expr: | + rate(pg_stat_archiver_failed_count_total[2m]) + / ( + rate(pg_stat_archiver_archived_count_total[2m]) + rate(pg_stat_archiver_failed_count_total[2m]) + ) > 0.1 + for: 2m + labels: + severity: warning + annotations: + summary: 'PostgreSQL has high error rate in WAL files archiver(> 10%)' + description: 'PostgreSQL high error rate in WAL files archiver and the value is {{ $value | printf "%.2f" }} percent. (instance: {{ $labels.pod }})' + + - alert: PostgreSQLTableNotAutoVacuumed + expr: | + (pg_stat_user_tables_last_autovacuum > 0) + and + (time() - pg_stat_user_tables_last_autovacuum) + > 24 * 60 * 60 * 10 + for: 0m + labels: + severity: warning + annotations: + summary: 'PostgreSQL table in database has not been auto vacuumed for 10 days' + description: 'Table {{ $labels.relname }} in database has not been auto vacuumed for 10 days. (instance: {{ $labels.pod }}, database: {{ $labels.datname }})' + + - alert: PostgreSQLTableNotAutoAnalyzed + expr: | + (pg_stat_user_tables_last_autoanalyze > 0) + and + (time() - pg_stat_user_tables_last_autoanalyze) + > 24 * 60 * 60 * 10 + for: 0m + labels: + severity: warning + annotations: + summary: 'PostgreSQL table in database has not been auto analyzed for 10 days' + description: 'Table {{ $labels.relname }} in database has not been auto analyzed for 10 days. (instance: {{ $labels.pod }}, database: {{ $labels.datname }})' + + - alert: PostgreSQLTableTooManyDeadTuples + expr: | + (pg_stat_user_tables_n_dead_tup > 10000) + / + (pg_stat_user_tables_n_live_tup + pg_stat_user_tables_n_dead_tup) + >= 0.1 + for: 2m + labels: + severity: warning + annotations: + summary: 'PostgreSQL table in database has too many dead tuples (> 10%)' + description: 'Table {{ $labels.relname }} in database dead tuples is too large and the value is {{ $value | printf "%.2f" }} percent. (instance: {{ $labels.pod }}, database: {{ $labels.datname }})' + redis_alert_rules.yml: | + groups: + - name: RedisExporter + rules: + - alert: RedisDown + expr: 'redis_up == 0' + for: 5m + labels: + severity: critical + annotations: + summary: 'Redis is down' + description: 'Redis is down. (instance: {{ $labels.pod }})' + + - alert: RedisCPUHigh + expr: '(rate(redis_cpu_sys_seconds_total[1m]) + rate(redis_cpu_user_seconds_total[1m])) * 100 > 80' + for: 2m + labels: + severity: warning + annotations: + summary: 'Out of CPU (> 80%)' + description: 'Redis is running out of CPU and the value is {{ $value | printf "%.2f" }} percent. (instance: {{ $labels.pod }})' + + - alert: RedisMemoryHigh + expr: '(redis_memory_max_bytes == 0 or redis_memory_used_bytes * 100 / redis_memory_max_bytes) > 90' + for: 5m + labels: + severity: warning + annotations: + summary: 'Out of memory (> 90%)' + description: 'Redis is running out of memory and the value is {{ $value | printf "%.2f" }} percent. (instance: {{ $labels.pod }})' + + - alert: RedisTooManyConnections + expr: 'redis_connected_clients * 100 / redis_config_maxclients > 80' + for: 1m + labels: + severity: warning + annotations: + summary: 'Redis has too many connections (> 80%)' + description: 'Redis has too many connections and the value is {{ $value | printf "%.2f" }} percent. (instance: {{ $labels.pod }})' + + - alert: RedisRejectedConnections + expr: 'increase(redis_rejected_connections_total[1m]) > 0' + for: 5m + labels: + severity: error + annotations: + summary: 'Redis has rejected connections' + description: '{{ $value | printf "%.2f" }} connections to Redis has been rejected. (instance: {{ $labels.pod }})' + + - alert: RedisKeyEviction + expr: 'increase(redis_evicted_keys_total[5m]) > 0' + for: 1s + labels: + severity: error + annotations: + summary: 'Redis has evicted keys' + description: 'Redis has evicted keys in the last 5 minutes and the value is {{ $value | printf "%.2f" }}. (instance: {{ $labels.pod }})' + + - alert: RedisMissingMaster + expr: 'count by (app_kubernetes_io_instance) (redis_instance_info{role="master"}) < 1' + for: 30s + labels: + severity: critical + annotations: + summary: 'Redis missing master' + description: 'Redis cluster has no node marked as master.' + + - alert: RedisDisconnectedSlaves + expr: 'count without (instance, job) (redis_connected_slaves) - sum without (instance, job) (redis_connected_slaves) - 1 > 1' + for: 0m + labels: + severity: critical + annotations: + summary: 'Redis disconnected slaves' + description: 'Redis not replicating for all slaves. Consider reviewing the redis replication status. (instance: {{ $labels.pod }})' + + - alert: RedisReplicationBroken + expr: 'delta(redis_connected_slaves[1m]) < 0' + for: 0m + labels: + severity: critical + annotations: + summary: 'Redis replication broken' + description: 'Redis instance lost a slave. (instance: {{ $labels.pod }})' + server: + affinity: + nodeAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - preference: + matchExpressions: + - key: kb-controller + operator: In + values: + - "true" + weight: 100 + containerSecurityContext: + allowPrivilegeEscalation: false + enabled: true + extraArgs: + enable-feature: memory-snapshot-on-shutdown + log.level: info + storage.tsdb.min-block-duration: 30m + storage.tsdb.retention.size: 10GB + extraFlags: + - web.enable-lifecycle + - web.enable-remote-write-receiver + global: + evaluation_interval: 15s + scrape_interval: 15s + scrape_timeout: 10s + image: + repository: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/prometheus + tag: v2.44.0 + ingress: + annotations: {} + enabled: false + extraLabels: {} + extraPaths: [] + hosts: [] + path: / + pathType: Prefix + tls: [] + persistentVolume: + enabled: false + size: 20Gi + remoteWrite: [] + replicaCount: 1 + resources: {} + retention: 2d + routePrefix: / + securityContext: + fsGroup: 65534 + runAsGroup: 65534 + runAsNonRoot: false + runAsUser: 0 + service: + annotations: {} + clusterIP: "" + enabled: true + externalIPs: [] + gRPC: + enabled: false + servicePort: 10901 + labels: {} + loadBalancerIP: "" + loadBalancerSourceRanges: [] + servicePort: 80 + sessionAffinity: None + statefulsetReplica: + enabled: false + replica: 0 + type: ClusterIP + statefulSet: + enabled: true + tolerations: + - effect: NoSchedule + key: kb-controller + operator: Equal + value: "true" + serverFiles: + prometheus.yml: + rule_files: + - /etc/config/recording_rules.yml + - /etc/config/alerting_rules.yml + - /etc/config/kubelet_alert_rules.yml + - /etc/config/mysql_alert_rules.yml + - /etc/config/postgresql_alert_rules.yml + - /etc/config/redis_alert_rules.yml + - /etc/config/kafka_alert_rules.yml + - /etc/config/mongodb_alert_rules.yml + scrape_configs: + - job_name: prometheus + static_configs: + - targets: + - localhost:9090 + - honor_labels: true + job_name: kubeblocks-service + kubernetes_sd_configs: + - role: endpoints + relabel_configs: + - action: keep + regex: kubeblocks + source_labels: + - __meta_kubernetes_service_label_app_kubernetes_io_managed_by + - action: drop + regex: agamotto + source_labels: + - __meta_kubernetes_service_label_monitor_kubeblocks_io_managed_by + - action: keep + regex: true + source_labels: + - __meta_kubernetes_service_annotation_monitor_kubeblocks_io_scrape + - action: replace + regex: (https?) + source_labels: + - __meta_kubernetes_service_annotation_monitor_kubeblocks_io_scheme + target_label: __scheme__ + - action: replace + regex: (.+) + source_labels: + - __meta_kubernetes_service_annotation_monitor_kubeblocks_io_path + target_label: __metrics_path__ + - action: replace + regex: (.+?)(?::\d+)?;(\d+) + replacement: $1:$2 + source_labels: + - __address__ + - __meta_kubernetes_service_annotation_monitor_kubeblocks_io_port + target_label: __address__ + - action: labelmap + regex: __meta_kubernetes_service_annotation_monitor_kubeblocks_io_param_(.+) + replacement: __param_$1 + - action: labelmap + regex: __meta_kubernetes_service_label_(.+) + - action: replace + source_labels: + - __meta_kubernetes_namespace + target_label: namespace + - action: replace + source_labels: + - __meta_kubernetes_service_name + target_label: service + - action: replace + source_labels: + - __meta_kubernetes_pod_node_name + target_label: node + - action: replace + source_labels: + - __meta_kubernetes_pod_name + target_label: pod + - action: drop + regex: Pending|Succeeded|Failed|Completed + source_labels: + - __meta_kubernetes_pod_phase + - honor_labels: true + job_name: kubeblocks-agamotto + kubernetes_sd_configs: + - role: endpoints + relabel_configs: + - action: keep + regex: agamotto + source_labels: + - __meta_kubernetes_service_label_monitor_kubeblocks_io_managed_by + - action: keep + regex: true + source_labels: + - __meta_kubernetes_service_annotation_monitor_kubeblocks_io_scrape + - action: replace + regex: (https?) + source_labels: + - __meta_kubernetes_service_annotation_monitor_kubeblocks_io_scheme + target_label: __scheme__ + - action: replace + regex: (.+) + source_labels: + - __meta_kubernetes_service_annotation_monitor_kubeblocks_io_path + target_label: __metrics_path__ + - action: replace + regex: (.+?)(?::\d+)?;(\d+) + replacement: $1:$2 + source_labels: + - __address__ + - __meta_kubernetes_service_annotation_monitor_kubeblocks_io_port + target_label: __address__ + - action: labelmap + regex: __meta_kubernetes_service_annotation_monitor_kubeblocks_io_param_(.+) + replacement: __param_$1 + - action: drop + regex: Pending|Succeeded|Failed|Completed + source_labels: + - __meta_kubernetes_pod_phase +--- +# Source: kubeblocks/templates/applications/snapshot-controller-values.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: snapshot-controller-chart-kubeblocks-values + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +data: + values-kubeblocks-override.yaml: |- + affinity: + nodeAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - preference: + matchExpressions: + - key: kb-controller + operator: In + values: + - "true" + weight: 100 + enabled: true + image: + repository: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/snapshot-controller + tag: v6.2.1 + replicaCount: 1 + tolerations: + - effect: NoSchedule + key: kb-controller + operator: Equal + value: "true" + volumeSnapshotClasses: + - deletionPolicy: Delete + driver: hostpath.csi.k8s.io + name: default-vsc +--- +# Source: kubeblocks/templates/configmap.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: kubeblocks-manager-config + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +data: + config.yaml: | + # data plane tolerations + DATA_PLANE_TOLERATIONS: '[{"effect":"NoSchedule","key":"kb-data","operator":"Equal","value":"true"}]' + + # data plane affinity + DATA_PLANE_AFFINITY: '{"nodeAffinity":{"preferredDuringSchedulingIgnoredDuringExecution":[{"preference":{"matchExpressions":[{"key":"kb-data","operator":"In","values":["true"]}]},"weight":100}]}}' + + # the default storage class name. + DEFAULT_STORAGE_CLASS: "" +--- +# Source: kubeblocks/templates/configmap.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: kubeblocks-host-ports + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +data: {} +--- +# Source: kubeblocks/templates/grafana/configmaps-datasources.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: kubeblocks-grafana-datasource + namespace: acto-namespace + annotations: + null + labels: + grafana_datasource: "1" + app: kubeblocks-grafana-datasource + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +data: + datasource.yaml: |- + apiVersion: 1 + datasources: + - name: Prometheus + type: prometheus + uid: prometheus + url: http://kb-addon-prometheus-server.acto-namespace:80/ + access: proxy + isDefault: true + jsonData: + timeInterval: 15s + - name: Prometheus-15s + type: prometheus + uid: prometheus-15 + url: http://kb-addon-prometheus-server.acto-namespace:80/ + access: proxy + isDefault: false + jsonData: + timeInterval: 15s + - name: Loki + type: loki + uid: loki-kubeblocks + access: proxy + url: http://loki-gateway:80 + jsonData: + maxLines: 1000 +--- +# Source: kubeblocks/templates/prometheus/alertmanager.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + name: kb-addon-prometheus-alertmanager-config +data: + alertmanager.yml: | + global: { } + receivers: + - name: default-receiver + route: + group_by: [ 'alertname', 'namespace', 'app_kubernetes_io_instance' ] + group_interval: 30s + group_wait: 5s + receiver: default-receiver + repeat_interval: 10m + routes: + - receiver: default-receiver + group_by: ['alertname', 'instance', 'pod'] + matchers: + - alertname=~"Container.*" +--- +# Source: kubeblocks/templates/prometheus/webhook-adaptor.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + name: kb-addon-alertmanager-webhook-adaptor-config +data: + config.yml: | + receivers: [ ] +--- +# Source: kubeblocks/templates/rbac/apps_backuppolicytemplate_editor_role.yaml +# permissions for end users to edit backuppolicytemplates. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-backuppolicytemplate-editor-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - apps.kubeblocks.io + resources: + - backuppolicytemplates + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - apps.kubeblocks.io + resources: + - backuppolicytemplates/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/apps_backuppolicytemplate_viewer_role.yaml +# permissions for end users to view backuppolicytemplates. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-backuppolicytemplate-viewer-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - apps.kubeblocks.io + resources: + - backuppolicytemplates + verbs: + - get + - list + - watch +- apiGroups: + - apps.kubeblocks.io + resources: + - backuppolicytemplates/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/apps_cluster_editor_role.yaml +# permissions for end users to edit clusters. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-cluster-editor-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - apps.kubeblocks.io + resources: + - clusters + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - apps.kubeblocks.io + resources: + - clusters/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/apps_cluster_viewer_role.yaml +# permissions for end users to view clusters. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-cluster-viewer-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - apps.kubeblocks.io + resources: + - clusters + verbs: + - get + - list + - watch +- apiGroups: + - apps.kubeblocks.io + resources: + - clusters/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/apps_clusterdefinition_editor_role.yaml +# permissions for end users to edit clusterdefinitions. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-clusterdefinition-editor-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - apps.kubeblocks.io + resources: + - clusterdefinitions + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - apps.kubeblocks.io + resources: + - clusterdefinitions/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/apps_clusterdefinition_viewer_role.yaml +# permissions for end users to view clusterdefinitions. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-clusterdefinition-viewer-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - apps.kubeblocks.io + resources: + - clusterdefinitions + verbs: + - get + - list + - watch +- apiGroups: + - apps.kubeblocks.io + resources: + - clusterdefinitions/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/apps_clusterversion_editor_role.yaml +# permissions for end users to edit clusterversions. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-clusterversion-editor-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - apps.kubeblocks.io + resources: + - clusterversions + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - apps.kubeblocks.io + resources: + - clusterversions/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/apps_clusterversion_viewer_role.yaml +# permissions for end users to view clusterversions. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-clusterversion-viewer-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - apps.kubeblocks.io + resources: + - clusterversions + verbs: + - get + - list + - watch +- apiGroups: + - apps.kubeblocks.io + resources: + - clusterversions/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/apps_configconstraint_editor_role.yaml +# permissions for end users to edit configconstraints. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-configconstraint-editor-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - apps.kubeblocks.io + resources: + - configconstraints + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - apps.kubeblocks.io + resources: + - configconstraints/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/apps_configconstraint_viewer_role.yaml +# permissions for end users to view configconstraints. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-configconstraint-viewer-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - apps.kubeblocks.io + resources: + - configconstraints + verbs: + - get + - list + - watch +- apiGroups: + - apps.kubeblocks.io + resources: + - configconstraints/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/auth_proxy_client_clusterrole.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-metrics-reader + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- nonResourceURLs: + - "/metrics" + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/auth_proxy_role.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-proxy-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - authentication.k8s.io + resources: + - tokenreviews + verbs: + - create +- apiGroups: + - authorization.k8s.io + resources: + - subjectaccessreviews + verbs: + - create +--- +# Source: kubeblocks/templates/rbac/cluster_pod_required_role.yaml +# permissions for end users to edit clusters. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-cluster-pod-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +aggregationRule: + clusterRoleSelectors: + - matchLabels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/required-by: pod +--- +# Source: kubeblocks/templates/rbac/cluster_pod_required_role.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-lorry-pod-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/required-by: pod +rules: +- apiGroups: + - "" + resources: + - events + verbs: + - create +- apiGroups: + - "" + resources: + - configmaps + verbs: + - create + - get + - list + - patch + - update + - delete +- apiGroups: + - apps.kubeblocks.io + resources: + - clusters + verbs: + - get + - list +- apiGroups: + - apps.kubeblocks.io + resources: + - clusters/status + verbs: + - get +- apiGroups: + - "" + resources: + - pods + verbs: + - get + - list +--- +# Source: kubeblocks/templates/rbac/cluster_pod_required_role.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-patroni-pod-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/required-by: pod +rules: +- apiGroups: + - "" + resources: + - configmaps + verbs: + - create + - get + - list + - patch + - update + - watch + # delete is required only for 'patronictl remove' + - delete +- apiGroups: + - "" + resources: + - endpoints + verbs: + - get + - patch + - update + - create + - list + - watch + # delete is required only for 'patronictl remove' + - delete +- apiGroups: + - "" + resources: + - pods + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +--- +# Source: kubeblocks/templates/rbac/cluster_pod_required_role.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-backup-pod-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/required-by: pod +rules: +- apiGroups: + - "dataprotection.kubeblocks.io" + resources: + - backups/status + verbs: + - get + - update + - patch +- apiGroups: + - "dataprotection.kubeblocks.io" + resources: + - backups + verbs: + - create +--- +# Source: kubeblocks/templates/rbac/cluster_pod_required_role.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-volume-protection-pod-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/required-by: pod +rules: +- apiGroups: + - "" + resources: + - nodes + - nodes/stats + verbs: + - get + - list +--- +# Source: kubeblocks/templates/rbac/clusterrole.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +aggregationRule: + clusterRoleSelectors: + - matchLabels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks +--- +# Source: kubeblocks/templates/rbac/clusterrole.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-manager-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: + - apiGroups: + - apps + resources: + - deployments + verbs: + - create + - delete + - deletecollection + - get + - list + - patch + - update + - watch + - apiGroups: + - apps + resources: + - deployments/finalizers + verbs: + - update + - apiGroups: + - apps + resources: + - deployments/status + verbs: + - get + - apiGroups: + - apps + resources: + - statefulsets + verbs: + - create + - delete + - deletecollection + - get + - list + - patch + - update + - watch + - apiGroups: + - apps + resources: + - statefulsets/finalizers + verbs: + - update + - apiGroups: + - apps + resources: + - statefulsets/status + verbs: + - get + - apiGroups: + - apps.kubeblocks.io + resources: + - backuppolicytemplates + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - apps.kubeblocks.io + resources: + - backuppolicytemplates/finalizers + verbs: + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - backuppolicytemplates/status + verbs: + - get + - patch + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - clusterdefinitions + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - apps.kubeblocks.io + resources: + - clusterdefinitions/finalizers + verbs: + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - clusterdefinitions/status + verbs: + - get + - patch + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - clusters + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - apps.kubeblocks.io + resources: + - clusters/finalizers + verbs: + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - clusters/status + verbs: + - get + - patch + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - clusterversions + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - apps.kubeblocks.io + resources: + - clusterversions/finalizers + verbs: + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - clusterversions/status + verbs: + - get + - patch + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - componentclassdefinitions + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - apps.kubeblocks.io + resources: + - componentclassdefinitions/finalizers + verbs: + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - componentclassdefinitions/status + verbs: + - get + - patch + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - componentdefinitions + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - apps.kubeblocks.io + resources: + - componentdefinitions/finalizers + verbs: + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - componentdefinitions/status + verbs: + - get + - patch + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - componentresourceconstraints + verbs: + - get + - list + - watch + - apiGroups: + - apps.kubeblocks.io + resources: + - components + verbs: + - create + - delete + - deletecollection + - get + - list + - patch + - update + - watch + - apiGroups: + - apps.kubeblocks.io + resources: + - components/finalizers + verbs: + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - components/status + verbs: + - get + - patch + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - configconstraints + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - apps.kubeblocks.io + resources: + - configconstraints/finalizers + verbs: + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - configconstraints/status + verbs: + - get + - patch + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - configurations + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - apps.kubeblocks.io + resources: + - configurations/finalizers + verbs: + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - configurations/status + verbs: + - get + - patch + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - opsdefinitions + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - apps.kubeblocks.io + resources: + - opsdefinitions/finalizers + verbs: + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - opsdefinitions/status + verbs: + - get + - patch + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - opsrequests + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - apps.kubeblocks.io + resources: + - opsrequests/finalizers + verbs: + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - opsrequests/status + verbs: + - get + - patch + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - servicedescriptors + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - apps.kubeblocks.io + resources: + - servicedescriptors/finalizers + verbs: + - update + - apiGroups: + - apps.kubeblocks.io + resources: + - servicedescriptors/status + verbs: + - get + - patch + - update + - apiGroups: + - batch + resources: + - cronjobs + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - batch + resources: + - cronjobs/finalizers + verbs: + - patch + - update + - apiGroups: + - batch + resources: + - cronjobs/status + verbs: + - get + - apiGroups: + - batch + resources: + - jobs + verbs: + - create + - delete + - deletecollection + - get + - list + - patch + - update + - watch + - apiGroups: + - batch + resources: + - jobs/finalizers + verbs: + - update + - apiGroups: + - batch + resources: + - jobs/status + verbs: + - get + - apiGroups: + - coordination.k8s.io + resources: + - leases + verbs: + - create + - get + - list + - patch + - update + - watch + - apiGroups: + - "" + resources: + - configmap + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - "" + resources: + - configmap/finalizers + verbs: + - update + - apiGroups: + - "" + resources: + - configmaps + verbs: + - create + - delete + - deletecollection + - get + - list + - patch + - update + - watch + - apiGroups: + - "" + resources: + - configmaps/finalizers + verbs: + - update + - apiGroups: + - "" + resources: + - events + verbs: + - create + - get + - list + - patch + - watch + - apiGroups: + - "" + resources: + - persistentvolumeclaims + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - "" + resources: + - persistentvolumeclaims/finalizers + verbs: + - update + - apiGroups: + - "" + resources: + - persistentvolumeclaims/status + verbs: + - get + - patch + - update + - apiGroups: + - "" + resources: + - persistentvolumes + verbs: + - get + - list + - patch + - update + - watch + - apiGroups: + - "" + resources: + - pods + verbs: + - delete + - deletecollection + - get + - list + - patch + - update + - watch + - apiGroups: + - "" + resources: + - pods/exec + verbs: + - create + - apiGroups: + - "" + resources: + - pods/finalizers + verbs: + - update + - apiGroups: + - "" + resources: + - pods/log + verbs: + - get + - list + - apiGroups: + - "" + resources: + - secrets + verbs: + - create + - delete + - deletecollection + - get + - list + - patch + - update + - watch + - apiGroups: + - "" + resources: + - secrets/finalizers + verbs: + - update + - apiGroups: + - "" + resources: + - serviceaccounts + verbs: + - get + - list + - watch + - apiGroups: + - "" + resources: + - serviceaccounts/status + verbs: + - get + - apiGroups: + - "" + resources: + - services + verbs: + - create + - delete + - deletecollection + - get + - list + - patch + - update + - watch + - apiGroups: + - "" + resources: + - services/finalizers + verbs: + - update + - apiGroups: + - "" + resources: + - services/status + verbs: + - get + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - actionsets + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - actionsets/finalizers + verbs: + - update + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - actionsets/status + verbs: + - get + - patch + - update + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - backuppolicies + verbs: + - create + - delete + - deletecollection + - get + - list + - patch + - update + - watch + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - backuppolicies/finalizers + verbs: + - update + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - backuppolicies/status + verbs: + - get + - patch + - update + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - backuprepos + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - backuprepos/finalizers + verbs: + - update + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - backuprepos/status + verbs: + - get + - patch + - update + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - backups + verbs: + - create + - delete + - deletecollection + - get + - list + - patch + - update + - watch + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - backups/finalizers + verbs: + - update + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - backups/status + verbs: + - get + - patch + - update + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - backupschedules + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - backupschedules/finalizers + verbs: + - update + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - backupschedules/status + verbs: + - get + - patch + - update + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - restores + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - restores/finalizers + verbs: + - update + - apiGroups: + - dataprotection.kubeblocks.io + resources: + - restores/status + verbs: + - get + - patch + - update + - apiGroups: + - extensions.kubeblocks.io + resources: + - addons + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - extensions.kubeblocks.io + resources: + - addons/finalizers + verbs: + - update + - apiGroups: + - extensions.kubeblocks.io + resources: + - addons/status + verbs: + - get + - patch + - update + - apiGroups: + - policy + resources: + - poddisruptionbudgets + verbs: + - create + - delete + - deletecollection + - get + - list + - patch + - update + - watch + - apiGroups: + - policy + resources: + - poddisruptionbudgets/finalizers + verbs: + - update + - apiGroups: + - rbac.authorization.k8s.io + resources: + - clusterrolebindings + verbs: + - get + - list + - watch + - apiGroups: + - rbac.authorization.k8s.io + resources: + - clusterrolebindings/status + verbs: + - get + - apiGroups: + - rbac.authorization.k8s.io + resources: + - rolebindings + verbs: + - get + - list + - watch + - apiGroups: + - rbac.authorization.k8s.io + resources: + - rolebindings/status + verbs: + - get + - apiGroups: + - snapshot.storage.k8s.io + resources: + - volumesnapshotclasses + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - snapshot.storage.k8s.io + resources: + - volumesnapshotclasses/finalizers + verbs: + - patch + - update + - apiGroups: + - snapshot.storage.k8s.io + resources: + - volumesnapshots + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - snapshot.storage.k8s.io + resources: + - volumesnapshots/finalizers + verbs: + - patch + - update + - apiGroups: + - storage.k8s.io + resources: + - csidrivers + verbs: + - get + - list + - watch + - apiGroups: + - storage.k8s.io + resources: + - storageclasses + verbs: + - create + - delete + - get + - list + - watch + - apiGroups: + - storage.kubeblocks.io + resources: + - storageproviders + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - storage.kubeblocks.io + resources: + - storageproviders/finalizers + verbs: + - update + - apiGroups: + - storage.kubeblocks.io + resources: + - storageproviders/status + verbs: + - get + - patch + - update + - apiGroups: + - workloads.kubeblocks.io + resources: + - replicatedstatemachines + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - workloads.kubeblocks.io + resources: + - replicatedstatemachines/finalizers + verbs: + - update + - apiGroups: + - workloads.kubeblocks.io + resources: + - replicatedstatemachines/status + verbs: + - get + - patch + - update +--- +# Source: kubeblocks/templates/rbac/dataprotection_backup_editor_role.yaml +# permissions for end users to edit backups. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-backup-editor-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - dataprotection.kubeblocks.io + resources: + - backups + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - dataprotection.kubeblocks.io + resources: + - backups/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/dataprotection_backup_viewer_role.yaml +# permissions for end users to view backups. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-backup-viewer-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - dataprotection.kubeblocks.io + resources: + - backups + verbs: + - get + - list + - watch +- apiGroups: + - dataprotection.kubeblocks.io + resources: + - backups/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/dataprotection_backuppolicy_editor_role.yaml +# permissions for end users to edit backuppolicies. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-backuppolicy-editor-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - dataprotection.kubeblocks.io + resources: + - backuppolicies + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - dataprotection.kubeblocks.io + resources: + - backuppolicies/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/dataprotection_backuppolicy_viewer_role.yaml +# permissions for end users to view backuppolicies. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-backuppolicy-viewer-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - dataprotection.kubeblocks.io + resources: + - backuppolicies + verbs: + - get + - list + - watch +- apiGroups: + - dataprotection.kubeblocks.io + resources: + - backuppolicies/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/dataprotection_backuptool_editor_role.yaml +# permissions for end users to edit backuptools. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-backuptool-editor-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - dataprotection.kubeblocks.io + resources: + - backuptools + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - dataprotection.kubeblocks.io + resources: + - backuptools/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/dataprotection_backuptool_viewer_role.yaml +# permissions for end users to view backuptools. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-backuptool-viewer-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - dataprotection.kubeblocks.io + resources: + - backuptools + verbs: + - get + - list + - watch +- apiGroups: + - dataprotection.kubeblocks.io + resources: + - backuptools/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/dataprotection_restore_editor_role.yaml +# permissions for end users to edit restores. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-restore-editor-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - dataprotection.kubeblocks.io + resources: + - restores + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - dataprotection.kubeblocks.io + resources: + - restores/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/dataprotection_restore_viewer_role.yaml +# permissions for end users to view restores. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-restore-viewer-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - dataprotection.kubeblocks.io + resources: + - restores + verbs: + - get + - list + - watch +- apiGroups: + - dataprotection.kubeblocks.io + resources: + - restores/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/extensions_addon_editor_role.yaml +# permissions for end users to edit addons. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-editor-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - extensions.kubeblocks.io + resources: + - addons + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - extensions.kubeblocks.io + resources: + - addons/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/extensions_addon_viewer_role.yaml +# permissions for end users to view addons. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-viewer-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - extensions.kubeblocks.io + resources: + - addons + verbs: + - get + - list + - watch +- apiGroups: + - extensions.kubeblocks.io + resources: + - addons/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/opsrequest_editor_role.yaml +# permissions for end users to edit opsrequests. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-opsrequest-editor-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - apps.kubeblocks.io + resources: + - opsrequests + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - apps.kubeblocks.io + resources: + - opsrequests/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/opsrequest_viewer_role.yaml +# permissions for end users to view opsrequests. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-opsrequest-viewer-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - apps.kubeblocks.io + resources: + - opsrequests + verbs: + - get + - list + - watch +- apiGroups: + - apps.kubeblocks.io + resources: + - opsrequests/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/rbac_manager_role.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeblocks-rbac-manager-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - "" + resources: + - serviceaccounts + verbs: + - create + - delete + - get + - list + - patch + - update +- apiGroups: + - "" + resources: + - serviceaccounts/finalizers + verbs: + - update +- apiGroups: + - "" + resources: + - serviceaccounts/status + verbs: + - get + - patch + - update +- apiGroups: + - rbac.authorization.k8s.io + resources: + - rolebindings + verbs: + - create + - delete + - get + - list + - patch + - update +- apiGroups: + - rbac.authorization.k8s.io + resources: + - rolebindings/finalizers + verbs: + - update +- apiGroups: + - rbac.authorization.k8s.io + resources: + - rolebindings/status + verbs: + - get + - patch + - update +- apiGroups: + - rbac.authorization.k8s.io + resources: + - clusterrolebindings + verbs: + - create + - delete + - get + - list + - patch + - update +- apiGroups: + - rbac.authorization.k8s.io + resources: + - clusterrolebindings/finalizers + verbs: + - update +- apiGroups: + - rbac.authorization.k8s.io + resources: + - clusterrolebindings/status + verbs: + - get + - patch + - update +--- +# Source: kubeblocks/templates/rbac/workloads_replicatedstatemachine_editor_role.yaml +# permissions for end users to edit replicatedstatemachines. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/name: clusterrole + app.kubernetes.io/instance: replicatedstatemachine-editor-role + app.kubernetes.io/component: rbac + app.kubernetes.io/created-by: kubeblocks + app.kubernetes.io/part-of: kubeblocks + app.kubernetes.io/managed-by: kustomize + name: replicatedstatemachine-editor-role +rules: +- apiGroups: + - workloads.kubeblocks.io + resources: + - replicatedstatemachines + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - workloads.kubeblocks.io + resources: + - replicatedstatemachines/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/workloads_replicatedstatemachine_viewer_role.yaml +# permissions for end users to view replicatedstatemachines. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/name: clusterrole + app.kubernetes.io/instance: replicatedstatemachine-viewer-role + app.kubernetes.io/component: rbac + app.kubernetes.io/created-by: kubeblocks + app.kubernetes.io/part-of: kubeblocks + app.kubernetes.io/managed-by: kustomize + name: replicatedstatemachines-viewer-role +rules: +- apiGroups: + - workloads.kubeblocks.io + resources: + - replicatedstatemachines + verbs: + - get + - list + - watch +- apiGroups: + - workloads.kubeblocks.io + resources: + - replicatedstatemachines/status + verbs: + - get +--- +# Source: kubeblocks/templates/rbac/auth_proxy_role_binding.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: kubeblocks-proxy-rolebinding + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: kubeblocks-proxy-role +subjects: +- kind: ServiceAccount + name: kubeblocks + namespace: acto-namespace +--- +# Source: kubeblocks/templates/rbac/clusterrole_binding.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: kubeblocks + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: kubeblocks +subjects: +- kind: ServiceAccount + name: kubeblocks + namespace: acto-namespace +--- +# Source: kubeblocks/templates/rbac/clusterrole_binding.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: kubeblocks-cluster-admin + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: cluster-admin +subjects: + - kind: ServiceAccount + name: kubeblocks-addon-installer + namespace: acto-namespace +--- +# Source: kubeblocks/templates/rbac/leader_election_role.yaml +# permissions to do leader election. +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: kubeblocks-leader-election-role + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - coordination.k8s.io + resources: + - leases + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - "" + resources: + - events + verbs: + - create + - patch +--- +# Source: kubeblocks/templates/rbac/leader_election_role_binding.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: kubeblocks-leader-election-rolebinding + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: kubeblocks-leader-election-role +subjects: +- kind: ServiceAccount + name: kubeblocks-controller-manager + namespace: acto-namespace +--- +# Source: kubeblocks/templates/service.yaml +apiVersion: v1 +kind: Service +metadata: + name: kubeblocks + labels: + control-plane: controller-manager + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +spec: + type: ClusterIP + ports: + - port: 9443 + targetPort: webhook-server + protocol: TCP + name: webhook-server + selector: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks +--- +# Source: kubeblocks/templates/dataprotection.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: kubeblocks-dataprotection + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/component: "dataprotection" +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + strategy: + rollingUpdate: + maxSurge: 1 + maxUnavailable: 40% + type: RollingUpdate + template: + metadata: + labels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + spec: + priorityClassName: + serviceAccountName: kubeblocks + securityContext: + runAsNonRoot: true + initContainers: # only download tools image to local + - name: tools + image: "infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-tools:0.8.1" + imagePullPolicy: IfNotPresent + resources: + {} + command: + - /bin/true + containers: + - name: dataprotection + args: + - "--health-probe-bind-address=:8081" + - "--metrics-bind-address=:8080" + - "--leader-elect" + - "--leader-elect-id=abd03fda" + - "--zap-devel=false" + - "--zap-time-encoding=iso8601" + - "--zap-encoder=console" + env: + - name: CM_NAMESPACE + value: acto-namespace + - name: CM_AFFINITY + value: "{\"nodeAffinity\":{\"preferredDuringSchedulingIgnoredDuringExecution\":[{\"preference\":{\"matchExpressions\":[{\"key\":\"kb-controller\",\"operator\":\"In\",\"values\":[\"true\"]}]},\"weight\":100}]}}" + - name: CM_TOLERATIONS + value: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + - name: KUBEBLOCKS_IMAGE_PULL_POLICY + value: IfNotPresent + - name: KUBEBLOCKS_TOOLS_IMAGE + value: "infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-tools:0.8.1" + - name: KUBEBLOCKS_SERVICEACCOUNT_NAME + value: kubeblocks + - name: DP_ENCRYPTION_KEY + valueFrom: + secretKeyRef: + name: kubeblocks-secret + key: dataProtectionEncryptionKey + - name: DATASAFED_IMAGE + value: "infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/datasafed:0.1.0" + - name: GC_FREQUENCY_SECONDS + value: "3600" + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + image: "infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-dataprotection:0.8.1" + imagePullPolicy: IfNotPresent + ports: + - name: webhook-server + containerPort: 9443 + protocol: TCP + - name: health + containerPort: 8081 + protocol: TCP + - name: metrics + containerPort: 8080 + protocol: TCP + livenessProbe: + httpGet: + path: /healthz + port: health + initialDelaySeconds: 15 + periodSeconds: 20 + readinessProbe: + httpGet: + path: /readyz + port: health + initialDelaySeconds: 5 + periodSeconds: 10 + resources: + {} + volumeMounts: + - mountPath: /etc/kubeblocks + name: manager-config + dnsPolicy: ClusterFirst + affinity: + nodeAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - preference: + matchExpressions: + - key: kb-controller + operator: In + values: + - "true" + weight: 100 + tolerations: + - effect: NoSchedule + key: kb-controller + operator: Equal + value: "true" + terminationGracePeriodSeconds: 10 + volumes: + - name: manager-config + configMap: + name: kubeblocks-manager-config +--- +# Source: kubeblocks/templates/deployment.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: kubeblocks + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/component: "apps" +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + strategy: + rollingUpdate: + maxSurge: 1 + maxUnavailable: 40% + type: RollingUpdate + template: + metadata: + labels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + spec: + priorityClassName: + serviceAccountName: kubeblocks + securityContext: + runAsNonRoot: true + initContainers: # only download tools image to local + - name: tools + image: "infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-tools:0.8.1" + imagePullPolicy: IfNotPresent + resources: + {} + command: + - /bin/true + - name: datascript + image: "infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-datascript:0.8.1" + imagePullPolicy: IfNotPresent + resources: + {} + command: + - /bin/true + containers: + - name: manager + args: + - "--health-probe-bind-address=:8081" + - "--metrics-bind-address=:8080" + - "--leader-elect" + - "--zap-devel=false" + - "--zap-time-encoding=iso8601" + - "--zap-encoder=console" + - "--extensions=true" + - "--apps=true" + - "--workloads=true" + env: + - name: CM_NAMESPACE + value: acto-namespace + - name: CM_AFFINITY + value: "{\"nodeAffinity\":{\"preferredDuringSchedulingIgnoredDuringExecution\":[{\"preference\":{\"matchExpressions\":[{\"key\":\"kb-controller\",\"operator\":\"In\",\"values\":[\"true\"]}]},\"weight\":100}]}}" + - name: CM_TOLERATIONS + value: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + - name: KUBEBLOCKS_IMAGE_PULL_POLICY + value: IfNotPresent + - name: KUBEBLOCKS_TOOLS_IMAGE + value: "infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-tools:0.8.1" + - name: KUBEBLOCKS_DATASCRIPT_CLIENTS_IMAGE + value: "infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-datascript:0.8.1" + - name: KUBEBLOCKS_SERVICEACCOUNT_NAME + value: kubeblocks + - name: ENABLE_RBAC_MANAGER + value: "true" + - name: ADDON_JOB_TTL + value: + - name: ADDON_JOB_IMAGE_PULL_POLICY + value: IfNotPresent + - name: KUBEBLOCKS_ADDON_SA_NAME + value: kubeblocks-addon-installer + - name: KUBEBLOCKS_ADDON_HELM_INSTALL_OPTIONS + value: --atomic --cleanup-on-fail --wait --insecure-skip-tls-verify + - name: DP_ENCRYPTION_KEY + valueFrom: + secretKeyRef: + name: kubeblocks-secret + key: dataProtectionEncryptionKey + - name: KUBE_PROVIDER + value: "" + - name: HOST_PORT_INCLUDE_RANGES + value: '1025-65536' + - name: HOST_PORT_EXCLUDE_RANGES + value: '6443,10250,10257,10259,2379-2380,30000-32767' + - name: HOST_PORT_CM_NAME + value: kubeblocks-host-ports + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + image: "infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks:0.8.1" + imagePullPolicy: IfNotPresent + ports: + - name: webhook-server + containerPort: 9443 + protocol: TCP + - name: health + containerPort: 8081 + protocol: TCP + - name: metrics + containerPort: 8080 + protocol: TCP + livenessProbe: + httpGet: + path: /healthz + port: health + initialDelaySeconds: 15 + periodSeconds: 20 + readinessProbe: + httpGet: + path: /readyz + port: health + initialDelaySeconds: 5 + periodSeconds: 10 + resources: + {} + volumeMounts: + - mountPath: /etc/kubeblocks + name: manager-config + dnsPolicy: ClusterFirst + affinity: + nodeAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - preference: + matchExpressions: + - key: kb-controller + operator: In + values: + - "true" + weight: 100 + tolerations: + - effect: NoSchedule + key: kb-controller + operator: Equal + value: "true" + terminationGracePeriodSeconds: 10 + volumes: + - name: manager-config + configMap: + name: kubeblocks-manager-config +--- +# Source: kubeblocks/templates/addons/apecloud-mysql-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: apecloud-mysql + labels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + addon.kubeblocks.io/version: 0.8.0-beta.5 + addon.kubeblocks.io/name: apecloud-mysql + addon.kubeblocks.io/provider: apecloud + addon.kubeblocks.io/model: RDBMS + annotations: + addon.kubeblocks.io/kubeblocks-version: '>=0.7.0' +spec: + description: 'ApeCloud MySQL is a database that is compatible with MySQL syntax and achieves high availability through the utilization of the RAFT consensus protocol.' + type: Helm + helm: + chartLocationURL: file:///apecloud-mysql-0.8.0-beta.5.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + installOptions: + defaultInstallValues: + - enabled: true + installable: + autoInstall: true +--- +# Source: kubeblocks/templates/addons/clickhouse-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: clickhouse + labels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + addon.kubeblocks.io/version: 0.7.1 + addon.kubeblocks.io/name: clickhouse + addon.kubeblocks.io/provider: community + addon.kubeblocks.io/model: RDBMS + annotations: + addon.kubeblocks.io/kubeblocks-version: '>=0.7.0' +spec: + description: 'ClickHouse is an open-source column-oriented OLAP database management system. Use it to boost your database performance while providing linear scalability and hardware efficiency.' + type: Helm + helm: + chartLocationURL: file:///clickhouse-0.7.1.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + installOptions: + defaultInstallValues: + - enabled: true + installable: + autoInstall: true +--- +# Source: kubeblocks/templates/addons/elasticsearch-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: elasticsearch + labels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + addon.kubeblocks.io/version: 0.7.0 + addon.kubeblocks.io/name: elasticsearch + addon.kubeblocks.io/provider: community + addon.kubeblocks.io/model: search-engine + annotations: + addon.kubeblocks.io/kubeblocks-version: '>=0.7.0' +spec: + description: 'Elasticsearch is a distributed search and analytics engine. It is used for web search, log monitoring, and real-time analytics. Ideal for Big Data applications.' + type: Helm + helm: + chartLocationURL: file:///elasticsearch-0.7.0.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + installOptions: + defaultInstallValues: + - enabled: true + installable: + autoInstall: false +--- +# Source: kubeblocks/templates/addons/foxlake-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: foxlake + labels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + addon.kubeblocks.io/version: 0.7.0 + addon.kubeblocks.io/name: foxlake + addon.kubeblocks.io/provider: apecloud + addon.kubeblocks.io/model: RDBMS + annotations: + addon.kubeblocks.io/kubeblocks-version: '>=0.7.0' +spec: + description: 'ApeCloud FoxLake is an open-source cloud-native data warehouse.' + type: Helm + helm: + chartLocationURL: file:///foxlake-0.7.0.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + installOptions: + defaultInstallValues: + - enabled: true + installable: + autoInstall: false +--- +# Source: kubeblocks/templates/addons/kafka-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: kafka + labels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + addon.kubeblocks.io/version: 0.8.0-alpha.5 + addon.kubeblocks.io/name: kafka + addon.kubeblocks.io/provider: community + addon.kubeblocks.io/model: streaming + annotations: + addon.kubeblocks.io/kubeblocks-version: '>=0.7.0' +spec: + description: 'Apache Kafka is a distributed streaming platform designed to build real-time pipelines and can be used as a message broker or as a replacement for a log aggregation solution for big data applications.' + type: Helm + helm: + chartLocationURL: file:///kafka-0.8.0-alpha.5.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + installOptions: + defaultInstallValues: + - enabled: true + installable: + autoInstall: true +--- +# Source: kubeblocks/templates/addons/llm-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: llm + labels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + addon.kubeblocks.io/version: 0.7.0 + addon.kubeblocks.io/name: llm + addon.kubeblocks.io/provider: community + addon.kubeblocks.io/model: LLM + annotations: + addon.kubeblocks.io/kubeblocks-version: '>=0.7.0' +spec: + description: 'Large Language Models.' + type: Helm + helm: + chartLocationURL: file:///llm-0.7.0.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + installOptions: + defaultInstallValues: + - enabled: true + installable: + autoInstall: false +--- +# Source: kubeblocks/templates/addons/milvus-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: milvus + labels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + addon.kubeblocks.io/version: 2.3.2 + addon.kubeblocks.io/name: milvus + addon.kubeblocks.io/provider: community + addon.kubeblocks.io/model: vector + annotations: + addon.kubeblocks.io/kubeblocks-version: '>=0.7.0' +spec: + description: 'Milvus is an open source (Apache-2.0 licensed) vector database built to power embedding similarity search and AI applications.' + type: Helm + helm: + chartLocationURL: file:///milvus-2.3.2.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + installOptions: + defaultInstallValues: + - enabled: true + installable: + autoInstall: false +--- +# Source: kubeblocks/templates/addons/mongodb-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: mongodb + labels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + addon.kubeblocks.io/version: 0.7.0 + addon.kubeblocks.io/name: mongodb + addon.kubeblocks.io/provider: apecloud + addon.kubeblocks.io/model: document + annotations: + addon.kubeblocks.io/kubeblocks-version: '>=0.7.0' +spec: + description: 'MongoDB is a document database designed for ease of application development and scaling.' + type: Helm + helm: + chartLocationURL: file:///mongodb-0.7.0.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + installOptions: + defaultInstallValues: + - enabled: true + installable: + autoInstall: true +--- +# Source: kubeblocks/templates/addons/mysql-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: mysql + labels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + addon.kubeblocks.io/version: 0.7.0 + addon.kubeblocks.io/name: mysql + addon.kubeblocks.io/provider: community + addon.kubeblocks.io/model: RDBMS + annotations: + addon.kubeblocks.io/kubeblocks-version: '>=0.7.0' +spec: + description: 'MySQL is a widely used, open-source relational database management system (RDBMS).' + type: Helm + helm: + chartLocationURL: file:///mysql-0.7.0.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + installOptions: + defaultInstallValues: + - enabled: true + installable: + autoInstall: false +--- +# Source: kubeblocks/templates/addons/oceanbase-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: oceanbase + labels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + addon.kubeblocks.io/version: 0.8.1 + addon.kubeblocks.io/name: oceanbase + addon.kubeblocks.io/provider: community + addon.kubeblocks.io/model: RDBMS + annotations: + addon.kubeblocks.io/kubeblocks-version: '>=0.8.0' +spec: + description: 'OceanBase Database is an enterprise-level native distributed database independently developed by Ant Group.' + type: Helm + helm: + chartLocationURL: file:///oceanbase-0.8.1.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + installOptions: + defaultInstallValues: + - enabled: true + installable: + autoInstall: false +--- +# Source: kubeblocks/templates/addons/opensearch-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: opensearch + labels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + addon.kubeblocks.io/version: 0.7.0 + addon.kubeblocks.io/name: opensearch + addon.kubeblocks.io/provider: community + addon.kubeblocks.io/model: search-engine + annotations: + addon.kubeblocks.io/kubeblocks-version: '>=0.7.0' +spec: + description: 'OpenSearch is a scalable, flexible, and extensible open-source software suite for search, analytics, and observability applications licensed under Apache 2.0.' + type: Helm + helm: + chartLocationURL: file:///opensearch-0.7.0.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + installOptions: + defaultInstallValues: + - enabled: true + installable: + autoInstall: false +--- +# Source: kubeblocks/templates/addons/polardbx-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: polardbx + labels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + addon.kubeblocks.io/version: 0.7.0 + addon.kubeblocks.io/name: polardbx + addon.kubeblocks.io/provider: community + addon.kubeblocks.io/model: RDBMS + annotations: + addon.kubeblocks.io/kubeblocks-version: '>=0.7.0' +spec: + description: 'PolarDB-X is a cloud native distributed SQL Database designed for high concurrency, massive storage, complex querying scenarios.' + type: Helm + helm: + chartLocationURL: file:///polardbx-0.7.0.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + installOptions: + defaultInstallValues: + - enabled: true + installable: + autoInstall: false +--- +# Source: kubeblocks/templates/addons/postgresql-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: postgresql + labels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + addon.kubeblocks.io/version: 0.8.0 + addon.kubeblocks.io/name: postgresql + addon.kubeblocks.io/provider: community + addon.kubeblocks.io/model: RDBMS + annotations: + addon.kubeblocks.io/kubeblocks-version: '>=0.7.0' +spec: + description: 'PostgreSQL (Postgres) is an open source object-relational database known for reliability and data integrity. ACID-compliant, it supports foreign keys, joins, views, triggers and stored procedures.' + type: Helm + helm: + chartLocationURL: file:///postgresql-0.8.0.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + installOptions: + defaultInstallValues: + - enabled: true + installable: + autoInstall: true +--- +# Source: kubeblocks/templates/addons/pulsar-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: pulsar + labels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + addon.kubeblocks.io/version: 0.7.0 + addon.kubeblocks.io/name: pulsar + addon.kubeblocks.io/provider: community + addon.kubeblocks.io/model: streaming + annotations: + addon.kubeblocks.io/kubeblocks-version: '>=0.7.0' +spec: + description: 'Apache® Pulsar™ is an open-source, distributed messaging and streaming platform built for the cloud.' + type: Helm + helm: + chartLocationURL: file:///pulsar-0.7.0.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + installOptions: + defaultInstallValues: + - enabled: true + installable: + autoInstall: true +--- +# Source: kubeblocks/templates/addons/qdrant-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: qdrant + labels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + addon.kubeblocks.io/version: 0.7.0 + addon.kubeblocks.io/name: qdrant + addon.kubeblocks.io/provider: community + addon.kubeblocks.io/model: vector + annotations: + addon.kubeblocks.io/kubeblocks-version: '>=0.7.0' +spec: + description: 'Qdrant is an open source (Apache-2.0 licensed), vector similarity search engine and vector database.' + type: Helm + helm: + chartLocationURL: file:///qdrant-0.7.0.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + installOptions: + defaultInstallValues: + - enabled: true + installable: + autoInstall: false +--- +# Source: kubeblocks/templates/addons/redis-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: redis + labels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + addon.kubeblocks.io/version: 0.8.1 + addon.kubeblocks.io/name: redis + addon.kubeblocks.io/provider: community + addon.kubeblocks.io/model: key-value + annotations: + addon.kubeblocks.io/kubeblocks-version: '>=0.8.0' +spec: + description: 'Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache and message broker.' + type: Helm + helm: + chartLocationURL: file:///redis-0.8.1.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + installOptions: + defaultInstallValues: + - enabled: true + installable: + autoInstall: true +--- +# Source: kubeblocks/templates/addons/weaviate-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: weaviate + labels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + addon.kubeblocks.io/version: 0.8.0 + addon.kubeblocks.io/name: weaviate + addon.kubeblocks.io/provider: community + addon.kubeblocks.io/model: vector + annotations: + addon.kubeblocks.io/kubeblocks-version: '>=0.7.0' +spec: + description: 'Weaviate is an open-source (BSD-3.0 licensed) vector database. It allows you to store data objects and vector embeddings from your favorite ML-models, and scale seamlessly into billions of data objects.' + type: Helm + helm: + chartLocationURL: file:///weaviate-0.8.0.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + installOptions: + defaultInstallValues: + - enabled: true + installable: + autoInstall: false +--- +# Source: kubeblocks/templates/addons/xinference-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: xinference + labels: + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + addon.kubeblocks.io/version: 0.1.0 + addon.kubeblocks.io/name: xinference + addon.kubeblocks.io/provider: community + addon.kubeblocks.io/model: LLM + annotations: + addon.kubeblocks.io/kubeblocks-version: '>=0.7.0' +spec: + description: 'Xorbits Inference(Xinference) is a powerful and versatile library designed to serve language, speech recognition, and multimodal models.' + type: Helm + helm: + chartLocationURL: file:///xinference-0.1.0.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + installOptions: + defaultInstallValues: + - enabled: true + installable: + autoInstall: false +--- +# Source: kubeblocks/templates/applications/alertmanager-webhook-adaptor-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: alertmanager-webhook-adaptor + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + "addon.kubeblocks.io/provider": apecloud + "addon.kubeblocks.io/version": "0.1.4" +spec: + description: 'alertmanager webhook adaptor for extending alertmanager notification channels' + type: Helm + + helm: + chartLocationURL: file:///alertmanager-webhook-adaptor-0.1.4.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + + installOptions: + + installValues: + configMapRefs: + - name: alertmanager-webhook-adaptor-chart-kubeblocks-values + key: values-kubeblocks-override.yaml + + valuesMapping: + valueMap: + replicaCount: replicaCount + + jsonMap: + tolerations: tolerations + + resources: + cpu: + requests: resources.requests.cpu + limits: resources.limits.cpu + memory: + requests: resources.requests.memory + limits: resources.limits.memory + + defaultInstallValues: + - replicas: 1 + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + + installable: + autoInstall: false +--- +# Source: kubeblocks/templates/applications/apecloud-otel-collector-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: apecloud-otel-collector + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + "addon.kubeblocks.io/provider": apecloud + "addon.kubeblocks.io/version": "0.1.2-beta.3" +spec: + description: apecloud-otel-collector is a high-performance data collection agent with luxuriant function, which inspired by OpenTelemetry. + type: Helm + + helm: + chartLocationURL: file:///apecloud-otel-collector-0.1.2-beta.3.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + + installOptions: + + installValues: + configMapRefs: + - name: apecloud-otel-collector-chart-kubeblocks-values + key: values-kubeblocks-override.yaml + + valuesMapping: + valueMap: + + jsonMap: + tolerations: tolerations + + resources: + cpu: + requests: resources.requests.cpu + limits: resources.limits.cpu + memory: + requests: resources.requests.memory + limits: resources.limits.memory + + defaultInstallValues: + - enabled: true + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"},{\"effect\":\"NoSchedule\",\"key\":\"kb-data\",\"operator\":\"Equal\",\"value\":\"true\"}]" + + installable: + autoInstall: false +--- +# Source: kubeblocks/templates/applications/aws-loadbalancer-controller-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: aws-load-balancer-controller + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + "addon.kubeblocks.io/provider": community + "addon.kubeblocks.io/version": "1.4.8" +spec: + description: The AWS Load Balancer Controller manages AWS Elastic Load Balancers for a Kubernetes cluster. + type: Helm + + helm: + chartLocationURL: file:///aws-load-balancer-controller-1.4.8.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + + installOptions: + + installValues: + configMapRefs: + - name: aws-load-balancer-controller-chart-kubeblocks-values + key: values-kubeblocks-override.yaml + + setValues: + - clusterName= + + valuesMapping: + valueMap: + replicaCount: replicaCount + + jsonMap: + tolerations: tolerations + + resources: + cpu: + requests: resources.requests.cpu + limits: resources.limits.cpu + memory: + requests: resources.requests.memory + limits: resources.limits.memory + + defaultInstallValues: + - replicas: 1 + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + + installable: + autoInstall: false + selectors: + - key: KubeGitVersion + operator: Contains + values: + - eks +--- +# Source: kubeblocks/templates/applications/bytebase-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: bytebase + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + "addon.kubeblocks.io/provider": community + "addon.kubeblocks.io/version": "0.7.0" +spec: + description: 'Bytebase is Database DevOps and CI/CD for Developer, DBA and Platform Engineering team.' + type: Helm + + helm: + chartLocationURL: file:///bytebase-0.7.0.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + installOptions: + + installable: + autoInstall: false + + defaultInstallValues: + - enabled: true +--- +# Source: kubeblocks/templates/applications/chaos-mesh-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: fault-chaos-mesh + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + "addon.kubeblocks.io/provider": apecloud + "addon.kubeblocks.io/version": "2.5.2" +spec: + description: 'Chaos Mesh is an open-source chaos engineering tool that facilitates testing the resiliency and reliability of distributed systems by introducing various failure scenarios in a controlled manner.' + + type: Helm + + helm: + chartLocationURL: file:///chaos-mesh-2.5.2.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + + installOptions: + + installValues: + setValues: + - "version=2.5.2" + - "chaosDaemon.privileged=true" + - "dnsServer.create=true" + - "chaosDaemon.runtime=containerd" + - "chaosDaemon.socketPath=/run/containerd/containerd.sock" + - "images.registry=infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com" + - "controllerManager.image.repository=apecloud/chaos-mesh" + - "chaosDaemon.image.repository=apecloud/chaos-daemon" + - "dashboard.image.repository=apecloud/chaos-dashboard" + + valuesMapping: + valueMap: + replicaCount: controllerManager.replicaCount + jsonMap: + tolerations: controllerManager.tolerations + resources: + cpu: + requests: controllerManager.resources.requests.cpu + memory: + requests: controllerManager.resources.requests.memory + + extras: + - name: chaosDaemon + jsonMap: + tolerations: chaosDaemon.tolerations + + - name: dashboard + valueMap: + replicaCount: dashboard.replicaCount + jsonMap: + tolerations: dashboard.tolerations + resources: + cpu: + requests: dashboard.resources.requests.cpu + memory: + requests: dashboard.resources.requests.memory + + - name: dnsServer + jsonMap: + tolerations: dnsServer.tolerations + resources: + cpu: + requests: dnsServer.resources.requests.cpu + memory: + requests: dnsServer.resources.requests.memory + + installable: + autoInstall: false + + defaultInstallValues: + - enabled: false + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + extras: + - name: chaosDaemon + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + - name: dashboard + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + - name: dnsServer + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" +--- +# Source: kubeblocks/templates/applications/csi-driver-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: kubeblocks-csi-driver + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + "addon.kubeblocks.io/provider": community + "addon.kubeblocks.io/version": "0.1.4" +spec: + description: 'KubeBlocks CSI driver provides a container storage interface used by Container Orchestrators + to manage the lifecycle of block storage for cloud vendors.' + type: Helm + + helm: + chartLocationURL: file:///kubeblocks-csi-driver-0.1.4.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + + installOptions: + + valuesMapping: + valueMap: + replicaCount: controller.replicaCount + jsonMap: + tolerations: controller.tolerations + + resources: + cpu: + requests: controller.resources.requests.cpu + limits: controller.resources.limits.cpu + memory: + requests: controller.resources.requests.memory + limits: controller.resources.limits.memory + extras: + - name: node + jsonMap: + tolerations: node.tolerations + + resources: + cpu: + requests: node.resources.requests.cpu + limits: node.resources.limits.cpu + memory: + requests: node.resources.requests.memory + limits: node.resources.limits.memory + + defaultInstallValues: + - enabled: false + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + extras: + - name: node + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + + + installable: + autoInstall: false + selectors: + - key: KubeGitVersion + operator: Contains + values: + - eks +--- +# Source: kubeblocks/templates/applications/csi-driver-nfs-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: csi-driver-nfs + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + "addon.kubeblocks.io/provider": community + "addon.kubeblocks.io/version": "4.5.0" +spec: + description: Container Storage Interface (CSI) driver for NFS based volumes + type: Helm + + helm: + chartLocationURL: file:///csi-driver-nfs-4.5.0.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + + installOptions: + + installValues: + + valuesMapping: + valueMap: + replicaCount: controller.replicas + jsonMap: + tolerations: controller.tolerations + + defaultInstallValues: + - enabled: true + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + + installable: + autoInstall: false +--- +# Source: kubeblocks/templates/applications/csi-hostpath-driver-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: csi-hostpath-driver + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + "addon.kubeblocks.io/provider": community + "addon.kubeblocks.io/version": "0.7.0" +spec: + description: Container Storage Interface (CSI) driver for HostPath volumes + type: Helm + + helm: + chartLocationURL: file:///csi-hostpath-driver-0.7.0.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + + installOptions: + + installValues: + configMapRefs: + - name: csi-hostpath-driver-chart-kubeblocks-values + key: values-kubeblocks-override.yaml + + valuesMapping: + jsonMap: + tolerations: tolerations + + defaultInstallValues: + - enabled: true + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + + installable: + autoInstall: false + selectors: + - key: KubeGitVersion + operator: DoesNotContain + values: + - eks + - aliyun. + - gke + - tke + - aks +--- +# Source: kubeblocks/templates/applications/csi-s3-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: csi-s3 + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + "addon.kubeblocks.io/provider": community + "addon.kubeblocks.io/version": "0.7.0" +spec: + description: Container Storage Interface (CSI) driver for S3 volumes + type: Helm + + helm: + chartLocationURL: file:///csi-s3-0.7.0.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + + installOptions: + + installValues: + secretRefs: + - name: kubeblocks-cloud-provider + key: csi-s3 + + valuesMapping: + jsonMap: + tolerations: tolerations + extras: + - name: daemonset + jsonMap: + tolerations: daemonsetTolerations + + defaultInstallValues: + - enabled: true + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + + installable: + autoInstall: false +--- +# Source: kubeblocks/templates/applications/external-dns-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: external-dns + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + "addon.kubeblocks.io/provider": community + "addon.kubeblocks.io/version": "6.20.4" +spec: + description: >- + ExternalDNS synchronizes exposed Kubernetes Services and Ingresses with DNS providers. + + type: Helm + + helm: + chartLocationURL: file:///external-dns-6.20.4.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + + installOptions: + + installValues: + configMapRefs: + - name: external-dns-chart-kubeblocks-values + key: values-kubeblocks-override.yaml + + valuesMapping: + valueMap: + replicaCount: replicaCount + + jsonMap: + tolerations: tolerations + + resources: + cpu: + requests: resources.requests.cpu + limits: resources.limits.cpu + memory: + requests: resources.requests.memory + limits: resources.limits.memory + + defaultInstallValues: + - replicas: 1 + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + + installable: + autoInstall: false +--- +# Source: kubeblocks/templates/applications/grafana-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: grafana + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + "addon.kubeblocks.io/provider": community + "addon.kubeblocks.io/version": "6.43.5" +spec: + description: The leading tool for querying and visualizing time series and metrics. + type: Helm + + helm: + chartLocationURL: file:///grafana-6.43.5.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + + installOptions: + + installValues: + configMapRefs: + - name: grafana-chart-kubeblocks-values + key: values-kubeblocks-override.yaml + + valuesMapping: + valueMap: + replicaCount: replicas + storageClass: persistence.storageClassName + persistentVolumeEnabled: persistence.enabled + + jsonMap: + tolerations: tolerations + + resources: + storage: persistence.size + cpu: + requests: resources.requests.cpu + limits: resources.limits.cpu + memory: + requests: resources.requests.memory + limits: resources.limits.memory + + defaultInstallValues: + - replicas: 1 + storageClass: + resources: + requests: + storage: 1Gi + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + + - selectors: + - key: KubeGitVersion + operator: Contains + values: + - aliyun + replicas: 1 + resources: + requests: + storage: 20Gi + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + + installable: + autoInstall: false +--- +# Source: kubeblocks/templates/applications/jupyter-notebook-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: jupyter-notebook + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + "addon.kubeblocks.io/provider": community + "addon.kubeblocks.io/version": "0.7.0" +spec: + description: 'Jupyter Notebook: Interactive coding, documentation, and visualization tool with multi-language support for data analysis and education.' + type: Helm + + helm: + chartLocationURL: file:///jupyter-notebook-0.7.0.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + + installOptions: + + installable: + autoInstall: false + + defaultInstallValues: + - enabled: true +--- +# Source: kubeblocks/templates/applications/jupyterhub-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: jupyter-hub + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + "addon.kubeblocks.io/provider": community + "addon.kubeblocks.io/version": "0.1.0" +spec: + description: 'JupyterHub is a multi-user platform for hosting Jupyter Notebooks.' + type: Helm + + helm: + chartLocationURL: file:///jupyterhub-0.1.0.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + + installOptions: + + installable: + autoInstall: false + + defaultInstallValues: + - enabled: true +--- +# Source: kubeblocks/templates/applications/kubebench-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: kubebench + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + "addon.kubeblocks.io/provider": apecloud + "addon.kubeblocks.io/version": "0.0.1" +spec: + description: 'A Kubernetes operator for running benchmark tests on databases to evaluate their performance.' + + type: Helm + + helm: + chartLocationURL: file:///kubebench-0.0.1.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + + installOptions: + + valuesMapping: + valueMap: + replicaCount: replicaCount + + jsonMap: + tolerations: tolerations + + resources: + cpu: + requests: resources.requests.cpu + limits: resources.limits.cpu + memory: + requests: resources.requests.memory + limits: resources.limits.memory + + installable: + autoInstall: false + + defaultInstallValues: + - enabled: true + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" +--- +# Source: kubeblocks/templates/applications/loki-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: loki + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + "addon.kubeblocks.io/provider": community + "addon.kubeblocks.io/version": "5.8.9" +spec: + description: Grafana Loki is a horizontally scalable, highly available, and multi-tenant log aggregation system, which inspired by Prometheus. + type: Helm + + helm: + chartLocationURL: file:///loki-5.8.9.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + + installOptions: + + installValues: + configMapRefs: + - name: loki-chart-kubeblocks-values + key: values-kubeblocks-override.yaml + + valuesMapping: + valueMap: + replicaCount: singleBinary.replicas + storageClass: singleBinary.persistence.storageClass + persistentVolumeEnabled: singleBinary.persistence.enabled + + jsonMap: + tolerations: global.tolerations + + resources: + storage: singleBinary.persistence.size + + defaultInstallValues: + - replicas: 1 + storageClass: + resources: + requests: + storage: 8Gi + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + # for ACK, the smallest storage size is 20Gi, the format of GitVersion is v1.24.6-aliyun.1 + - selectors: + - key: KubeGitVersion + operator: Contains + values: + - aliyun + replicas: 1 + resources: + requests: + storage: 20Gi + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + # for TKE, the smallest storage size is 10Gi, the format of GitVersion is v1.24.4-tke.5 + - selectors: + - key: KubeGitVersion + operator: Contains + values: + - tke + replicas: 1 + resources: + requests: + storage: 10Gi + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + + installable: + autoInstall: false +--- +# Source: kubeblocks/templates/applications/migration-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: migration + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + "addon.kubeblocks.io/provider": apecloud + "addon.kubeblocks.io/version": "0.1.1" +spec: + description: 'Migration is a tool for migrating data between two databases.' + + type: Helm + + helm: + chartLocationURL: file:///dt-platform-0.1.1.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + + installOptions: + + valuesMapping: + valueMap: + replicaCount: replicaCount + + jsonMap: + tolerations: tolerations + + resources: + cpu: + requests: resources.requests.cpu + limits: resources.limits.cpu + memory: + requests: resources.requests.memory + limits: resources.limits.memory + + installable: + autoInstall: false + + defaultInstallValues: + - enabled: true + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" +--- +# Source: kubeblocks/templates/applications/minio.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: minio + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + "addon.kubeblocks.io/provider": community + "addon.kubeblocks.io/version": "12.8.12" +spec: + description: 'MinIO(R) is an object storage server, compatible with Amazon S3 cloud storage service, mainly used for storing unstructured data (such as photos, videos, log files, etc.).' + type: Helm + + helm: + chartLocationURL: file:///minio-12.8.12.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + + installOptions: + + installValues: + setValues: + - auth.rootUser=kubeblocks + - auth.rootPassword=kubeblocks + - extraEnvVars[0].name=MINIO_BROWSER_LOGIN_ANIMATION + - extraEnvVars[0].value=off + installable: + autoInstall: false + + defaultInstallValues: + - enabled: true +--- +# Source: kubeblocks/templates/applications/nvidia-gpu-exporter-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: nvidia-gpu-exporter + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + "addon.kubeblocks.io/provider": community + "addon.kubeblocks.io/version": "0.3.1" +spec: + description: 'Nvidia GPU exporter for prometheus using nvidia-smi binary' + type: Helm + + helm: + chartLocationURL: file:///nvidia-gpu-exporter-0.3.1.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + + installOptions: + + installable: + autoInstall: false + selectors: + - key: KubeGitVersion + operator: Contains + values: + - eks + + defaultInstallValues: + - enabled: true +--- +# Source: kubeblocks/templates/applications/nyancat-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: nyancat + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + "addon.kubeblocks.io/provider": apecloud + "addon.kubeblocks.io/version": "0.7.0" +spec: + description: 'Deploys a nyancat application in a cluster. + Nyancat is a demo application for showing database cluster availability.' + type: Helm + + helm: + chartLocationURL: file:///nyancat-0.7.0.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + + installOptions: + + valuesMapping: + valueMap: + replicaCount: replicaCount + + jsonMap: + tolerations: tolerations + + resources: + cpu: + requests: resources.requests.cpu + limits: resources.limits.cpu + memory: + requests: resources.requests.memory + limits: resources.limits.memory + + defaultInstallValues: + - replicas: 1 + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + + installable: + autoInstall: false +--- +# Source: kubeblocks/templates/applications/prometheus-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: prometheus + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + "addon.kubeblocks.io/provider": community + "addon.kubeblocks.io/version": "15.16.1" +spec: + description: Prometheus is a monitoring system and time series database. + type: Helm + + helm: + chartLocationURL: file:///prometheus-15.16.1.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + + installOptions: + + installValues: + configMapRefs: + - name: prometheus-chart-kubeblocks-values + key: values-kubeblocks-override.yaml + + valuesMapping: + valueMap: + replicaCount: server.replicaCount + storageClass: server.persistentVolume.storageClass + persistentVolumeEnabled: server.persistentVolume.enabled + + jsonMap: + tolerations: server.tolerations + + resources: + storage: server.persistentVolume.size + cpu: + requests: server.resources.requests.cpu + limits: server.resources.limits.cpu + memory: + requests: server.resources.requests.memory + limits: server.resources.limits.memory + extras: + - name: alertmanager + valueMap: + replicaCount: alertmanager.replicaCount + storageClass: alertmanager.persistentVolume.storageClass + persistentVolumeEnabled: alertmanager.persistentVolume.enabled + + jsonMap: + tolerations: alertmanager.tolerations + + resources: + storage: alertmanager.persistentVolume.size + cpu: + requests: alertmanager.resources.requests.cpu + limits: alertmanager.resources.limits.cpu + memory: + requests: alertmanager.resources.requests.memory + limits: alertmanager.resources.limits.memory + + defaultInstallValues: + - replicas: 1 + resources: + requests: + storage: 20Gi + memory: 512Mi + limits: + memory: 4Gi + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + + extras: + - name: alertmanager + replicas: 1 + resources: + requests: + storage: 4Gi + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + + # for ACK, the smallest storage size is 20Gi, the format of GitVersion is v1.24.6-aliyun.1 + - selectors: + - key: KubeGitVersion + operator: Contains + values: + - aliyun + replicas: 1 + resources: + requests: + storage: 20Gi + memory: 512Mi + limits: + memory: 4Gi + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + + extras: + - name: alertmanager + replicas: 1 + resources: + requests: + storage: 20Gi + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + + # for TKE, the smallest storage size is 10Gi, the format of GitVersion is v1.24.4-tke.5 + - selectors: + - key: KubeGitVersion + operator: Contains + values: + - tke + replicas: 1 + resources: + requests: + storage: 20Gi + memory: 512Mi + limits: + memory: 4Gi + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + + extras: + - name: alertmanager + replicas: 1 + resources: + requests: + storage: 10Gi + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + + installable: + autoInstall: false +--- +# Source: kubeblocks/templates/applications/pyroscope-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: pyroscope-server + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + "addon.kubeblocks.io/provider": community + "addon.kubeblocks.io/version": "0.2.92" +spec: + description: Open Source Continuous Profiling Server. + type: Helm + + helm: + chartLocationURL: file:///pyroscope-0.2.92.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + + installOptions: + + valuesMapping: + valueMap: + + jsonMap: + tolerations: tolerations + + resources: + cpu: + requests: resources.requests.cpu + limits: resources.limits.cpu + memory: + requests: resources.requests.memory + limits: resources.limits.memory + + defaultInstallValues: + - enabled: true + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + + installable: + autoInstall: false +--- +# Source: kubeblocks/templates/applications/snapshot-controller-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: snapshot-controller + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + "addon.kubeblocks.io/provider": community + "addon.kubeblocks.io/version": "1.7.2" +spec: + description: 'Deploys a Snapshot Controller in a cluster. Snapshot Controllers are + often bundled with the Kubernetes distribution, this chart is meant for cases where + it is not. ' + type: Helm + + helm: + chartLocationURL: file:///snapshot-controller-1.7.2.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + + installOptions: + + installValues: + configMapRefs: + - name: snapshot-controller-chart-kubeblocks-values + key: values-kubeblocks-override.yaml + + valuesMapping: + valueMap: + replicaCount: replicaCount + storageClass: volumeSnapshotClasses[0].driver + + jsonMap: + tolerations: tolerations + + resources: + cpu: + requests: resources.requests.cpu + limits: resources.limits.cpu + memory: + requests: resources.requests.memory + limits: resources.limits.memory + + defaultInstallValues: + - enabled: true + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + + - selectors: + - key: KubeGitVersion + operator: Contains + values: + - eks + storageClass: ebs.csi.aws.com + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + + - selectors: + - key: KubeGitVersion + operator: Contains + values: + - gke + storageClass: pd.csi.storage.gke.io + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + + - selectors: + - key: KubeGitVersion + operator: Contains + values: + - aks + storageClass: disk.csi.azure.com + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + + installable: + autoInstall: true + selectors: + - key: KubeGitVersion + operator: DoesNotContain + values: + - tke + - aliyun. + - key: KubeProvider + operator: DoesNotContain + values: + - huaweiCloud + - azure +--- +# Source: kubeblocks/templates/applications/vmagent-addon.yaml +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: victoria-metrics-agent + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm + "addon.kubeblocks.io/provider": community + "addon.kubeblocks.io/version": "0.8.41" +spec: + description: 'vmagent is a tiny agent which helps you collect metrics from various sources, relabel and filter the collected metrics and store them in VictoriaMetrics or any other storage systems via Prometheus remote_write protocol.' + type: Helm + + helm: + chartLocationURL: file:///victoria-metrics-agent-0.8.41.tgz + chartsImage: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.1 + chartsPathInImage: /charts + + installOptions: + + valuesMapping: + valueMap: + replicaCount: replicaCount + + jsonMap: + tolerations: tolerations + + resources: + cpu: + requests: resources.requests.cpu + limits: resources.limits.cpu + memory: + requests: resources.requests.memory + limits: resources.limits.memory + + defaultInstallValues: + - replicas: 1 + tolerations: "[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]" + + installable: + autoInstall: false +--- +# Source: kubeblocks/templates/class/componentclassconstraint.yaml +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: ComponentResourceConstraint +metadata: + name: kb-resource-constraint-general + labels: + resourceconstraint.kubeblocks.io/provider: kubeblocks + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +spec: + rules: + - name: general + cpu: + min: "0.5" + max: 64 + step: "0.5" + memory: + minPerCPU: 1Gi + maxPerCPU: 32Gi + storage: + min: 20Gi + max: 10Ti +--- +# Source: kubeblocks/templates/opsdefinition.yaml +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsDefinition +metadata: + name: switchover +spec: + varsRef: + podSelectionStrategy: Available + vars: + - name: TARGET_POD_IP + valueFrom: + envVarRef: + envName: KB_POD_IP + - name: LORRY_HTTP_PORT + valueFrom: + envVarRef: + envName: LORRY_HTTP_PORT + parametersSchema: + openAPIV3Schema: + properties: + primary: + description: "old primary instance name(pod Name)." + type: string + candidate: + description: | + candidate instance name(pod Name). if candidate is not empty, will promote it to primary. + otherwise promote a randomly selected pod to primary. + type: string + type: object + jobSpec: + backoffLimit: 0 + template: + spec: + containers: + - name: switchover + image: docker.io/apecloud/kubeblocks-tools:latest + imagePullPolicy: IfNotPresent + command: + - sh + - -c + - | + set -e + # do switchover + url="http://${TARGET_POD_IP}:${LORRY_HTTP_PORT}/v1.0/switchover" + params="{\"parameters\": {\"primary\":\"${primary}\",\"candidate\":\"${candidate}\"}}" + echo "curl ${url}, parameters: ${params}" + res=`curl -s -X POST -H 'Content-Type: application/json' "${url}" -d "${params}"` + echo "curl result: ${res}" + + # check if switchover successfully. + echo "INFO: start to check if switchover successfully, timeout is 60s" + executedUnix=$(date +%s) + while true; do + sleep 5 + if [ ! -z ${candidate} ]; then + # if candidate specified, only check it + role=$(kubectl get pod ${candidate} -ojson | jq -r '.metadata.labels["kubeblocks.io/role"]') + if [ "$role" == "primary" ] || [ "$role" == "leader" ] || [ "$role" == "master" ]; then + echo "INFO: switchover successfully, ${candidate} is ${role}" + exit 0 + fi + else + # check if the candidate instance has been promote to primary + pods=$(kubectl get pod -l apps.kubeblocks.io/component-name=${KB_COMP_NAME},app.kubernetes.io/instance=${KB_CLUSTER_NAME} | awk 'NR > 1 {print $1}') + for podName in ${pods}; do + if [ "${podName}" != "${primary}" ];then + role=$(kubectl get pod ${podName} -ojson | jq -r '.metadata.labels["kubeblocks.io/role"]') + if [ "$role" == "primary" ] || [ "$role" == "leader" ] || [ "$role" == "master" ]; then + echo "INFO: switchover successfully, ${podName} is ${role}" + exit 0 + fi + fi + done + fi + currentUnix=$(date +%s) + diff_time=$((${currentUnix}-${executedUnix})) + if [ ${diff_time} -ge 60 ]; then + echo "ERROR: switchover failed." + exit 1 + fi + done + preConditions: + - rule: + expression: '{{ eq .component.status.phase "Running" }}' + message: "Component is not in Running status." +--- +# Source: kubeblocks/templates/storageprovider/cos.yaml +# cos is a storage provider for [Tencent Cloud Object Storage](https://cloud.tencent.com/product/cos) +apiVersion: storage.kubeblocks.io/v1alpha1 +kind: StorageProvider +metadata: + name: cos + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +spec: + csiDriverName: ru.yandex.s3.csi + csiDriverSecretTemplate: | + accessKeyID: {{ index .Parameters "accessKeyId" }} + secretAccessKey: {{ index .Parameters "secretAccessKey" }} + {{- $region := index .Parameters "region" }} + {{- $endpoint := index .Parameters "endpoint" }} + {{- if not $endpoint }} + {{- $endpoint = (printf "https://cos.%s.myqcloud.com" $region) }} + {{- end }} + endpoint: {{ $endpoint }} + + storageClassTemplate: | + provisioner: ru.yandex.s3.csi + parameters: + mounter: geesefs + # you can set mount options here, for example limit memory cache size (recommended) + options: {{ printf "--memory-limit 64 --dir-mode 0777 --file-mode 0666 %s --subdomain" (index .Parameters "mountOptions") }} + bucket: {{ index .Parameters "bucket" }} + csi.storage.k8s.io/provisioner-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/provisioner-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/controller-publish-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/controller-publish-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/node-stage-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/node-stage-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/node-publish-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/node-publish-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + + datasafedConfigTemplate: | + [storage] + type = s3 + provider = TencentCOS + env_auth = false + access_key_id = {{ index .Parameters "accessKeyId" }} + secret_access_key = {{ index .Parameters "secretAccessKey" }} + endpoint = {{ printf "cos.%s.myqcloud.com" .Parameters.region }} + root = {{ index .Parameters "bucket" }} + chunk_size = 50Mi + + parametersSchema: + openAPIV3Schema: + type: "object" + properties: + region: + type: string + description: "COS region, e.g. cn-guangzhou" + bucket: + type: string + description: "COS bucket" + endpoint: + type: string + description: "COS endpoint (optional)" + mountOptions: + type: string + description: "mount options for geesefs" + accessKeyId: + type: string + description: "COS access key" + secretAccessKey: + type: string + description: "COS secret key" + + required: + - bucket + - region + - accessKeyId + - secretAccessKey + + credentialFields: + - accessKeyId + - secretAccessKey +--- +# Source: kubeblocks/templates/storageprovider/ftp.yaml +apiVersion: storage.kubeblocks.io/v1alpha1 +kind: StorageProvider +metadata: + name: ftp + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +spec: + datasafedConfigTemplate: | + [storage] + type = ftp + host = {{ .Parameters.ftpHost }} + port = {{ if ne .Parameters.ftpPort "0" }}{{ .Parameters.ftpPort }}{{ else }}21{{ end }} + user = {{ .Parameters.ftpUser }} + pass.need_obscure = {{ .Parameters.ftpPassword }} + tls = {{ .Parameters.ftpTls | default false }} + + parametersSchema: + openAPIV3Schema: + type: "object" + properties: + ftpHost: + type: string + description: "Host of the FTP server" + ftpPort: + type: integer + description: "Port of the FTP server (optional)" + default: 21 + ftpUser: + type: string + description: "the FTP user" + ftpPassword: + type: string + description: "the password of the user" + ftpTls: + type: boolean + description: "enable FTP over TLS (optional)" + default: false + + required: + - ftpHost + - ftpUser + - ftpPassword + + credentialFields: + - ftpUser + - ftpPassword +--- +# Source: kubeblocks/templates/storageprovider/gcs-s3comp.yaml +# gcs-s3comp is a storage provider for [Google Cloud Storage](https://cloud.google.com/storage/), by using its S3-compatible API. +apiVersion: storage.kubeblocks.io/v1alpha1 +kind: StorageProvider +metadata: + name: gcs-s3comp + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +spec: + csiDriverName: ru.yandex.s3.csi + csiDriverSecretTemplate: | + {{- $endpoint := index .Parameters "endpoint" }} + {{- if not $endpoint }} + {{- $endpoint = (printf "https://storage.googleapis.com") }} + {{- end }} + accessKeyID: {{ index .Parameters "accessKeyId" }} + secretAccessKey: {{ index .Parameters "secretAccessKey" }} + endpoint: {{ $endpoint }} + + storageClassTemplate: | + provisioner: ru.yandex.s3.csi + parameters: + mounter: geesefs + # you can set mount options here, for example limit memory cache size (recommended) + options: {{ printf "--memory-limit 64 --dir-mode 0777 --file-mode 0666 %s --subdomain" (index .Parameters "mountOptions") }} + bucket: {{ index .Parameters "bucket" }} + csi.storage.k8s.io/provisioner-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/provisioner-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/controller-publish-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/controller-publish-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/node-stage-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/node-stage-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/node-publish-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/node-publish-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + + datasafedConfigTemplate: | + [storage] + type = s3 + provider = GCS + env_auth = false + access_key_id = {{ index .Parameters "accessKeyId" }} + secret_access_key = {{ index .Parameters "secretAccessKey" }} + {{- $endpoint := index .Parameters "endpoint" }} + {{- if not $endpoint }} + {{- $endpoint = (printf "https://storage.googleapis.com") }} + {{- end }} + endpoint = {{ $endpoint }} + root = {{ index .Parameters "bucket" }} + chunk_size = 50Mi + + parametersSchema: + openAPIV3Schema: + type: "object" + properties: + region: + type: string + description: "GCS region, e.g. auto" + bucket: + type: string + description: "GCS bucket" + endpoint: + type: string + description: "GCS endpoint (optional)" + mountOptions: + type: string + description: "mount options for geesefs" + accessKeyId: + type: string + description: "GCS access key" + secretAccessKey: + type: string + description: "GCS secret key" + + required: + - bucket + - region + - accessKeyId + - secretAccessKey + + credentialFields: + - accessKeyId + - secretAccessKey +--- +# Source: kubeblocks/templates/storageprovider/minio.yaml +apiVersion: storage.kubeblocks.io/v1alpha1 +kind: StorageProvider +metadata: + name: minio + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +spec: + csiDriverName: ru.yandex.s3.csi + csiDriverSecretTemplate: | + accessKeyID: {{ index .Parameters "accessKeyId" }} + secretAccessKey: {{ index .Parameters "secretAccessKey" }} + endpoint: {{ index .Parameters "endpoint" }} + + storageClassTemplate: | + provisioner: ru.yandex.s3.csi + parameters: + mounter: geesefs + # you can set mount options here, for example limit memory cache size (recommended) + options: {{ printf "--memory-limit 64 --dir-mode 0777 --file-mode 0666 %s" (index .Parameters "mountOptions") }} + bucket: {{ index .Parameters "bucket" }} + csi.storage.k8s.io/provisioner-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/provisioner-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/controller-publish-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/controller-publish-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/node-stage-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/node-stage-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/node-publish-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/node-publish-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + + datasafedConfigTemplate: | + [storage] + type = s3 + provider = Minio + env_auth = false + access_key_id = {{ index .Parameters "accessKeyId" }} + secret_access_key = {{ index .Parameters "secretAccessKey" }} + endpoint = {{ index .Parameters "endpoint" }} + root = {{ index .Parameters "bucket" }} + chunk_size = 50Mi + + parametersSchema: + openAPIV3Schema: + type: "object" + properties: + bucket: + type: string + description: "MinIO bucket" + endpoint: + type: string + description: "MinIO endpoint" + mountOptions: + type: string + description: "mount options for geesefs" + accessKeyId: + type: string + description: "MinIO access key" + secretAccessKey: + type: string + description: "MinIO secret key" + + required: + - bucket + - endpoint + - accessKeyId + - secretAccessKey + + credentialFields: + - accessKeyId + - secretAccessKey +--- +# Source: kubeblocks/templates/storageprovider/nfs.yaml +apiVersion: storage.kubeblocks.io/v1alpha1 +kind: StorageProvider +metadata: + name: nfs + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +spec: + csiDriverName: nfs.csi.k8s.io + + storageClassTemplate: | + provisioner: nfs.csi.k8s.io + parameters: + server: {{ .Parameters.nfsServer }} + share: {{ .Parameters.nfsShare }} + subDir: {{ .Parameters.nfsSubDir }} + mountPermissions: "0777" + {{- if .Parameters.nfsMountOptions }} + {{- $options := splitList " " .Parameters.nfsMountOptions }} + mountOptions: {{ $options | toJson }} + {{- end }} + + parametersSchema: + openAPIV3Schema: + type: "object" + properties: + nfsServer: + type: string + description: "NFS Server address" + nfsShare: + type: string + description: "NFS share path" + default: "/" + nfsSubDir: + type: string + description: "sub directory under nfs share" + nfsMountOptions: + type: string + description: "extra mount options" + + required: + - nfsServer +--- +# Source: kubeblocks/templates/storageprovider/obs.yaml +# obs is a storage provider for [Huawei OBS](https://www.huaweicloud.com/product/obs.html) object storage. +apiVersion: storage.kubeblocks.io/v1alpha1 +kind: StorageProvider +metadata: + name: obs + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +spec: + csiDriverName: ru.yandex.s3.csi + csiDriverSecretTemplate: | + accessKeyID: {{ index .Parameters "accessKeyId" }} + secretAccessKey: {{ index .Parameters "secretAccessKey" }} + {{- $region := index .Parameters "region" }} + {{- $endpoint := index .Parameters "endpoint" }} + {{- if not $endpoint }} + {{- $endpoint = (printf "https://obs.%s.myhuaweicloud.com" $region) }} + {{- end }} + endpoint: {{ $endpoint }} + + storageClassTemplate: | + provisioner: ru.yandex.s3.csi + parameters: + mounter: geesefs + # you can set mount options here, for example limit memory cache size (recommended) + options: {{ printf "--memory-limit 64 --dir-mode 0777 --file-mode 0666 %s --subdomain" (index .Parameters "mountOptions") }} + bucket: {{ index .Parameters "bucket" }} + csi.storage.k8s.io/provisioner-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/provisioner-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/controller-publish-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/controller-publish-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/node-stage-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/node-stage-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/node-publish-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/node-publish-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + + datasafedConfigTemplate: | + [storage] + type = s3 + provider = HuaweiOBS + env_auth = false + access_key_id = {{ index .Parameters "accessKeyId" }} + secret_access_key = {{ index .Parameters "secretAccessKey" }} + region = {{ index .Parameters "region" }} + endpoint = {{ printf "obs.%s.myhuaweicloud.com" .Parameters.region }} + root = {{ index .Parameters "bucket" }} + chunk_size = 50Mi + + parametersSchema: + openAPIV3Schema: + type: "object" + properties: + region: + type: string + description: "OBS region, e.g. cn-north-4" + bucket: + type: string + description: "OBS bucket" + endpoint: + type: string + description: "OBS endpoint (optional)" + mountOptions: + type: string + description: "mount options for geesefs" + accessKeyId: + type: string + description: "OBS access key" + secretAccessKey: + type: string + description: "OBS secret key" + + required: + - bucket + - region + - accessKeyId + - secretAccessKey + + credentialFields: + - accessKeyId + - secretAccessKey +--- +# Source: kubeblocks/templates/storageprovider/oss.yaml +apiVersion: storage.kubeblocks.io/v1alpha1 +kind: StorageProvider +metadata: + name: oss + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +spec: + csiDriverName: ru.yandex.s3.csi + csiDriverSecretTemplate: | + accessKeyID: {{ index .Parameters "accessKeyId" }} + secretAccessKey: {{ index .Parameters "secretAccessKey" }} + {{- $region := index .Parameters "region" }} + {{- $endpoint := index .Parameters "endpoint" }} + {{- if not $endpoint }} + {{- $endpoint = (printf "https://oss-%s.aliyuncs.com" $region) }} + {{- end }} + endpoint: {{ $endpoint }} + + storageClassTemplate: | + provisioner: ru.yandex.s3.csi + parameters: + mounter: geesefs + # you can set mount options here, for example limit memory cache size (recommended) + options: {{ printf "--memory-limit 64 --dir-mode 0777 --file-mode 0666 %s --subdomain" (index .Parameters "mountOptions") }} + bucket: {{ index .Parameters "bucket" }} + csi.storage.k8s.io/provisioner-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/provisioner-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/controller-publish-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/controller-publish-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/node-stage-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/node-stage-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/node-publish-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/node-publish-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + + datasafedConfigTemplate: | + [storage] + type = s3 + provider = Alibaba + env_auth = false + access_key_id = {{ index .Parameters "accessKeyId" }} + secret_access_key = {{ index .Parameters "secretAccessKey" }} + endpoint = {{- printf "oss-%s.aliyuncs.com" .Parameters.region }} + root = {{ index .Parameters "bucket" }} + chunk_size = 50Mi + + parametersSchema: + openAPIV3Schema: + type: "object" + properties: + region: + type: string + description: "OSS region, e.g. cn-hangzhou" + bucket: + type: string + description: "OSS bucket" + endpoint: + type: string + description: "OSS endpoint (optional)" + mountOptions: + type: string + description: "mount options for geesefs" + accessKeyId: + type: string + description: "OSS access key" + secretAccessKey: + type: string + description: "OSS secret key" + + required: + - bucket + - region + - accessKeyId + - secretAccessKey + + credentialFields: + - accessKeyId + - secretAccessKey +--- +# Source: kubeblocks/templates/storageprovider/pvc.yaml +apiVersion: storage.kubeblocks.io/v1alpha1 +kind: StorageProvider +metadata: + name: pvc + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +spec: + persistentVolumeClaimTemplate: | + spec: + storageClassName: {{ .Parameters.storageClassName | default "" }} + accessModes: + - {{ .Parameters.accessMode | default "ReadWriteOnce" }} + volumeMode: {{ .Parameters.volumeMode | default "Filesystem" }} + + parametersSchema: + openAPIV3Schema: + type: "object" + properties: + storageClassName: + type: string + description: "the name of the StorageClass used to create the PVC" + accessMode: + type: string + description: "the access mode used to create the PVC" + default: "ReadWriteOnce" + enum: ["ReadWriteOnce", "ReadWriteMany", "ReadWriteOncePod"] + volumeMode: + type: string + description: "the volume mode used to create the PVC" + default: "Filesystem" + enum: ["Filesystem", "Block"] +--- +# Source: kubeblocks/templates/storageprovider/s3.yaml +apiVersion: storage.kubeblocks.io/v1alpha1 +kind: StorageProvider +metadata: + name: s3 + labels: + helm.sh/chart: kubeblocks-0.8.1 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblocks + app.kubernetes.io/version: "0.8.1" + app.kubernetes.io/managed-by: Helm +spec: + csiDriverName: ru.yandex.s3.csi + csiDriverSecretTemplate: | + accessKeyID: {{ index .Parameters "accessKeyId" }} + secretAccessKey: {{ index .Parameters "secretAccessKey" }} + {{- $region := index .Parameters "region" }} + {{- $endpoint := index .Parameters "endpoint" }} + {{- if not $endpoint }} + {{- if hasPrefix "cn-" $region }} + {{- $endpoint = (printf "https://s3.%s.amazonaws.com.cn" $region) }} + {{- else }} + {{- $endpoint = (printf "https://s3.%s.amazonaws.com" $region) }} + {{- end }} + {{- end }} + endpoint: {{ $endpoint }} + + storageClassTemplate: | + provisioner: ru.yandex.s3.csi + parameters: + mounter: geesefs + # you can set mount options here, for example limit memory cache size (recommended) + options: {{ printf "--memory-limit 64 --dir-mode 0777 --file-mode 0666 %s --region %s" (index .Parameters "mountOptions") (index .Parameters "region") }} + bucket: {{ index .Parameters "bucket" }} + csi.storage.k8s.io/provisioner-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/provisioner-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/controller-publish-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/controller-publish-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/node-stage-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/node-stage-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + csi.storage.k8s.io/node-publish-secret-name: {{ .CSIDriverSecretRef.Name }} + csi.storage.k8s.io/node-publish-secret-namespace: {{ .CSIDriverSecretRef.Namespace }} + + datasafedConfigTemplate: | + [storage] + type = s3 + provider = AWS + env_auth = false + access_key_id = {{ index .Parameters "accessKeyId" }} + secret_access_key = {{ index .Parameters "secretAccessKey" }} + region = {{ index .Parameters "region" }} + endpoint = {{ index .Parameters "endpoint" }} + root = {{ index .Parameters "bucket" }} + chunk_size = 50Mi + + parametersSchema: + openAPIV3Schema: + type: "object" + properties: + region: + type: string + description: "AWS region, e.g. us-west-1" + bucket: + type: string + description: "S3 bucket" + endpoint: + type: string + description: "S3 endpoint (optional)" + mountOptions: + type: string + description: "mount options for geesefs" + accessKeyId: + type: string + description: "AWS access key" + secretAccessKey: + type: string + description: "AWS secret key" + + required: + - bucket + - region + - accessKeyId + - secretAccessKey + + credentialFields: + - accessKeyId + - secretAccessKey + diff --git a/data/kubeblocks-postgresql-operator/postgresql_manifest.yaml b/data/kubeblocks-postgresql-operator/postgresql_manifest.yaml new file mode 100644 index 0000000000..e69de29bb2