From e6ad6ad3ae19e73c492b5f4821b38e3d341e8e58 Mon Sep 17 00:00:00 2001 From: Shiori Date: Mon, 29 Nov 2021 11:13:07 +0800 Subject: [PATCH 01/28] add types --- pkg/apis/pingcap/v1alpha1/ngmonitor_types.go | 91 ++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 pkg/apis/pingcap/v1alpha1/ngmonitor_types.go diff --git a/pkg/apis/pingcap/v1alpha1/ngmonitor_types.go b/pkg/apis/pingcap/v1alpha1/ngmonitor_types.go new file mode 100644 index 00000000000..ac555e40bda --- /dev/null +++ b/pkg/apis/pingcap/v1alpha1/ngmonitor_types.go @@ -0,0 +1,91 @@ +// Copyright 2020 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1alpha1 + +import ( + apps "k8s.io/api/apps/v1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// TidbMonitor contains the spec and status of tidb ng monitor +// +// +k8s:openapi-gen=true +// +kubebuilder:resource:shortName="tnm" +type TiDBNGMonitor struct { + metav1.TypeMeta `json:",inline"` + // +k8s:openapi-gen=false + metav1.ObjectMeta `json:"metadata"` + + // Spec contains all spec about tidb ng monitor + Spec TiDBNGMonitorSpec `json:"spec"` + + // Status is most recently observed status of tidb ng monitor + // + // +k8s:openapi-gen=false + Status TiDBNGMonitorStatus `json:"status,omitempty"` +} + +type TiDBNGMonitorList struct { + metav1.TypeMeta `json:",inline"` + // +k8s:openapi-gen=false + metav1.ListMeta `json:"metadata"` + + Items []TiDBNGMonitor `json:"items"` +} + +// +k8s:openapi-gen=true +type TiDBNGMonitorSpec struct { + // ComponentSpec is common spec. + // NOTE: the same field will be overridden by component's spec. + ComponentSpec `json:",inline"` + + // Clusters reference TiDB cluster + Clusters []TidbClusterRef `json:"clusters"` +} + +type TiDBNGMonitorStatus struct { + Monitor MonitorStatus `json:"monitor,omitempty"` +} + +// MonitorSpec is spec of ng monitor +// +// +k8s:openapi-gen=true +type MonitorSpec struct { + ComponentSpec `json:",inline"` + corev1.ResourceRequirements `json:",inline"` + + // The desired ready replicas + // + // +kubebuilder:validation:Minimum=0 + // +kubebuilder:validation:Maximum=1 + Replicas int32 `json:"replicas"` + + // Base image of the component, image tag is now allowed during validation + // + // +kubebuilder:default=pingcap/ng-monitor + BaseImage string `json:"baseImage"` + + // StorageClassName is the persistent volume for ng monitor. + // Defaults to Kubernetes default storage class. + StorageClassName *string `json:"storageClassName,omitempty"` +} + +// MonitorStatus is latest status of ng monitor +type MonitorStatus struct { + Synced bool `json:"synced,omitempty"` + Phase MemberPhase `json:"phase,omitempty"` + + StatefulSet *apps.StatefulSetStatus `json:"statefulSet,omitempty"` +} From 32d6881703bf2e7f2513ee89107ddb70b2bb5a24 Mon Sep 17 00:00:00 2001 From: Shiori Date: Mon, 29 Nov 2021 14:00:53 +0800 Subject: [PATCH 02/28] update all --- docs/api-references/docs.md | 298 +++ manifests/crd.yaml | 2352 +++++++++++++++++ .../crd/v1/pingcap.com_tidbngmonitors.yaml | 2352 +++++++++++++++++ .../v1beta1/pingcap.com_tidbngmonitors.yaml | 2352 +++++++++++++++++ manifests/crd_v1beta1.yaml | 2352 +++++++++++++++++ .../pingcap/v1alpha1/openapi_generated.go | 738 +++++- .../pingcap/v1alpha1/zz_generated.deepcopy.go | 128 + 7 files changed, 10501 insertions(+), 71 deletions(-) create mode 100644 manifests/crd/v1/pingcap.com_tidbngmonitors.yaml create mode 100644 manifests/crd/v1beta1/pingcap.com_tidbngmonitors.yaml diff --git a/docs/api-references/docs.md b/docs/api-references/docs.md index bd3deb9a2c6..bc8202a7d8c 100644 --- a/docs/api-references/docs.md +++ b/docs/api-references/docs.md @@ -4130,9 +4130,11 @@ and component-level overrides

DMDiscoverySpec, DiscoverySpec, MasterSpec, +MonitorSpec, PDSpec, PumpSpec, TiCDCSpec, +TiDBNGMonitorSpec, TiDBSpec, TiFlashSpec, TiKVSpec, @@ -7835,6 +7837,7 @@ string

(Appears on: MasterStatus, +MonitorStatus, PDStatus, PumpStatus, TiCDCStatus, @@ -7923,6 +7926,136 @@ Kubernetes core/v1.PullPolicy +

MonitorSpec

+

+

MonitorSpec is spec of ng monitor

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+ComponentSpec
+ + +ComponentSpec + + +
+

+(Members of ComponentSpec are embedded into this type.) +

+
+ResourceRequirements
+ + +Kubernetes core/v1.ResourceRequirements + + +
+

+(Members of ResourceRequirements are embedded into this type.) +

+
+replicas
+ +int32 + +
+

The desired ready replicas

+
+baseImage
+ +string + +
+

Base image of the component, image tag is now allowed during validation

+
+storageClassName
+ +string + +
+

StorageClassName is the persistent volume for ng monitor. +Defaults to Kubernetes default storage class.

+
+

MonitorStatus

+

+(Appears on: +TiDBNGMonitorStatus) +

+

+

MonitorStatus is latest status of ng monitor

+

+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+synced
+ +bool + +
+
+phase
+ + +MemberPhase + + +
+
+statefulSet
+ + +Kubernetes apps/v1.StatefulSetStatus + + +
+

Networks

(Appears on: @@ -14226,6 +14359,170 @@ string +

TiDBNGMonitor

+

+

TidbMonitor contains the spec and status of tidb ng monitor

+

+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +TiDBNGMonitorSpec + + +
+

Spec contains all spec about tidb ng monitor

+
+
+ + + + + + + + + +
+ComponentSpec
+ + +ComponentSpec + + +
+

+(Members of ComponentSpec are embedded into this type.) +

+

ComponentSpec is common spec. +NOTE: the same field will be overridden by component’s spec.

+
+clusters
+ + +[]TidbClusterRef + + +
+

Clusters reference TiDB cluster

+
+
+status
+ + +TiDBNGMonitorStatus + + +
+

Status is most recently observed status of tidb ng monitor

+
+

TiDBNGMonitorSpec

+

+(Appears on: +TiDBNGMonitor) +

+

+

+ + + + + + + + + + + + + + + + + +
FieldDescription
+ComponentSpec
+ + +ComponentSpec + + +
+

+(Members of ComponentSpec are embedded into this type.) +

+

ComponentSpec is common spec. +NOTE: the same field will be overridden by component’s spec.

+
+clusters
+ + +[]TidbClusterRef + + +
+

Clusters reference TiDB cluster

+
+

TiDBNGMonitorStatus

+

+(Appears on: +TiDBNGMonitor) +

+

+

+ + + + + + + + + + + + + +
FieldDescription
+monitor
+ + +MonitorStatus + + +
+

TiDBProbe

(Appears on: @@ -20204,6 +20501,7 @@ string

TidbClusterRef

(Appears on: +TiDBNGMonitorSpec, TidbClusterAutoScalerSpec, TidbClusterSpec, TidbInitializerSpec, diff --git a/manifests/crd.yaml b/manifests/crd.yaml index 0e3cd6820fe..1d6f8538936 100644 --- a/manifests/crd.yaml +++ b/manifests/crd.yaml @@ -31903,3 +31903,2355 @@ status: plural: "" conditions: [] storedVersions: [] + +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.6.2 + creationTimestamp: null + name: tidbngmonitors.pingcap.com +spec: + group: pingcap.com + names: + kind: TiDBNGMonitor + listKind: TiDBNGMonitorList + plural: tidbngmonitors + shortNames: + - tnm + singular: tidbngmonitor + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + additionalContainers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + 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 + 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 + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + additionalVolumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + additionalVolumes: + items: + properties: + awsElasticBlockStore: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + azureDisk: + properties: + cachingMode: + type: string + diskName: + type: string + diskURI: + type: string + fsType: + type: string + kind: + type: string + readOnly: + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + properties: + readOnly: + type: boolean + secretName: + type: string + shareName: + type: string + required: + - secretName + - shareName + type: object + cephfs: + properties: + monitors: + items: + type: string + type: array + path: + type: string + readOnly: + type: boolean + secretFile: + type: string + secretRef: + properties: + name: + type: string + type: object + user: + type: string + required: + - monitors + type: object + cinder: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + volumeID: + type: string + required: + - volumeID + type: object + configMap: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + csi: + properties: + driver: + type: string + fsType: + type: string + nodePublishSecretRef: + properties: + name: + type: string + type: object + readOnly: + type: boolean + volumeAttributes: + additionalProperties: + type: string + type: object + required: + - driver + type: object + downwardAPI: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + emptyDir: + properties: + medium: + type: string + sizeLimit: + 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: object + ephemeral: + properties: + readOnly: + type: boolean + volumeClaimTemplate: + properties: + metadata: + type: object + spec: + properties: + accessModes: + items: + type: string + type: array + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + resources: + 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 + 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 + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + storageClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object + required: + - spec + type: object + type: object + fc: + properties: + fsType: + type: string + lun: + format: int32 + type: integer + readOnly: + type: boolean + targetWWNs: + items: + type: string + type: array + wwids: + items: + type: string + type: array + type: object + flexVolume: + properties: + driver: + type: string + fsType: + type: string + options: + additionalProperties: + type: string + type: object + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + required: + - driver + type: object + flocker: + properties: + datasetName: + type: string + datasetUUID: + type: string + type: object + gcePersistentDisk: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + pdName: + type: string + readOnly: + type: boolean + required: + - pdName + type: object + gitRepo: + properties: + directory: + type: string + repository: + type: string + revision: + type: string + required: + - repository + type: object + glusterfs: + properties: + endpoints: + type: string + path: + type: string + readOnly: + type: boolean + required: + - endpoints + - path + type: object + hostPath: + properties: + path: + type: string + type: + type: string + required: + - path + type: object + iscsi: + properties: + chapAuthDiscovery: + type: boolean + chapAuthSession: + type: boolean + fsType: + type: string + initiatorName: + type: string + iqn: + type: string + iscsiInterface: + type: string + lun: + format: int32 + type: integer + portals: + items: + type: string + type: array + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + targetPortal: + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + type: string + nfs: + properties: + path: + type: string + readOnly: + type: boolean + server: + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + properties: + claimName: + type: string + readOnly: + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + properties: + fsType: + type: string + pdID: + type: string + required: + - pdID + type: object + portworxVolume: + properties: + fsType: + type: string + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + projected: + properties: + defaultMode: + format: int32 + type: integer + sources: + items: + properties: + configMap: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + downwardAPI: + properties: + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + secret: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + serviceAccountToken: + properties: + audience: + type: string + expirationSeconds: + format: int64 + type: integer + path: + type: string + required: + - path + type: object + type: object + type: array + required: + - sources + type: object + quobyte: + properties: + group: + type: string + readOnly: + type: boolean + registry: + type: string + tenant: + type: string + user: + type: string + volume: + type: string + required: + - registry + - volume + type: object + rbd: + properties: + fsType: + type: string + image: + type: string + keyring: + type: string + monitors: + items: + type: string + type: array + pool: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + user: + type: string + required: + - image + - monitors + type: object + scaleIO: + properties: + fsType: + type: string + gateway: + type: string + protectionDomain: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + sslEnabled: + type: boolean + storageMode: + type: string + storagePool: + type: string + system: + type: string + volumeName: + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + optional: + type: boolean + secretName: + type: string + type: object + storageos: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + volumeName: + type: string + volumeNamespace: + type: string + type: object + vsphereVolume: + properties: + fsType: + type: string + storagePolicyID: + type: string + storagePolicyName: + type: string + volumePath: + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + affinity: + properties: + nodeAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + preference: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + weight: + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + properties: + nodeSelectorTerms: + items: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + type: array + required: + - nodeSelectorTerms + type: object + type: object + podAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + type: object + podAntiAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + type: object + type: object + annotations: + additionalProperties: + type: string + type: object + clusters: + items: + properties: + clusterDomain: + type: string + name: + type: string + namespace: + type: string + required: + - name + type: object + type: array + configUpdateStrategy: + type: string + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + hostNetwork: + type: boolean + image: + type: string + imagePullPolicy: + type: string + imagePullSecrets: + items: + properties: + name: + type: string + type: object + type: array + initContainers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + 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 + 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 + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + labels: + additionalProperties: + type: string + type: object + nodeSelector: + additionalProperties: + type: string + type: object + podManagementPolicy: + type: string + podSecurityContext: + properties: + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + supplementalGroups: + items: + format: int64 + type: integer + type: array + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + priorityClassName: + type: string + schedulerName: + type: string + statefulSetUpdateStrategy: + type: string + terminationGracePeriodSeconds: + format: int64 + type: integer + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + items: + properties: + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + x-kubernetes-list-map-keys: + - topologyKey + x-kubernetes-list-type: map + version: + type: string + required: + - clusters + type: object + status: + properties: + monitor: + properties: + phase: + type: string + statefulSet: + properties: + collisionCount: + format: int32 + type: integer + conditions: + items: + properties: + lastTransitionTime: + format: date-time + type: string + message: + type: string + reason: + type: string + status: + type: string + type: + type: string + required: + - status + - type + type: object + type: array + currentReplicas: + format: int32 + type: integer + currentRevision: + type: string + observedGeneration: + format: int64 + type: integer + readyReplicas: + format: int32 + type: integer + replicas: + format: int32 + type: integer + updateRevision: + type: string + updatedReplicas: + format: int32 + type: integer + required: + - replicas + type: object + synced: + type: boolean + type: object + type: object + required: + - metadata + - spec + type: object + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/manifests/crd/v1/pingcap.com_tidbngmonitors.yaml b/manifests/crd/v1/pingcap.com_tidbngmonitors.yaml new file mode 100644 index 00000000000..babb5914a9f --- /dev/null +++ b/manifests/crd/v1/pingcap.com_tidbngmonitors.yaml @@ -0,0 +1,2352 @@ + +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.6.2 + creationTimestamp: null + name: tidbngmonitors.pingcap.com +spec: + group: pingcap.com + names: + kind: TiDBNGMonitor + listKind: TiDBNGMonitorList + plural: tidbngmonitors + shortNames: + - tnm + singular: tidbngmonitor + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + additionalContainers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + 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 + 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 + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + additionalVolumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + additionalVolumes: + items: + properties: + awsElasticBlockStore: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + azureDisk: + properties: + cachingMode: + type: string + diskName: + type: string + diskURI: + type: string + fsType: + type: string + kind: + type: string + readOnly: + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + properties: + readOnly: + type: boolean + secretName: + type: string + shareName: + type: string + required: + - secretName + - shareName + type: object + cephfs: + properties: + monitors: + items: + type: string + type: array + path: + type: string + readOnly: + type: boolean + secretFile: + type: string + secretRef: + properties: + name: + type: string + type: object + user: + type: string + required: + - monitors + type: object + cinder: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + volumeID: + type: string + required: + - volumeID + type: object + configMap: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + csi: + properties: + driver: + type: string + fsType: + type: string + nodePublishSecretRef: + properties: + name: + type: string + type: object + readOnly: + type: boolean + volumeAttributes: + additionalProperties: + type: string + type: object + required: + - driver + type: object + downwardAPI: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + emptyDir: + properties: + medium: + type: string + sizeLimit: + 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: object + ephemeral: + properties: + readOnly: + type: boolean + volumeClaimTemplate: + properties: + metadata: + type: object + spec: + properties: + accessModes: + items: + type: string + type: array + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + resources: + 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 + 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 + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + storageClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object + required: + - spec + type: object + type: object + fc: + properties: + fsType: + type: string + lun: + format: int32 + type: integer + readOnly: + type: boolean + targetWWNs: + items: + type: string + type: array + wwids: + items: + type: string + type: array + type: object + flexVolume: + properties: + driver: + type: string + fsType: + type: string + options: + additionalProperties: + type: string + type: object + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + required: + - driver + type: object + flocker: + properties: + datasetName: + type: string + datasetUUID: + type: string + type: object + gcePersistentDisk: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + pdName: + type: string + readOnly: + type: boolean + required: + - pdName + type: object + gitRepo: + properties: + directory: + type: string + repository: + type: string + revision: + type: string + required: + - repository + type: object + glusterfs: + properties: + endpoints: + type: string + path: + type: string + readOnly: + type: boolean + required: + - endpoints + - path + type: object + hostPath: + properties: + path: + type: string + type: + type: string + required: + - path + type: object + iscsi: + properties: + chapAuthDiscovery: + type: boolean + chapAuthSession: + type: boolean + fsType: + type: string + initiatorName: + type: string + iqn: + type: string + iscsiInterface: + type: string + lun: + format: int32 + type: integer + portals: + items: + type: string + type: array + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + targetPortal: + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + type: string + nfs: + properties: + path: + type: string + readOnly: + type: boolean + server: + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + properties: + claimName: + type: string + readOnly: + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + properties: + fsType: + type: string + pdID: + type: string + required: + - pdID + type: object + portworxVolume: + properties: + fsType: + type: string + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + projected: + properties: + defaultMode: + format: int32 + type: integer + sources: + items: + properties: + configMap: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + downwardAPI: + properties: + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + secret: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + serviceAccountToken: + properties: + audience: + type: string + expirationSeconds: + format: int64 + type: integer + path: + type: string + required: + - path + type: object + type: object + type: array + required: + - sources + type: object + quobyte: + properties: + group: + type: string + readOnly: + type: boolean + registry: + type: string + tenant: + type: string + user: + type: string + volume: + type: string + required: + - registry + - volume + type: object + rbd: + properties: + fsType: + type: string + image: + type: string + keyring: + type: string + monitors: + items: + type: string + type: array + pool: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + user: + type: string + required: + - image + - monitors + type: object + scaleIO: + properties: + fsType: + type: string + gateway: + type: string + protectionDomain: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + sslEnabled: + type: boolean + storageMode: + type: string + storagePool: + type: string + system: + type: string + volumeName: + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + optional: + type: boolean + secretName: + type: string + type: object + storageos: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + volumeName: + type: string + volumeNamespace: + type: string + type: object + vsphereVolume: + properties: + fsType: + type: string + storagePolicyID: + type: string + storagePolicyName: + type: string + volumePath: + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + affinity: + properties: + nodeAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + preference: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + weight: + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + properties: + nodeSelectorTerms: + items: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + type: array + required: + - nodeSelectorTerms + type: object + type: object + podAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + type: object + podAntiAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + type: object + type: object + annotations: + additionalProperties: + type: string + type: object + clusters: + items: + properties: + clusterDomain: + type: string + name: + type: string + namespace: + type: string + required: + - name + type: object + type: array + configUpdateStrategy: + type: string + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + hostNetwork: + type: boolean + image: + type: string + imagePullPolicy: + type: string + imagePullSecrets: + items: + properties: + name: + type: string + type: object + type: array + initContainers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + 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 + 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 + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + labels: + additionalProperties: + type: string + type: object + nodeSelector: + additionalProperties: + type: string + type: object + podManagementPolicy: + type: string + podSecurityContext: + properties: + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + supplementalGroups: + items: + format: int64 + type: integer + type: array + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + priorityClassName: + type: string + schedulerName: + type: string + statefulSetUpdateStrategy: + type: string + terminationGracePeriodSeconds: + format: int64 + type: integer + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + items: + properties: + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + x-kubernetes-list-map-keys: + - topologyKey + x-kubernetes-list-type: map + version: + type: string + required: + - clusters + type: object + status: + properties: + monitor: + properties: + phase: + type: string + statefulSet: + properties: + collisionCount: + format: int32 + type: integer + conditions: + items: + properties: + lastTransitionTime: + format: date-time + type: string + message: + type: string + reason: + type: string + status: + type: string + type: + type: string + required: + - status + - type + type: object + type: array + currentReplicas: + format: int32 + type: integer + currentRevision: + type: string + observedGeneration: + format: int64 + type: integer + readyReplicas: + format: int32 + type: integer + replicas: + format: int32 + type: integer + updateRevision: + type: string + updatedReplicas: + format: int32 + type: integer + required: + - replicas + type: object + synced: + type: boolean + type: object + type: object + required: + - metadata + - spec + type: object + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/manifests/crd/v1beta1/pingcap.com_tidbngmonitors.yaml b/manifests/crd/v1beta1/pingcap.com_tidbngmonitors.yaml new file mode 100644 index 00000000000..26ff8e5909e --- /dev/null +++ b/manifests/crd/v1beta1/pingcap.com_tidbngmonitors.yaml @@ -0,0 +1,2352 @@ + +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.6.2 + creationTimestamp: null + name: tidbngmonitors.pingcap.com +spec: + group: pingcap.com + names: + kind: TiDBNGMonitor + listKind: TiDBNGMonitorList + plural: tidbngmonitors + shortNames: + - tnm + singular: tidbngmonitor + preserveUnknownFields: false + scope: Namespaced + validation: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + additionalContainers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + 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 + 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 + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + additionalVolumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + additionalVolumes: + items: + properties: + awsElasticBlockStore: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + azureDisk: + properties: + cachingMode: + type: string + diskName: + type: string + diskURI: + type: string + fsType: + type: string + kind: + type: string + readOnly: + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + properties: + readOnly: + type: boolean + secretName: + type: string + shareName: + type: string + required: + - secretName + - shareName + type: object + cephfs: + properties: + monitors: + items: + type: string + type: array + path: + type: string + readOnly: + type: boolean + secretFile: + type: string + secretRef: + properties: + name: + type: string + type: object + user: + type: string + required: + - monitors + type: object + cinder: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + volumeID: + type: string + required: + - volumeID + type: object + configMap: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + csi: + properties: + driver: + type: string + fsType: + type: string + nodePublishSecretRef: + properties: + name: + type: string + type: object + readOnly: + type: boolean + volumeAttributes: + additionalProperties: + type: string + type: object + required: + - driver + type: object + downwardAPI: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + emptyDir: + properties: + medium: + type: string + sizeLimit: + 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: object + ephemeral: + properties: + readOnly: + type: boolean + volumeClaimTemplate: + properties: + metadata: + type: object + spec: + properties: + accessModes: + items: + type: string + type: array + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + resources: + 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 + 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 + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + storageClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object + required: + - spec + type: object + type: object + fc: + properties: + fsType: + type: string + lun: + format: int32 + type: integer + readOnly: + type: boolean + targetWWNs: + items: + type: string + type: array + wwids: + items: + type: string + type: array + type: object + flexVolume: + properties: + driver: + type: string + fsType: + type: string + options: + additionalProperties: + type: string + type: object + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + required: + - driver + type: object + flocker: + properties: + datasetName: + type: string + datasetUUID: + type: string + type: object + gcePersistentDisk: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + pdName: + type: string + readOnly: + type: boolean + required: + - pdName + type: object + gitRepo: + properties: + directory: + type: string + repository: + type: string + revision: + type: string + required: + - repository + type: object + glusterfs: + properties: + endpoints: + type: string + path: + type: string + readOnly: + type: boolean + required: + - endpoints + - path + type: object + hostPath: + properties: + path: + type: string + type: + type: string + required: + - path + type: object + iscsi: + properties: + chapAuthDiscovery: + type: boolean + chapAuthSession: + type: boolean + fsType: + type: string + initiatorName: + type: string + iqn: + type: string + iscsiInterface: + type: string + lun: + format: int32 + type: integer + portals: + items: + type: string + type: array + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + targetPortal: + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + type: string + nfs: + properties: + path: + type: string + readOnly: + type: boolean + server: + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + properties: + claimName: + type: string + readOnly: + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + properties: + fsType: + type: string + pdID: + type: string + required: + - pdID + type: object + portworxVolume: + properties: + fsType: + type: string + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + projected: + properties: + defaultMode: + format: int32 + type: integer + sources: + items: + properties: + configMap: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + downwardAPI: + properties: + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + secret: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + serviceAccountToken: + properties: + audience: + type: string + expirationSeconds: + format: int64 + type: integer + path: + type: string + required: + - path + type: object + type: object + type: array + required: + - sources + type: object + quobyte: + properties: + group: + type: string + readOnly: + type: boolean + registry: + type: string + tenant: + type: string + user: + type: string + volume: + type: string + required: + - registry + - volume + type: object + rbd: + properties: + fsType: + type: string + image: + type: string + keyring: + type: string + monitors: + items: + type: string + type: array + pool: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + user: + type: string + required: + - image + - monitors + type: object + scaleIO: + properties: + fsType: + type: string + gateway: + type: string + protectionDomain: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + sslEnabled: + type: boolean + storageMode: + type: string + storagePool: + type: string + system: + type: string + volumeName: + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + optional: + type: boolean + secretName: + type: string + type: object + storageos: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + volumeName: + type: string + volumeNamespace: + type: string + type: object + vsphereVolume: + properties: + fsType: + type: string + storagePolicyID: + type: string + storagePolicyName: + type: string + volumePath: + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + affinity: + properties: + nodeAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + preference: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + weight: + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + properties: + nodeSelectorTerms: + items: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + type: array + required: + - nodeSelectorTerms + type: object + type: object + podAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + type: object + podAntiAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + type: object + type: object + annotations: + additionalProperties: + type: string + type: object + clusters: + items: + properties: + clusterDomain: + type: string + name: + type: string + namespace: + type: string + required: + - name + type: object + type: array + configUpdateStrategy: + type: string + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + hostNetwork: + type: boolean + image: + type: string + imagePullPolicy: + type: string + imagePullSecrets: + items: + properties: + name: + type: string + type: object + type: array + initContainers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + 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 + 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 + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + labels: + additionalProperties: + type: string + type: object + nodeSelector: + additionalProperties: + type: string + type: object + podManagementPolicy: + type: string + podSecurityContext: + properties: + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + supplementalGroups: + items: + format: int64 + type: integer + type: array + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + priorityClassName: + type: string + schedulerName: + type: string + statefulSetUpdateStrategy: + type: string + terminationGracePeriodSeconds: + format: int64 + type: integer + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + items: + properties: + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + x-kubernetes-list-map-keys: + - topologyKey + x-kubernetes-list-type: map + version: + type: string + required: + - clusters + type: object + status: + properties: + monitor: + properties: + phase: + type: string + statefulSet: + properties: + collisionCount: + format: int32 + type: integer + conditions: + items: + properties: + lastTransitionTime: + format: date-time + type: string + message: + type: string + reason: + type: string + status: + type: string + type: + type: string + required: + - status + - type + type: object + type: array + currentReplicas: + format: int32 + type: integer + currentRevision: + type: string + observedGeneration: + format: int64 + type: integer + readyReplicas: + format: int32 + type: integer + replicas: + format: int32 + type: integer + updateRevision: + type: string + updatedReplicas: + format: int32 + type: integer + required: + - replicas + type: object + synced: + type: boolean + type: object + type: object + required: + - metadata + - spec + type: object + version: v1alpha1 + versions: + - name: v1alpha1 + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/manifests/crd_v1beta1.yaml b/manifests/crd_v1beta1.yaml index 64dcda552fe..05fe0294c57 100644 --- a/manifests/crd_v1beta1.yaml +++ b/manifests/crd_v1beta1.yaml @@ -31881,3 +31881,2355 @@ status: plural: "" conditions: [] storedVersions: [] + +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.6.2 + creationTimestamp: null + name: tidbngmonitors.pingcap.com +spec: + group: pingcap.com + names: + kind: TiDBNGMonitor + listKind: TiDBNGMonitorList + plural: tidbngmonitors + shortNames: + - tnm + singular: tidbngmonitor + preserveUnknownFields: false + scope: Namespaced + validation: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + additionalContainers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + 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 + 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 + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + additionalVolumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + additionalVolumes: + items: + properties: + awsElasticBlockStore: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + azureDisk: + properties: + cachingMode: + type: string + diskName: + type: string + diskURI: + type: string + fsType: + type: string + kind: + type: string + readOnly: + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + properties: + readOnly: + type: boolean + secretName: + type: string + shareName: + type: string + required: + - secretName + - shareName + type: object + cephfs: + properties: + monitors: + items: + type: string + type: array + path: + type: string + readOnly: + type: boolean + secretFile: + type: string + secretRef: + properties: + name: + type: string + type: object + user: + type: string + required: + - monitors + type: object + cinder: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + volumeID: + type: string + required: + - volumeID + type: object + configMap: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + csi: + properties: + driver: + type: string + fsType: + type: string + nodePublishSecretRef: + properties: + name: + type: string + type: object + readOnly: + type: boolean + volumeAttributes: + additionalProperties: + type: string + type: object + required: + - driver + type: object + downwardAPI: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + emptyDir: + properties: + medium: + type: string + sizeLimit: + 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: object + ephemeral: + properties: + readOnly: + type: boolean + volumeClaimTemplate: + properties: + metadata: + type: object + spec: + properties: + accessModes: + items: + type: string + type: array + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + resources: + 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 + 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 + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + storageClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object + required: + - spec + type: object + type: object + fc: + properties: + fsType: + type: string + lun: + format: int32 + type: integer + readOnly: + type: boolean + targetWWNs: + items: + type: string + type: array + wwids: + items: + type: string + type: array + type: object + flexVolume: + properties: + driver: + type: string + fsType: + type: string + options: + additionalProperties: + type: string + type: object + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + required: + - driver + type: object + flocker: + properties: + datasetName: + type: string + datasetUUID: + type: string + type: object + gcePersistentDisk: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + pdName: + type: string + readOnly: + type: boolean + required: + - pdName + type: object + gitRepo: + properties: + directory: + type: string + repository: + type: string + revision: + type: string + required: + - repository + type: object + glusterfs: + properties: + endpoints: + type: string + path: + type: string + readOnly: + type: boolean + required: + - endpoints + - path + type: object + hostPath: + properties: + path: + type: string + type: + type: string + required: + - path + type: object + iscsi: + properties: + chapAuthDiscovery: + type: boolean + chapAuthSession: + type: boolean + fsType: + type: string + initiatorName: + type: string + iqn: + type: string + iscsiInterface: + type: string + lun: + format: int32 + type: integer + portals: + items: + type: string + type: array + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + targetPortal: + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + type: string + nfs: + properties: + path: + type: string + readOnly: + type: boolean + server: + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + properties: + claimName: + type: string + readOnly: + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + properties: + fsType: + type: string + pdID: + type: string + required: + - pdID + type: object + portworxVolume: + properties: + fsType: + type: string + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + projected: + properties: + defaultMode: + format: int32 + type: integer + sources: + items: + properties: + configMap: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + downwardAPI: + properties: + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + secret: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + serviceAccountToken: + properties: + audience: + type: string + expirationSeconds: + format: int64 + type: integer + path: + type: string + required: + - path + type: object + type: object + type: array + required: + - sources + type: object + quobyte: + properties: + group: + type: string + readOnly: + type: boolean + registry: + type: string + tenant: + type: string + user: + type: string + volume: + type: string + required: + - registry + - volume + type: object + rbd: + properties: + fsType: + type: string + image: + type: string + keyring: + type: string + monitors: + items: + type: string + type: array + pool: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + user: + type: string + required: + - image + - monitors + type: object + scaleIO: + properties: + fsType: + type: string + gateway: + type: string + protectionDomain: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + sslEnabled: + type: boolean + storageMode: + type: string + storagePool: + type: string + system: + type: string + volumeName: + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + optional: + type: boolean + secretName: + type: string + type: object + storageos: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + volumeName: + type: string + volumeNamespace: + type: string + type: object + vsphereVolume: + properties: + fsType: + type: string + storagePolicyID: + type: string + storagePolicyName: + type: string + volumePath: + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + affinity: + properties: + nodeAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + preference: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + weight: + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + properties: + nodeSelectorTerms: + items: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + type: array + required: + - nodeSelectorTerms + type: object + type: object + podAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + type: object + podAntiAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + type: object + type: object + annotations: + additionalProperties: + type: string + type: object + clusters: + items: + properties: + clusterDomain: + type: string + name: + type: string + namespace: + type: string + required: + - name + type: object + type: array + configUpdateStrategy: + type: string + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + hostNetwork: + type: boolean + image: + type: string + imagePullPolicy: + type: string + imagePullSecrets: + items: + properties: + name: + type: string + type: object + type: array + initContainers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + 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 + 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 + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + labels: + additionalProperties: + type: string + type: object + nodeSelector: + additionalProperties: + type: string + type: object + podManagementPolicy: + type: string + podSecurityContext: + properties: + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + supplementalGroups: + items: + format: int64 + type: integer + type: array + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + priorityClassName: + type: string + schedulerName: + type: string + statefulSetUpdateStrategy: + type: string + terminationGracePeriodSeconds: + format: int64 + type: integer + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + items: + properties: + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + x-kubernetes-list-map-keys: + - topologyKey + x-kubernetes-list-type: map + version: + type: string + required: + - clusters + type: object + status: + properties: + monitor: + properties: + phase: + type: string + statefulSet: + properties: + collisionCount: + format: int32 + type: integer + conditions: + items: + properties: + lastTransitionTime: + format: date-time + type: string + message: + type: string + reason: + type: string + status: + type: string + type: + type: string + required: + - status + - type + type: object + type: array + currentReplicas: + format: int32 + type: integer + currentRevision: + type: string + observedGeneration: + format: int64 + type: integer + readyReplicas: + format: int32 + type: integer + replicas: + format: int32 + type: integer + updateRevision: + type: string + updatedReplicas: + format: int32 + type: integer + required: + - replicas + type: object + synced: + type: boolean + type: object + type: object + required: + - metadata + - spec + type: object + version: v1alpha1 + versions: + - name: v1alpha1 + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/pkg/apis/pingcap/v1alpha1/openapi_generated.go b/pkg/apis/pingcap/v1alpha1/openapi_generated.go index 76d9a0e17e8..11af86ba6e4 100644 --- a/pkg/apis/pingcap/v1alpha1/openapi_generated.go +++ b/pkg/apis/pingcap/v1alpha1/openapi_generated.go @@ -74,6 +74,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.MasterKeyKMSConfig": schema_pkg_apis_pingcap_v1alpha1_MasterKeyKMSConfig(ref), "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.MasterSpec": schema_pkg_apis_pingcap_v1alpha1_MasterSpec(ref), "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.MonitorContainer": schema_pkg_apis_pingcap_v1alpha1_MonitorContainer(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.MonitorSpec": schema_pkg_apis_pingcap_v1alpha1_MonitorSpec(ref), "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.OpenTracing": schema_pkg_apis_pingcap_v1alpha1_OpenTracing(ref), "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.OpenTracingReporter": schema_pkg_apis_pingcap_v1alpha1_OpenTracingReporter(ref), "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.OpenTracingSampler": schema_pkg_apis_pingcap_v1alpha1_OpenTracingSampler(ref), @@ -117,6 +118,8 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiCDCSpec": schema_pkg_apis_pingcap_v1alpha1_TiCDCSpec(ref), "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBAccessConfig": schema_pkg_apis_pingcap_v1alpha1_TiDBAccessConfig(ref), "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBConfig": schema_pkg_apis_pingcap_v1alpha1_TiDBConfig(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBNGMonitor": schema_pkg_apis_pingcap_v1alpha1_TiDBNGMonitor(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBNGMonitorSpec": schema_pkg_apis_pingcap_v1alpha1_TiDBNGMonitorSpec(ref), "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBProbe": schema_pkg_apis_pingcap_v1alpha1_TiDBProbe(ref), "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBServiceSpec": schema_pkg_apis_pingcap_v1alpha1_TiDBServiceSpec(ref), "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBSlowLogTailerSpec": schema_pkg_apis_pingcap_v1alpha1_TiDBSlowLogTailerSpec(ref), @@ -3541,6 +3544,303 @@ func schema_pkg_apis_pingcap_v1alpha1_MonitorContainer(ref common.ReferenceCallb } } +func schema_pkg_apis_pingcap_v1alpha1_MonitorSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MonitorSpec is spec of ng monitor", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "version": { + SchemaProps: spec.SchemaProps{ + Description: "Version of the component. Override the cluster-level version if non-empty Optional: Defaults to cluster-level setting", + Type: []string{"string"}, + Format: "", + }, + }, + "imagePullPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "ImagePullPolicy of the component. Override the cluster-level imagePullPolicy if present Optional: Defaults to cluster-level setting", + Type: []string{"string"}, + Format: "", + }, + }, + "imagePullSecrets": { + SchemaProps: spec.SchemaProps{ + Description: "ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + }, + }, + }, + }, + }, + "hostNetwork": { + SchemaProps: spec.SchemaProps{ + Description: "Whether Hostnetwork of the component is enabled. Override the cluster-level setting if present Optional: Defaults to cluster-level setting", + Type: []string{"boolean"}, + Format: "", + }, + }, + "affinity": { + SchemaProps: spec.SchemaProps{ + Description: "Affinity of the component. Override the cluster-level setting if present. Optional: Defaults to cluster-level setting", + Ref: ref("k8s.io/api/core/v1.Affinity"), + }, + }, + "priorityClassName": { + SchemaProps: spec.SchemaProps{ + Description: "PriorityClassName of the component. Override the cluster-level one if present Optional: Defaults to cluster-level setting", + Type: []string{"string"}, + Format: "", + }, + }, + "schedulerName": { + SchemaProps: spec.SchemaProps{ + Description: "SchedulerName of the component. Override the cluster-level one if present Optional: Defaults to cluster-level setting", + Type: []string{"string"}, + Format: "", + }, + }, + "nodeSelector": { + SchemaProps: spec.SchemaProps{ + Description: "NodeSelector of the component. Merged into the cluster-level nodeSelector if non-empty Optional: Defaults to cluster-level setting", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "annotations": { + SchemaProps: spec.SchemaProps{ + Description: "Annotations for the component. Merge into the cluster-level annotations if non-empty Optional: Defaults to cluster-level setting", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "labels": { + SchemaProps: spec.SchemaProps{ + Description: "Labels for the component. Merge into the cluster-level labels if non-empty Optional: Defaults to cluster-level setting", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "tolerations": { + SchemaProps: spec.SchemaProps{ + Description: "Tolerations of the component. Override the cluster-level tolerations if non-empty Optional: Defaults to cluster-level setting", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.Toleration"), + }, + }, + }, + }, + }, + "podSecurityContext": { + SchemaProps: spec.SchemaProps{ + Description: "PodSecurityContext of the component", + Ref: ref("k8s.io/api/core/v1.PodSecurityContext"), + }, + }, + "configUpdateStrategy": { + SchemaProps: spec.SchemaProps{ + Description: "ConfigUpdateStrategy of the component. Override the cluster-level updateStrategy if present Optional: Defaults to cluster-level setting", + Type: []string{"string"}, + Format: "", + }, + }, + "env": { + SchemaProps: spec.SchemaProps{ + Description: "List of environment variables to set in the container, like v1.Container.Env. Note that the following env names cannot be used and will be overridden by TiDB Operator builtin envs - NAMESPACE - TZ - SERVICE_NAME - PEER_SERVICE_NAME - HEADLESS_SERVICE_NAME - SET_NAME - HOSTNAME - CLUSTER_NAME - POD_NAME - BINLOG_ENABLED - SLOW_LOG_FILE", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.EnvVar"), + }, + }, + }, + }, + }, + "initContainers": { + SchemaProps: spec.SchemaProps{ + Description: "Init containers of the components", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.Container"), + }, + }, + }, + }, + }, + "additionalContainers": { + SchemaProps: spec.SchemaProps{ + Description: "Additional containers of the component.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.Container"), + }, + }, + }, + }, + }, + "additionalVolumes": { + SchemaProps: spec.SchemaProps{ + Description: "Additional volumes of component pod.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.Volume"), + }, + }, + }, + }, + }, + "additionalVolumeMounts": { + SchemaProps: spec.SchemaProps{ + Description: "Additional volume mounts of component pod.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.VolumeMount"), + }, + }, + }, + }, + }, + "terminationGracePeriodSeconds": { + SchemaProps: spec.SchemaProps{ + 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 delete immediately. 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.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "statefulSetUpdateStrategy": { + SchemaProps: spec.SchemaProps{ + Description: "StatefulSetUpdateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template.", + Type: []string{"string"}, + Format: "", + }, + }, + "podManagementPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "PodManagementPolicy of TiDB cluster StatefulSets", + Type: []string{"string"}, + Format: "", + }, + }, + "topologySpreadConstraints": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "topologyKey", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + 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. This field is is only honored by clusters that enables the EvenPodsSpread feature. All topologySpreadConstraints are ANDed.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TopologySpreadConstraint"), + }, + }, + }, + }, + }, + "limits": { + SchemaProps: spec.SchemaProps{ + Description: "Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + }, + }, + "requests": { + SchemaProps: spec.SchemaProps{ + Description: "Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + }, + }, + "replicas": { + SchemaProps: spec.SchemaProps{ + Description: "The desired ready replicas", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "baseImage": { + SchemaProps: spec.SchemaProps{ + Description: "Base image of the component, image tag is now allowed during validation", + Type: []string{"string"}, + Format: "", + }, + }, + "storageClassName": { + SchemaProps: spec.SchemaProps{ + Description: "StorageClassName is the persistent volume for ng monitor. Defaults to Kubernetes default storage class.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"replicas", "baseImage"}, + }, + }, + Dependencies: []string{ + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TopologySpreadConstraint", "k8s.io/api/core/v1.Affinity", "k8s.io/api/core/v1.Container", "k8s.io/api/core/v1.EnvVar", "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PodSecurityContext", "k8s.io/api/core/v1.Toleration", "k8s.io/api/core/v1.Volume", "k8s.io/api/core/v1.VolumeMount", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + } +} + func schema_pkg_apis_pingcap_v1alpha1_OpenTracing(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -7023,79 +7323,304 @@ func schema_pkg_apis_pingcap_v1alpha1_TiDBConfig(ref common.ReferenceCallback) c }, "proxy-protocol": { SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.ProxyProtocol"), + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.ProxyProtocol"), + }, + }, + "tikv-client": { + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVClient"), + }, + }, + "binlog": { + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.Binlog"), + }, + }, + "compatible-kill-query": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + "plugin": { + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.Plugin"), + }, + }, + "pessimistic-txn": { + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PessimisticTxn"), + }, + }, + "check-mb4-value-in-utf8": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Defaults to true", + Type: []string{"boolean"}, + Format: "", + }, + }, + "alter-primary-key": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Defaults to false", + Type: []string{"boolean"}, + Format: "", + }, + }, + "treat-old-version-utf8-as-utf8mb4": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Defaults to true", + Type: []string{"boolean"}, + Format: "", + }, + }, + "split-region-max-num": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Defaults to 1000", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "stmt-summary": { + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.StmtSummary"), + }, + }, + "repair-mode": { + SchemaProps: spec.SchemaProps{ + Description: "RepairMode indicates that the TiDB is in the repair mode for table meta.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "repair-table-list": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "isolation-read": { + SchemaProps: spec.SchemaProps{ + Description: "IsolationRead indicates that the TiDB reads data from which isolation level(engine and label).", + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.IsolationRead"), + }, + }, + "max-server-connections": { + SchemaProps: spec.SchemaProps{ + Description: "MaxServerConnections is the maximum permitted number of simultaneous client connections.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "new_collations_enabled_on_first_bootstrap": { + SchemaProps: spec.SchemaProps{ + Description: "NewCollationsEnabledOnFirstBootstrap indicates if the new collations are enabled, it effects only when a TiDB cluster bootstrapped on the first time.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "experimental": { + SchemaProps: spec.SchemaProps{ + Description: "Experimental contains parameters for experimental features.", + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.Experimental"), + }, + }, + "enable-dynamic-config": { + SchemaProps: spec.SchemaProps{ + Description: "EnableDynamicConfig enables the TiDB to fetch configs from PD and update itself during runtime. see https://github.com/pingcap/tidb/pull/13660 for more details.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "enable-table-lock": { + SchemaProps: spec.SchemaProps{ + Description: "imported from v3.1.0", + Type: []string{"boolean"}, + Format: "", + }, + }, + "delay-clean-table-lock": { + SchemaProps: spec.SchemaProps{ + Description: "imported from v3.1.0", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "skip-register-to-dashboard": { + SchemaProps: spec.SchemaProps{ + Description: "imported from v4.0.5 SkipRegisterToDashboard tells TiDB don't register itself to the dashboard.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "enable-telemetry": { + SchemaProps: spec.SchemaProps{ + Description: "When enabled, usage data (for example, instance versions) will be reported to PingCAP periodically for user experience analytics. If this config is set to `false` on all TiDB servers, telemetry will be always disabled regardless of the value of the global variable `tidb_enable_telemetry`. See PingCAP privacy policy for details: https://pingcap.com/en/privacy-policy/. Imported from v4.0.2. Optional: Defaults to true", + Type: []string{"boolean"}, + Format: "", + }, + }, + "labels": { + SchemaProps: spec.SchemaProps{ + Description: "Labels are labels for TiDB server", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.Binlog", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.Experimental", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.IsolationRead", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.Log", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.OpenTracing", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.Performance", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PessimisticTxn", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.Plugin", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PreparedPlanCache", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.ProxyProtocol", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.Security", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.Status", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.StmtSummary", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVClient", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TxnLocalLatches"}, + } +} + +func schema_pkg_apis_pingcap_v1alpha1_TiDBNGMonitor(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TidbMonitor contains the spec and status of tidb ng monitor", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + 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{"string"}, + Format: "", }, }, - "tikv-client": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVClient"), + 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{"string"}, + Format: "", }, }, - "binlog": { + "spec": { SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.Binlog"), + Description: "Spec contains all spec about tidb ng monitor", + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBNGMonitorSpec"), }, }, - "compatible-kill-query": { + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBNGMonitorSpec"}, + } +} + +func schema_pkg_apis_pingcap_v1alpha1_TiDBNGMonitorSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "version": { SchemaProps: spec.SchemaProps{ - Type: []string{"boolean"}, - Format: "", + Description: "Version of the component. Override the cluster-level version if non-empty Optional: Defaults to cluster-level setting", + Type: []string{"string"}, + Format: "", }, }, - "plugin": { + "imagePullPolicy": { SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.Plugin"), + Description: "ImagePullPolicy of the component. Override the cluster-level imagePullPolicy if present Optional: Defaults to cluster-level setting", + Type: []string{"string"}, + Format: "", }, }, - "pessimistic-txn": { + "imagePullSecrets": { SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PessimisticTxn"), + Description: "ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + }, + }, + }, }, }, - "check-mb4-value-in-utf8": { + "hostNetwork": { SchemaProps: spec.SchemaProps{ - Description: "Optional: Defaults to true", + Description: "Whether Hostnetwork of the component is enabled. Override the cluster-level setting if present Optional: Defaults to cluster-level setting", Type: []string{"boolean"}, Format: "", }, }, - "alter-primary-key": { + "affinity": { SchemaProps: spec.SchemaProps{ - Description: "Optional: Defaults to false", - Type: []string{"boolean"}, - Format: "", + Description: "Affinity of the component. Override the cluster-level setting if present. Optional: Defaults to cluster-level setting", + Ref: ref("k8s.io/api/core/v1.Affinity"), }, }, - "treat-old-version-utf8-as-utf8mb4": { + "priorityClassName": { SchemaProps: spec.SchemaProps{ - Description: "Optional: Defaults to true", - Type: []string{"boolean"}, + Description: "PriorityClassName of the component. Override the cluster-level one if present Optional: Defaults to cluster-level setting", + Type: []string{"string"}, Format: "", }, }, - "split-region-max-num": { + "schedulerName": { SchemaProps: spec.SchemaProps{ - Description: "Optional: Defaults to 1000", - Type: []string{"integer"}, - Format: "int64", + Description: "SchedulerName of the component. Override the cluster-level one if present Optional: Defaults to cluster-level setting", + Type: []string{"string"}, + Format: "", }, }, - "stmt-summary": { + "nodeSelector": { SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.StmtSummary"), + Description: "NodeSelector of the component. Merged into the cluster-level nodeSelector if non-empty Optional: Defaults to cluster-level setting", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "repair-mode": { + "annotations": { SchemaProps: spec.SchemaProps{ - Description: "RepairMode indicates that the TiDB is in the repair mode for table meta.", - Type: []string{"boolean"}, - Format: "", + Description: "Annotations for the component. Merge into the cluster-level annotations if non-empty Optional: Defaults to cluster-level setting", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "repair-table-list": { + "labels": { SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ + Description: "Labels for the component. Merge into the cluster-level labels if non-empty Optional: Defaults to cluster-level setting", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{"string"}, @@ -7105,87 +7630,158 @@ func schema_pkg_apis_pingcap_v1alpha1_TiDBConfig(ref common.ReferenceCallback) c }, }, }, - "isolation-read": { + "tolerations": { SchemaProps: spec.SchemaProps{ - Description: "IsolationRead indicates that the TiDB reads data from which isolation level(engine and label).", - Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.IsolationRead"), + Description: "Tolerations of the component. Override the cluster-level tolerations if non-empty Optional: Defaults to cluster-level setting", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.Toleration"), + }, + }, + }, }, }, - "max-server-connections": { + "podSecurityContext": { SchemaProps: spec.SchemaProps{ - Description: "MaxServerConnections is the maximum permitted number of simultaneous client connections.", - Type: []string{"integer"}, - Format: "int64", + Description: "PodSecurityContext of the component", + Ref: ref("k8s.io/api/core/v1.PodSecurityContext"), }, }, - "new_collations_enabled_on_first_bootstrap": { + "configUpdateStrategy": { SchemaProps: spec.SchemaProps{ - Description: "NewCollationsEnabledOnFirstBootstrap indicates if the new collations are enabled, it effects only when a TiDB cluster bootstrapped on the first time.", - Type: []string{"boolean"}, + Description: "ConfigUpdateStrategy of the component. Override the cluster-level updateStrategy if present Optional: Defaults to cluster-level setting", + Type: []string{"string"}, Format: "", }, }, - "experimental": { + "env": { SchemaProps: spec.SchemaProps{ - Description: "Experimental contains parameters for experimental features.", - Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.Experimental"), + Description: "List of environment variables to set in the container, like v1.Container.Env. Note that the following env names cannot be used and will be overridden by TiDB Operator builtin envs - NAMESPACE - TZ - SERVICE_NAME - PEER_SERVICE_NAME - HEADLESS_SERVICE_NAME - SET_NAME - HOSTNAME - CLUSTER_NAME - POD_NAME - BINLOG_ENABLED - SLOW_LOG_FILE", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.EnvVar"), + }, + }, + }, }, }, - "enable-dynamic-config": { + "initContainers": { SchemaProps: spec.SchemaProps{ - Description: "EnableDynamicConfig enables the TiDB to fetch configs from PD and update itself during runtime. see https://github.com/pingcap/tidb/pull/13660 for more details.", - Type: []string{"boolean"}, - Format: "", + Description: "Init containers of the components", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.Container"), + }, + }, + }, }, }, - "enable-table-lock": { + "additionalContainers": { SchemaProps: spec.SchemaProps{ - Description: "imported from v3.1.0", - Type: []string{"boolean"}, - Format: "", + Description: "Additional containers of the component.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.Container"), + }, + }, + }, }, }, - "delay-clean-table-lock": { + "additionalVolumes": { SchemaProps: spec.SchemaProps{ - Description: "imported from v3.1.0", + Description: "Additional volumes of component pod.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.Volume"), + }, + }, + }, + }, + }, + "additionalVolumeMounts": { + SchemaProps: spec.SchemaProps{ + Description: "Additional volume mounts of component pod.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.VolumeMount"), + }, + }, + }, + }, + }, + "terminationGracePeriodSeconds": { + SchemaProps: spec.SchemaProps{ + 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 delete immediately. 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.", Type: []string{"integer"}, Format: "int64", }, }, - "skip-register-to-dashboard": { + "statefulSetUpdateStrategy": { SchemaProps: spec.SchemaProps{ - Description: "imported from v4.0.5 SkipRegisterToDashboard tells TiDB don't register itself to the dashboard.", - Type: []string{"boolean"}, + Description: "StatefulSetUpdateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template.", + Type: []string{"string"}, Format: "", }, }, - "enable-telemetry": { + "podManagementPolicy": { SchemaProps: spec.SchemaProps{ - Description: "When enabled, usage data (for example, instance versions) will be reported to PingCAP periodically for user experience analytics. If this config is set to `false` on all TiDB servers, telemetry will be always disabled regardless of the value of the global variable `tidb_enable_telemetry`. See PingCAP privacy policy for details: https://pingcap.com/en/privacy-policy/. Imported from v4.0.2. Optional: Defaults to true", - Type: []string{"boolean"}, + Description: "PodManagementPolicy of TiDB cluster StatefulSets", + Type: []string{"string"}, Format: "", }, }, - "labels": { + "topologySpreadConstraints": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "topologyKey", + }, + "x-kubernetes-list-type": "map", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "Labels are labels for TiDB server", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, + 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. This field is is only honored by clusters that enables the EvenPodsSpread feature. All topologySpreadConstraints are ANDed.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TopologySpreadConstraint"), + }, + }, + }, + }, + }, + "clusters": { + SchemaProps: spec.SchemaProps{ + Description: "Clusters reference TiDB cluster", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbClusterRef"), }, }, }, }, }, }, + Required: []string{"clusters"}, }, }, Dependencies: []string{ - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.Binlog", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.Experimental", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.IsolationRead", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.Log", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.OpenTracing", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.Performance", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PessimisticTxn", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.Plugin", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PreparedPlanCache", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.ProxyProtocol", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.Security", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.Status", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.StmtSummary", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVClient", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TxnLocalLatches"}, + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbClusterRef", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TopologySpreadConstraint", "k8s.io/api/core/v1.Affinity", "k8s.io/api/core/v1.Container", "k8s.io/api/core/v1.EnvVar", "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PodSecurityContext", "k8s.io/api/core/v1.Toleration", "k8s.io/api/core/v1.Volume", "k8s.io/api/core/v1.VolumeMount"}, } } diff --git a/pkg/apis/pingcap/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/pingcap/v1alpha1/zz_generated.deepcopy.go index e995fe173dc..2ce84266ac8 100644 --- a/pkg/apis/pingcap/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/pingcap/v1alpha1/zz_generated.deepcopy.go @@ -2569,6 +2569,50 @@ func (in *MonitorContainer) DeepCopy() *MonitorContainer { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MonitorSpec) DeepCopyInto(out *MonitorSpec) { + *out = *in + in.ComponentSpec.DeepCopyInto(&out.ComponentSpec) + in.ResourceRequirements.DeepCopyInto(&out.ResourceRequirements) + if in.StorageClassName != nil { + in, out := &in.StorageClassName, &out.StorageClassName + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MonitorSpec. +func (in *MonitorSpec) DeepCopy() *MonitorSpec { + if in == nil { + return nil + } + out := new(MonitorSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MonitorStatus) DeepCopyInto(out *MonitorStatus) { + *out = *in + if in.StatefulSet != nil { + in, out := &in.StatefulSet, &out.StatefulSet + *out = new(appsv1.StatefulSetStatus) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MonitorStatus. +func (in *MonitorStatus) DeepCopy() *MonitorStatus { + if in == nil { + return nil + } + out := new(MonitorStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Networks) DeepCopyInto(out *Networks) { *out = *in @@ -5268,6 +5312,90 @@ func (in *TiDBMember) DeepCopy() *TiDBMember { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TiDBNGMonitor) DeepCopyInto(out *TiDBNGMonitor) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TiDBNGMonitor. +func (in *TiDBNGMonitor) DeepCopy() *TiDBNGMonitor { + if in == nil { + return nil + } + out := new(TiDBNGMonitor) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TiDBNGMonitorList) DeepCopyInto(out *TiDBNGMonitorList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]TiDBNGMonitor, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TiDBNGMonitorList. +func (in *TiDBNGMonitorList) DeepCopy() *TiDBNGMonitorList { + if in == nil { + return nil + } + out := new(TiDBNGMonitorList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TiDBNGMonitorSpec) DeepCopyInto(out *TiDBNGMonitorSpec) { + *out = *in + in.ComponentSpec.DeepCopyInto(&out.ComponentSpec) + if in.Clusters != nil { + in, out := &in.Clusters, &out.Clusters + *out = make([]TidbClusterRef, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TiDBNGMonitorSpec. +func (in *TiDBNGMonitorSpec) DeepCopy() *TiDBNGMonitorSpec { + if in == nil { + return nil + } + out := new(TiDBNGMonitorSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TiDBNGMonitorStatus) DeepCopyInto(out *TiDBNGMonitorStatus) { + *out = *in + in.Monitor.DeepCopyInto(&out.Monitor) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TiDBNGMonitorStatus. +func (in *TiDBNGMonitorStatus) DeepCopy() *TiDBNGMonitorStatus { + if in == nil { + return nil + } + out := new(TiDBNGMonitorStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TiDBProbe) DeepCopyInto(out *TiDBProbe) { *out = *in From 61727b227f77c2e0d7d7f886b3bdb2972180147c Mon Sep 17 00:00:00 2001 From: Shiori Date: Mon, 29 Nov 2021 16:29:58 +0800 Subject: [PATCH 03/28] update types --- pkg/apis/pingcap/v1alpha1/ngmonitor_types.go | 48 +++++++++++--------- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/pkg/apis/pingcap/v1alpha1/ngmonitor_types.go b/pkg/apis/pingcap/v1alpha1/ngmonitor_types.go index ac555e40bda..60da44d7da3 100644 --- a/pkg/apis/pingcap/v1alpha1/ngmonitor_types.go +++ b/pkg/apis/pingcap/v1alpha1/ngmonitor_types.go @@ -1,4 +1,4 @@ -// Copyright 2020 PingCAP, Inc. +// Copyright 2021 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -19,71 +19,77 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + // TidbMonitor contains the spec and status of tidb ng monitor // // +k8s:openapi-gen=true // +kubebuilder:resource:shortName="tnm" -type TiDBNGMonitor struct { +type TiDBNGMonitoring struct { metav1.TypeMeta `json:",inline"` // +k8s:openapi-gen=false metav1.ObjectMeta `json:"metadata"` // Spec contains all spec about tidb ng monitor - Spec TiDBNGMonitorSpec `json:"spec"` + Spec TiDBNGMonitoringSpec `json:"spec"` // Status is most recently observed status of tidb ng monitor // // +k8s:openapi-gen=false - Status TiDBNGMonitorStatus `json:"status,omitempty"` + Status TiDBNGMonitoringStatus `json:"status,omitempty"` } -type TiDBNGMonitorList struct { +type TiDBNGMonitoringList struct { metav1.TypeMeta `json:",inline"` // +k8s:openapi-gen=false metav1.ListMeta `json:"metadata"` - Items []TiDBNGMonitor `json:"items"` + Items []TiDBNGMonitoring `json:"items"` } +// TiDBNGMonitoringSpec is spec of tidb ng monitoring +// // +k8s:openapi-gen=true -type TiDBNGMonitorSpec struct { +type TiDBNGMonitoringSpec struct { // ComponentSpec is common spec. // NOTE: the same field will be overridden by component's spec. ComponentSpec `json:",inline"` // Clusters reference TiDB cluster + // + // +kubebuilder:validation:MaxItems=1 Clusters []TidbClusterRef `json:"clusters"` + + // Paused pause controller if it is true + Paused bool `json:"paused,omitempty"` } -type TiDBNGMonitorStatus struct { - Monitor MonitorStatus `json:"monitor,omitempty"` +// TiDBNGMonitoringStatus is status of tidb ng monitoring +type TiDBNGMonitoringStatus struct { + // NGMonitoring is status of ng monitoring + NGMonitoring NGMonitoringStatus `json:"ngMonitoring,omitempty"` } -// MonitorSpec is spec of ng monitor +// NGMonitoringSpec is spec of ng monitoring // // +k8s:openapi-gen=true -type MonitorSpec struct { +type NGMonitoringSpec struct { ComponentSpec `json:",inline"` corev1.ResourceRequirements `json:",inline"` - // The desired ready replicas - // - // +kubebuilder:validation:Minimum=0 - // +kubebuilder:validation:Maximum=1 - Replicas int32 `json:"replicas"` - // Base image of the component, image tag is now allowed during validation // - // +kubebuilder:default=pingcap/ng-monitor + // +kubebuilder:default=pingcap/ng-monitoring BaseImage string `json:"baseImage"` - // StorageClassName is the persistent volume for ng monitor. + // StorageClassName is the persistent volume for ng monitoring. // Defaults to Kubernetes default storage class. StorageClassName *string `json:"storageClassName,omitempty"` } -// MonitorStatus is latest status of ng monitor -type MonitorStatus struct { +// NGMonitoringStatus is latest status of ng monitoring +type NGMonitoringStatus struct { Synced bool `json:"synced,omitempty"` Phase MemberPhase `json:"phase,omitempty"` From 1474c46a8a4a4610c115f9d0ec807c829feeac28 Mon Sep 17 00:00:00 2001 From: Shiori Date: Mon, 29 Nov 2021 16:38:48 +0800 Subject: [PATCH 04/28] update all --- docs/api-references/docs.md | 255 +- manifests/crd.yaml | 2355 +++++++++++++++++ .../crd/v1/pingcap.com_tidbngmonitorings.yaml | 2355 +++++++++++++++++ .../pingcap.com_tidbngmonitorings.yaml | 2355 +++++++++++++++++ manifests/crd_v1beta1.yaml | 2355 +++++++++++++++++ .../pingcap/v1alpha1/openapi_generated.go | 39 +- .../pingcap/v1alpha1/zz_generated.deepcopy.go | 60 +- .../v1alpha1/fake/fake_pingcap_client.go | 4 + .../v1alpha1/fake/fake_tidbngmonitoring.go | 139 + .../pingcap/v1alpha1/generated_expansion.go | 2 + .../typed/pingcap/v1alpha1/pingcap_client.go | 5 + .../pingcap/v1alpha1/tidbngmonitoring.go | 192 ++ .../informers/externalversions/generic.go | 2 + .../pingcap/v1alpha1/interface.go | 7 + .../pingcap/v1alpha1/tidbngmonitoring.go | 87 + .../pingcap/v1alpha1/expansion_generated.go | 8 + .../pingcap/v1alpha1/tidbngmonitoring.go | 96 + 17 files changed, 10160 insertions(+), 156 deletions(-) create mode 100644 manifests/crd/v1/pingcap.com_tidbngmonitorings.yaml create mode 100644 manifests/crd/v1beta1/pingcap.com_tidbngmonitorings.yaml create mode 100644 pkg/client/clientset/versioned/typed/pingcap/v1alpha1/fake/fake_tidbngmonitoring.go create mode 100644 pkg/client/clientset/versioned/typed/pingcap/v1alpha1/tidbngmonitoring.go create mode 100644 pkg/client/informers/externalversions/pingcap/v1alpha1/tidbngmonitoring.go create mode 100644 pkg/client/listers/pingcap/v1alpha1/tidbngmonitoring.go diff --git a/docs/api-references/docs.md b/docs/api-references/docs.md index bc8202a7d8c..d2c94ae1b17 100644 --- a/docs/api-references/docs.md +++ b/docs/api-references/docs.md @@ -18,6 +18,8 @@ Resource Types:

  • Restore
  • +TiDBNGMonitoring +
  • TidbCluster
  • TidbClusterAutoScaler @@ -1247,6 +1249,122 @@ RestoreStatus +

    TiDBNGMonitoring

    +

    +

    TidbMonitor contains the spec and status of tidb ng monitor

    +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldDescription
    +apiVersion
    +string
    + +pingcap.com/v1alpha1 + +
    +kind
    +string +
    TiDBNGMonitoring
    +metadata
    + + +Kubernetes meta/v1.ObjectMeta + + +
    +Refer to the Kubernetes API documentation for the fields of the +metadata field. +
    +spec
    + + +TiDBNGMonitoringSpec + + +
    +

    Spec contains all spec about tidb ng monitor

    +
    +
    + + + + + + + + + + + + + +
    +ComponentSpec
    + + +ComponentSpec + + +
    +

    +(Members of ComponentSpec are embedded into this type.) +

    +

    ComponentSpec is common spec. +NOTE: the same field will be overridden by component’s spec.

    +
    +clusters
    + + +[]TidbClusterRef + + +
    +

    Clusters reference TiDB cluster

    +
    +paused
    + +bool + +
    +

    Paused pause controller if it is true

    +
    +
    +status
    + + +TiDBNGMonitoringStatus + + +
    +

    Status is most recently observed status of tidb ng monitor

    +

    TidbCluster

    TidbCluster is the control script’s spec

    @@ -4130,11 +4248,11 @@ and component-level overrides

    DMDiscoverySpec, DiscoverySpec, MasterSpec, -MonitorSpec, +NGMonitoringSpec, PDSpec, PumpSpec, TiCDCSpec, -TiDBNGMonitorSpec, +TiDBNGMonitoringSpec, TiDBSpec, TiFlashSpec, TiKVSpec, @@ -7837,7 +7955,7 @@ string

    (Appears on: MasterStatus, -MonitorStatus, +NGMonitoringStatus, PDStatus, PumpStatus, TiCDCStatus, @@ -7926,9 +8044,9 @@ Kubernetes core/v1.PullPolicy -

    MonitorSpec

    +

    NGMonitoringSpec

    -

    MonitorSpec is spec of ng monitor

    +

    NGMonitoringSpec is spec of ng monitoring

    @@ -7970,17 +8088,6 @@ Kubernetes core/v1.ResourceRequirements - - - -
    -replicas
    - -int32 - -
    -

    The desired ready replicas

    -
    baseImage
    string @@ -7998,19 +8105,19 @@ string
    -

    StorageClassName is the persistent volume for ng monitor. +

    StorageClassName is the persistent volume for ng monitoring. Defaults to Kubernetes default storage class.

    -

    MonitorStatus

    +

    NGMonitoringStatus

    (Appears on: -TiDBNGMonitorStatus) +TiDBNGMonitoringStatus)

    -

    MonitorStatus is latest status of ng monitor

    +

    NGMonitoringStatus is latest status of ng monitoring

    @@ -14359,9 +14466,13 @@ string
    -

    TiDBNGMonitor

    +

    TiDBNGMonitoringSpec

    -

    TidbMonitor contains the spec and status of tidb ng monitor

    +(Appears on: +TiDBNGMonitoring) +

    +

    +

    TiDBNGMonitoringSpec is spec of tidb ng monitoring

    @@ -14373,34 +14484,6 @@ string - - - - - - - - - -
    -metadata
    - - -Kubernetes meta/v1.ObjectMeta - - -
    -Refer to the Kubernetes API documentation for the fields of the -metadata field. -
    -spec
    - - -TiDBNGMonitorSpec - - -
    -

    Spec contains all spec about tidb ng monitor

    -
    -
    - - - -
    ComponentSpec
    @@ -14429,77 +14512,26 @@ NOTE: the same field will be overridden by component’s spec.

    Clusters reference TiDB cluster

    -
    -status
    - - -TiDBNGMonitorStatus - - -
    -

    Status is most recently observed status of tidb ng monitor

    -
    -

    TiDBNGMonitorSpec

    -

    -(Appears on: -TiDBNGMonitor) -

    -

    -

    - - - - - - - - - - - - - -
    FieldDescription
    -ComponentSpec
    - - -ComponentSpec - - -
    -

    -(Members of ComponentSpec are embedded into this type.) -

    -

    ComponentSpec is common spec. -NOTE: the same field will be overridden by component’s spec.

    -
    -clusters
    +paused
    - -[]TidbClusterRef - +bool
    -

    Clusters reference TiDB cluster

    +

    Paused pause controller if it is true

    -

    TiDBNGMonitorStatus

    +

    TiDBNGMonitoringStatus

    (Appears on: -TiDBNGMonitor) +TiDBNGMonitoring)

    +

    TiDBNGMonitoringStatus is status of tidb ng monitoring

    @@ -14511,14 +14543,15 @@ NOTE: the same field will be overridden by component’s spec.

    @@ -20501,7 +20534,7 @@ string

    TidbClusterRef

    (Appears on: -TiDBNGMonitorSpec, +TiDBNGMonitoringSpec, TidbClusterAutoScalerSpec, TidbClusterSpec, TidbInitializerSpec, diff --git a/manifests/crd.yaml b/manifests/crd.yaml index 1d6f8538936..877ba7d1fa8 100644 --- a/manifests/crd.yaml +++ b/manifests/crd.yaml @@ -31904,6 +31904,2361 @@ status: conditions: [] storedVersions: [] +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.6.2 + creationTimestamp: null + name: tidbngmonitorings.pingcap.com +spec: + group: pingcap.com + names: + kind: TiDBNGMonitoring + listKind: TiDBNGMonitoringList + plural: tidbngmonitorings + shortNames: + - tnm + singular: tidbngmonitoring + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + additionalContainers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + 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 + 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 + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + additionalVolumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + additionalVolumes: + items: + properties: + awsElasticBlockStore: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + azureDisk: + properties: + cachingMode: + type: string + diskName: + type: string + diskURI: + type: string + fsType: + type: string + kind: + type: string + readOnly: + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + properties: + readOnly: + type: boolean + secretName: + type: string + shareName: + type: string + required: + - secretName + - shareName + type: object + cephfs: + properties: + monitors: + items: + type: string + type: array + path: + type: string + readOnly: + type: boolean + secretFile: + type: string + secretRef: + properties: + name: + type: string + type: object + user: + type: string + required: + - monitors + type: object + cinder: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + volumeID: + type: string + required: + - volumeID + type: object + configMap: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + csi: + properties: + driver: + type: string + fsType: + type: string + nodePublishSecretRef: + properties: + name: + type: string + type: object + readOnly: + type: boolean + volumeAttributes: + additionalProperties: + type: string + type: object + required: + - driver + type: object + downwardAPI: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + emptyDir: + properties: + medium: + type: string + sizeLimit: + 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: object + ephemeral: + properties: + readOnly: + type: boolean + volumeClaimTemplate: + properties: + metadata: + type: object + spec: + properties: + accessModes: + items: + type: string + type: array + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + resources: + 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 + 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 + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + storageClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object + required: + - spec + type: object + type: object + fc: + properties: + fsType: + type: string + lun: + format: int32 + type: integer + readOnly: + type: boolean + targetWWNs: + items: + type: string + type: array + wwids: + items: + type: string + type: array + type: object + flexVolume: + properties: + driver: + type: string + fsType: + type: string + options: + additionalProperties: + type: string + type: object + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + required: + - driver + type: object + flocker: + properties: + datasetName: + type: string + datasetUUID: + type: string + type: object + gcePersistentDisk: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + pdName: + type: string + readOnly: + type: boolean + required: + - pdName + type: object + gitRepo: + properties: + directory: + type: string + repository: + type: string + revision: + type: string + required: + - repository + type: object + glusterfs: + properties: + endpoints: + type: string + path: + type: string + readOnly: + type: boolean + required: + - endpoints + - path + type: object + hostPath: + properties: + path: + type: string + type: + type: string + required: + - path + type: object + iscsi: + properties: + chapAuthDiscovery: + type: boolean + chapAuthSession: + type: boolean + fsType: + type: string + initiatorName: + type: string + iqn: + type: string + iscsiInterface: + type: string + lun: + format: int32 + type: integer + portals: + items: + type: string + type: array + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + targetPortal: + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + type: string + nfs: + properties: + path: + type: string + readOnly: + type: boolean + server: + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + properties: + claimName: + type: string + readOnly: + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + properties: + fsType: + type: string + pdID: + type: string + required: + - pdID + type: object + portworxVolume: + properties: + fsType: + type: string + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + projected: + properties: + defaultMode: + format: int32 + type: integer + sources: + items: + properties: + configMap: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + downwardAPI: + properties: + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + secret: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + serviceAccountToken: + properties: + audience: + type: string + expirationSeconds: + format: int64 + type: integer + path: + type: string + required: + - path + type: object + type: object + type: array + required: + - sources + type: object + quobyte: + properties: + group: + type: string + readOnly: + type: boolean + registry: + type: string + tenant: + type: string + user: + type: string + volume: + type: string + required: + - registry + - volume + type: object + rbd: + properties: + fsType: + type: string + image: + type: string + keyring: + type: string + monitors: + items: + type: string + type: array + pool: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + user: + type: string + required: + - image + - monitors + type: object + scaleIO: + properties: + fsType: + type: string + gateway: + type: string + protectionDomain: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + sslEnabled: + type: boolean + storageMode: + type: string + storagePool: + type: string + system: + type: string + volumeName: + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + optional: + type: boolean + secretName: + type: string + type: object + storageos: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + volumeName: + type: string + volumeNamespace: + type: string + type: object + vsphereVolume: + properties: + fsType: + type: string + storagePolicyID: + type: string + storagePolicyName: + type: string + volumePath: + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + affinity: + properties: + nodeAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + preference: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + weight: + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + properties: + nodeSelectorTerms: + items: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + type: array + required: + - nodeSelectorTerms + type: object + type: object + podAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + type: object + podAntiAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + type: object + type: object + annotations: + additionalProperties: + type: string + type: object + clusters: + items: + properties: + clusterDomain: + type: string + name: + type: string + namespace: + type: string + required: + - name + type: object + maxItems: 1 + type: array + configUpdateStrategy: + type: string + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + hostNetwork: + type: boolean + image: + type: string + imagePullPolicy: + type: string + imagePullSecrets: + items: + properties: + name: + type: string + type: object + type: array + initContainers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + 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 + 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 + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + labels: + additionalProperties: + type: string + type: object + nodeSelector: + additionalProperties: + type: string + type: object + paused: + type: boolean + podManagementPolicy: + type: string + podSecurityContext: + properties: + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + supplementalGroups: + items: + format: int64 + type: integer + type: array + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + priorityClassName: + type: string + schedulerName: + type: string + statefulSetUpdateStrategy: + type: string + terminationGracePeriodSeconds: + format: int64 + type: integer + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + items: + properties: + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + x-kubernetes-list-map-keys: + - topologyKey + x-kubernetes-list-type: map + version: + type: string + required: + - clusters + type: object + status: + properties: + ngMonitoring: + properties: + phase: + type: string + statefulSet: + properties: + collisionCount: + format: int32 + type: integer + conditions: + items: + properties: + lastTransitionTime: + format: date-time + type: string + message: + type: string + reason: + type: string + status: + type: string + type: + type: string + required: + - status + - type + type: object + type: array + currentReplicas: + format: int32 + type: integer + currentRevision: + type: string + observedGeneration: + format: int64 + type: integer + readyReplicas: + format: int32 + type: integer + replicas: + format: int32 + type: integer + updateRevision: + type: string + updatedReplicas: + format: int32 + type: integer + required: + - replicas + type: object + synced: + type: boolean + type: object + type: object + required: + - metadata + - spec + type: object + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] + --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition diff --git a/manifests/crd/v1/pingcap.com_tidbngmonitorings.yaml b/manifests/crd/v1/pingcap.com_tidbngmonitorings.yaml new file mode 100644 index 00000000000..6895931499c --- /dev/null +++ b/manifests/crd/v1/pingcap.com_tidbngmonitorings.yaml @@ -0,0 +1,2355 @@ + +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.6.2 + creationTimestamp: null + name: tidbngmonitorings.pingcap.com +spec: + group: pingcap.com + names: + kind: TiDBNGMonitoring + listKind: TiDBNGMonitoringList + plural: tidbngmonitorings + shortNames: + - tnm + singular: tidbngmonitoring + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + additionalContainers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + 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 + 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 + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + additionalVolumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + additionalVolumes: + items: + properties: + awsElasticBlockStore: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + azureDisk: + properties: + cachingMode: + type: string + diskName: + type: string + diskURI: + type: string + fsType: + type: string + kind: + type: string + readOnly: + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + properties: + readOnly: + type: boolean + secretName: + type: string + shareName: + type: string + required: + - secretName + - shareName + type: object + cephfs: + properties: + monitors: + items: + type: string + type: array + path: + type: string + readOnly: + type: boolean + secretFile: + type: string + secretRef: + properties: + name: + type: string + type: object + user: + type: string + required: + - monitors + type: object + cinder: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + volumeID: + type: string + required: + - volumeID + type: object + configMap: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + csi: + properties: + driver: + type: string + fsType: + type: string + nodePublishSecretRef: + properties: + name: + type: string + type: object + readOnly: + type: boolean + volumeAttributes: + additionalProperties: + type: string + type: object + required: + - driver + type: object + downwardAPI: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + emptyDir: + properties: + medium: + type: string + sizeLimit: + 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: object + ephemeral: + properties: + readOnly: + type: boolean + volumeClaimTemplate: + properties: + metadata: + type: object + spec: + properties: + accessModes: + items: + type: string + type: array + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + resources: + 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 + 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 + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + storageClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object + required: + - spec + type: object + type: object + fc: + properties: + fsType: + type: string + lun: + format: int32 + type: integer + readOnly: + type: boolean + targetWWNs: + items: + type: string + type: array + wwids: + items: + type: string + type: array + type: object + flexVolume: + properties: + driver: + type: string + fsType: + type: string + options: + additionalProperties: + type: string + type: object + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + required: + - driver + type: object + flocker: + properties: + datasetName: + type: string + datasetUUID: + type: string + type: object + gcePersistentDisk: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + pdName: + type: string + readOnly: + type: boolean + required: + - pdName + type: object + gitRepo: + properties: + directory: + type: string + repository: + type: string + revision: + type: string + required: + - repository + type: object + glusterfs: + properties: + endpoints: + type: string + path: + type: string + readOnly: + type: boolean + required: + - endpoints + - path + type: object + hostPath: + properties: + path: + type: string + type: + type: string + required: + - path + type: object + iscsi: + properties: + chapAuthDiscovery: + type: boolean + chapAuthSession: + type: boolean + fsType: + type: string + initiatorName: + type: string + iqn: + type: string + iscsiInterface: + type: string + lun: + format: int32 + type: integer + portals: + items: + type: string + type: array + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + targetPortal: + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + type: string + nfs: + properties: + path: + type: string + readOnly: + type: boolean + server: + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + properties: + claimName: + type: string + readOnly: + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + properties: + fsType: + type: string + pdID: + type: string + required: + - pdID + type: object + portworxVolume: + properties: + fsType: + type: string + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + projected: + properties: + defaultMode: + format: int32 + type: integer + sources: + items: + properties: + configMap: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + downwardAPI: + properties: + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + secret: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + serviceAccountToken: + properties: + audience: + type: string + expirationSeconds: + format: int64 + type: integer + path: + type: string + required: + - path + type: object + type: object + type: array + required: + - sources + type: object + quobyte: + properties: + group: + type: string + readOnly: + type: boolean + registry: + type: string + tenant: + type: string + user: + type: string + volume: + type: string + required: + - registry + - volume + type: object + rbd: + properties: + fsType: + type: string + image: + type: string + keyring: + type: string + monitors: + items: + type: string + type: array + pool: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + user: + type: string + required: + - image + - monitors + type: object + scaleIO: + properties: + fsType: + type: string + gateway: + type: string + protectionDomain: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + sslEnabled: + type: boolean + storageMode: + type: string + storagePool: + type: string + system: + type: string + volumeName: + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + optional: + type: boolean + secretName: + type: string + type: object + storageos: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + volumeName: + type: string + volumeNamespace: + type: string + type: object + vsphereVolume: + properties: + fsType: + type: string + storagePolicyID: + type: string + storagePolicyName: + type: string + volumePath: + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + affinity: + properties: + nodeAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + preference: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + weight: + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + properties: + nodeSelectorTerms: + items: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + type: array + required: + - nodeSelectorTerms + type: object + type: object + podAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + type: object + podAntiAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + type: object + type: object + annotations: + additionalProperties: + type: string + type: object + clusters: + items: + properties: + clusterDomain: + type: string + name: + type: string + namespace: + type: string + required: + - name + type: object + maxItems: 1 + type: array + configUpdateStrategy: + type: string + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + hostNetwork: + type: boolean + image: + type: string + imagePullPolicy: + type: string + imagePullSecrets: + items: + properties: + name: + type: string + type: object + type: array + initContainers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + 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 + 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 + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + labels: + additionalProperties: + type: string + type: object + nodeSelector: + additionalProperties: + type: string + type: object + paused: + type: boolean + podManagementPolicy: + type: string + podSecurityContext: + properties: + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + supplementalGroups: + items: + format: int64 + type: integer + type: array + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + priorityClassName: + type: string + schedulerName: + type: string + statefulSetUpdateStrategy: + type: string + terminationGracePeriodSeconds: + format: int64 + type: integer + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + items: + properties: + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + x-kubernetes-list-map-keys: + - topologyKey + x-kubernetes-list-type: map + version: + type: string + required: + - clusters + type: object + status: + properties: + ngMonitoring: + properties: + phase: + type: string + statefulSet: + properties: + collisionCount: + format: int32 + type: integer + conditions: + items: + properties: + lastTransitionTime: + format: date-time + type: string + message: + type: string + reason: + type: string + status: + type: string + type: + type: string + required: + - status + - type + type: object + type: array + currentReplicas: + format: int32 + type: integer + currentRevision: + type: string + observedGeneration: + format: int64 + type: integer + readyReplicas: + format: int32 + type: integer + replicas: + format: int32 + type: integer + updateRevision: + type: string + updatedReplicas: + format: int32 + type: integer + required: + - replicas + type: object + synced: + type: boolean + type: object + type: object + required: + - metadata + - spec + type: object + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/manifests/crd/v1beta1/pingcap.com_tidbngmonitorings.yaml b/manifests/crd/v1beta1/pingcap.com_tidbngmonitorings.yaml new file mode 100644 index 00000000000..122ebdeec35 --- /dev/null +++ b/manifests/crd/v1beta1/pingcap.com_tidbngmonitorings.yaml @@ -0,0 +1,2355 @@ + +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.6.2 + creationTimestamp: null + name: tidbngmonitorings.pingcap.com +spec: + group: pingcap.com + names: + kind: TiDBNGMonitoring + listKind: TiDBNGMonitoringList + plural: tidbngmonitorings + shortNames: + - tnm + singular: tidbngmonitoring + preserveUnknownFields: false + scope: Namespaced + validation: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + additionalContainers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + 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 + 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 + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + additionalVolumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + additionalVolumes: + items: + properties: + awsElasticBlockStore: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + azureDisk: + properties: + cachingMode: + type: string + diskName: + type: string + diskURI: + type: string + fsType: + type: string + kind: + type: string + readOnly: + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + properties: + readOnly: + type: boolean + secretName: + type: string + shareName: + type: string + required: + - secretName + - shareName + type: object + cephfs: + properties: + monitors: + items: + type: string + type: array + path: + type: string + readOnly: + type: boolean + secretFile: + type: string + secretRef: + properties: + name: + type: string + type: object + user: + type: string + required: + - monitors + type: object + cinder: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + volumeID: + type: string + required: + - volumeID + type: object + configMap: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + csi: + properties: + driver: + type: string + fsType: + type: string + nodePublishSecretRef: + properties: + name: + type: string + type: object + readOnly: + type: boolean + volumeAttributes: + additionalProperties: + type: string + type: object + required: + - driver + type: object + downwardAPI: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + emptyDir: + properties: + medium: + type: string + sizeLimit: + 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: object + ephemeral: + properties: + readOnly: + type: boolean + volumeClaimTemplate: + properties: + metadata: + type: object + spec: + properties: + accessModes: + items: + type: string + type: array + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + resources: + 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 + 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 + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + storageClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object + required: + - spec + type: object + type: object + fc: + properties: + fsType: + type: string + lun: + format: int32 + type: integer + readOnly: + type: boolean + targetWWNs: + items: + type: string + type: array + wwids: + items: + type: string + type: array + type: object + flexVolume: + properties: + driver: + type: string + fsType: + type: string + options: + additionalProperties: + type: string + type: object + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + required: + - driver + type: object + flocker: + properties: + datasetName: + type: string + datasetUUID: + type: string + type: object + gcePersistentDisk: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + pdName: + type: string + readOnly: + type: boolean + required: + - pdName + type: object + gitRepo: + properties: + directory: + type: string + repository: + type: string + revision: + type: string + required: + - repository + type: object + glusterfs: + properties: + endpoints: + type: string + path: + type: string + readOnly: + type: boolean + required: + - endpoints + - path + type: object + hostPath: + properties: + path: + type: string + type: + type: string + required: + - path + type: object + iscsi: + properties: + chapAuthDiscovery: + type: boolean + chapAuthSession: + type: boolean + fsType: + type: string + initiatorName: + type: string + iqn: + type: string + iscsiInterface: + type: string + lun: + format: int32 + type: integer + portals: + items: + type: string + type: array + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + targetPortal: + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + type: string + nfs: + properties: + path: + type: string + readOnly: + type: boolean + server: + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + properties: + claimName: + type: string + readOnly: + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + properties: + fsType: + type: string + pdID: + type: string + required: + - pdID + type: object + portworxVolume: + properties: + fsType: + type: string + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + projected: + properties: + defaultMode: + format: int32 + type: integer + sources: + items: + properties: + configMap: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + downwardAPI: + properties: + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + secret: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + serviceAccountToken: + properties: + audience: + type: string + expirationSeconds: + format: int64 + type: integer + path: + type: string + required: + - path + type: object + type: object + type: array + required: + - sources + type: object + quobyte: + properties: + group: + type: string + readOnly: + type: boolean + registry: + type: string + tenant: + type: string + user: + type: string + volume: + type: string + required: + - registry + - volume + type: object + rbd: + properties: + fsType: + type: string + image: + type: string + keyring: + type: string + monitors: + items: + type: string + type: array + pool: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + user: + type: string + required: + - image + - monitors + type: object + scaleIO: + properties: + fsType: + type: string + gateway: + type: string + protectionDomain: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + sslEnabled: + type: boolean + storageMode: + type: string + storagePool: + type: string + system: + type: string + volumeName: + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + optional: + type: boolean + secretName: + type: string + type: object + storageos: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + volumeName: + type: string + volumeNamespace: + type: string + type: object + vsphereVolume: + properties: + fsType: + type: string + storagePolicyID: + type: string + storagePolicyName: + type: string + volumePath: + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + affinity: + properties: + nodeAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + preference: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + weight: + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + properties: + nodeSelectorTerms: + items: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + type: array + required: + - nodeSelectorTerms + type: object + type: object + podAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + type: object + podAntiAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + type: object + type: object + annotations: + additionalProperties: + type: string + type: object + clusters: + items: + properties: + clusterDomain: + type: string + name: + type: string + namespace: + type: string + required: + - name + type: object + maxItems: 1 + type: array + configUpdateStrategy: + type: string + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + hostNetwork: + type: boolean + image: + type: string + imagePullPolicy: + type: string + imagePullSecrets: + items: + properties: + name: + type: string + type: object + type: array + initContainers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + 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 + 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 + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + labels: + additionalProperties: + type: string + type: object + nodeSelector: + additionalProperties: + type: string + type: object + paused: + type: boolean + podManagementPolicy: + type: string + podSecurityContext: + properties: + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + supplementalGroups: + items: + format: int64 + type: integer + type: array + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + priorityClassName: + type: string + schedulerName: + type: string + statefulSetUpdateStrategy: + type: string + terminationGracePeriodSeconds: + format: int64 + type: integer + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + items: + properties: + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + x-kubernetes-list-map-keys: + - topologyKey + x-kubernetes-list-type: map + version: + type: string + required: + - clusters + type: object + status: + properties: + ngMonitoring: + properties: + phase: + type: string + statefulSet: + properties: + collisionCount: + format: int32 + type: integer + conditions: + items: + properties: + lastTransitionTime: + format: date-time + type: string + message: + type: string + reason: + type: string + status: + type: string + type: + type: string + required: + - status + - type + type: object + type: array + currentReplicas: + format: int32 + type: integer + currentRevision: + type: string + observedGeneration: + format: int64 + type: integer + readyReplicas: + format: int32 + type: integer + replicas: + format: int32 + type: integer + updateRevision: + type: string + updatedReplicas: + format: int32 + type: integer + required: + - replicas + type: object + synced: + type: boolean + type: object + type: object + required: + - metadata + - spec + type: object + version: v1alpha1 + versions: + - name: v1alpha1 + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/manifests/crd_v1beta1.yaml b/manifests/crd_v1beta1.yaml index 05fe0294c57..61d81b1c906 100644 --- a/manifests/crd_v1beta1.yaml +++ b/manifests/crd_v1beta1.yaml @@ -31882,6 +31882,2361 @@ status: conditions: [] storedVersions: [] +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.6.2 + creationTimestamp: null + name: tidbngmonitorings.pingcap.com +spec: + group: pingcap.com + names: + kind: TiDBNGMonitoring + listKind: TiDBNGMonitoringList + plural: tidbngmonitorings + shortNames: + - tnm + singular: tidbngmonitoring + preserveUnknownFields: false + scope: Namespaced + validation: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + additionalContainers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + 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 + 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 + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + additionalVolumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + additionalVolumes: + items: + properties: + awsElasticBlockStore: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + azureDisk: + properties: + cachingMode: + type: string + diskName: + type: string + diskURI: + type: string + fsType: + type: string + kind: + type: string + readOnly: + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + properties: + readOnly: + type: boolean + secretName: + type: string + shareName: + type: string + required: + - secretName + - shareName + type: object + cephfs: + properties: + monitors: + items: + type: string + type: array + path: + type: string + readOnly: + type: boolean + secretFile: + type: string + secretRef: + properties: + name: + type: string + type: object + user: + type: string + required: + - monitors + type: object + cinder: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + volumeID: + type: string + required: + - volumeID + type: object + configMap: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + csi: + properties: + driver: + type: string + fsType: + type: string + nodePublishSecretRef: + properties: + name: + type: string + type: object + readOnly: + type: boolean + volumeAttributes: + additionalProperties: + type: string + type: object + required: + - driver + type: object + downwardAPI: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + emptyDir: + properties: + medium: + type: string + sizeLimit: + 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: object + ephemeral: + properties: + readOnly: + type: boolean + volumeClaimTemplate: + properties: + metadata: + type: object + spec: + properties: + accessModes: + items: + type: string + type: array + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + resources: + 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 + 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 + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + storageClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object + required: + - spec + type: object + type: object + fc: + properties: + fsType: + type: string + lun: + format: int32 + type: integer + readOnly: + type: boolean + targetWWNs: + items: + type: string + type: array + wwids: + items: + type: string + type: array + type: object + flexVolume: + properties: + driver: + type: string + fsType: + type: string + options: + additionalProperties: + type: string + type: object + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + required: + - driver + type: object + flocker: + properties: + datasetName: + type: string + datasetUUID: + type: string + type: object + gcePersistentDisk: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + pdName: + type: string + readOnly: + type: boolean + required: + - pdName + type: object + gitRepo: + properties: + directory: + type: string + repository: + type: string + revision: + type: string + required: + - repository + type: object + glusterfs: + properties: + endpoints: + type: string + path: + type: string + readOnly: + type: boolean + required: + - endpoints + - path + type: object + hostPath: + properties: + path: + type: string + type: + type: string + required: + - path + type: object + iscsi: + properties: + chapAuthDiscovery: + type: boolean + chapAuthSession: + type: boolean + fsType: + type: string + initiatorName: + type: string + iqn: + type: string + iscsiInterface: + type: string + lun: + format: int32 + type: integer + portals: + items: + type: string + type: array + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + targetPortal: + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + type: string + nfs: + properties: + path: + type: string + readOnly: + type: boolean + server: + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + properties: + claimName: + type: string + readOnly: + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + properties: + fsType: + type: string + pdID: + type: string + required: + - pdID + type: object + portworxVolume: + properties: + fsType: + type: string + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + projected: + properties: + defaultMode: + format: int32 + type: integer + sources: + items: + properties: + configMap: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + downwardAPI: + properties: + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + secret: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + serviceAccountToken: + properties: + audience: + type: string + expirationSeconds: + format: int64 + type: integer + path: + type: string + required: + - path + type: object + type: object + type: array + required: + - sources + type: object + quobyte: + properties: + group: + type: string + readOnly: + type: boolean + registry: + type: string + tenant: + type: string + user: + type: string + volume: + type: string + required: + - registry + - volume + type: object + rbd: + properties: + fsType: + type: string + image: + type: string + keyring: + type: string + monitors: + items: + type: string + type: array + pool: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + user: + type: string + required: + - image + - monitors + type: object + scaleIO: + properties: + fsType: + type: string + gateway: + type: string + protectionDomain: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + sslEnabled: + type: boolean + storageMode: + type: string + storagePool: + type: string + system: + type: string + volumeName: + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + optional: + type: boolean + secretName: + type: string + type: object + storageos: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + volumeName: + type: string + volumeNamespace: + type: string + type: object + vsphereVolume: + properties: + fsType: + type: string + storagePolicyID: + type: string + storagePolicyName: + type: string + volumePath: + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + affinity: + properties: + nodeAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + preference: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + weight: + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + properties: + nodeSelectorTerms: + items: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + type: array + required: + - nodeSelectorTerms + type: object + type: object + podAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + type: object + podAntiAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + type: object + type: object + annotations: + additionalProperties: + type: string + type: object + clusters: + items: + properties: + clusterDomain: + type: string + name: + type: string + namespace: + type: string + required: + - name + type: object + maxItems: 1 + type: array + configUpdateStrategy: + type: string + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + hostNetwork: + type: boolean + image: + type: string + imagePullPolicy: + type: string + imagePullSecrets: + items: + properties: + name: + type: string + type: object + type: array + initContainers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + 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 + 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 + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + labels: + additionalProperties: + type: string + type: object + nodeSelector: + additionalProperties: + type: string + type: object + paused: + type: boolean + podManagementPolicy: + type: string + podSecurityContext: + properties: + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + supplementalGroups: + items: + format: int64 + type: integer + type: array + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + priorityClassName: + type: string + schedulerName: + type: string + statefulSetUpdateStrategy: + type: string + terminationGracePeriodSeconds: + format: int64 + type: integer + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + items: + properties: + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + x-kubernetes-list-map-keys: + - topologyKey + x-kubernetes-list-type: map + version: + type: string + required: + - clusters + type: object + status: + properties: + ngMonitoring: + properties: + phase: + type: string + statefulSet: + properties: + collisionCount: + format: int32 + type: integer + conditions: + items: + properties: + lastTransitionTime: + format: date-time + type: string + message: + type: string + reason: + type: string + status: + type: string + type: + type: string + required: + - status + - type + type: object + type: array + currentReplicas: + format: int32 + type: integer + currentRevision: + type: string + observedGeneration: + format: int64 + type: integer + readyReplicas: + format: int32 + type: integer + replicas: + format: int32 + type: integer + updateRevision: + type: string + updatedReplicas: + format: int32 + type: integer + required: + - replicas + type: object + synced: + type: boolean + type: object + type: object + required: + - metadata + - spec + type: object + version: v1alpha1 + versions: + - name: v1alpha1 + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] + --- apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition diff --git a/pkg/apis/pingcap/v1alpha1/openapi_generated.go b/pkg/apis/pingcap/v1alpha1/openapi_generated.go index 11af86ba6e4..fb6377c1c2c 100644 --- a/pkg/apis/pingcap/v1alpha1/openapi_generated.go +++ b/pkg/apis/pingcap/v1alpha1/openapi_generated.go @@ -74,7 +74,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.MasterKeyKMSConfig": schema_pkg_apis_pingcap_v1alpha1_MasterKeyKMSConfig(ref), "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.MasterSpec": schema_pkg_apis_pingcap_v1alpha1_MasterSpec(ref), "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.MonitorContainer": schema_pkg_apis_pingcap_v1alpha1_MonitorContainer(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.MonitorSpec": schema_pkg_apis_pingcap_v1alpha1_MonitorSpec(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.NGMonitoringSpec": schema_pkg_apis_pingcap_v1alpha1_NGMonitoringSpec(ref), "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.OpenTracing": schema_pkg_apis_pingcap_v1alpha1_OpenTracing(ref), "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.OpenTracingReporter": schema_pkg_apis_pingcap_v1alpha1_OpenTracingReporter(ref), "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.OpenTracingSampler": schema_pkg_apis_pingcap_v1alpha1_OpenTracingSampler(ref), @@ -118,8 +118,8 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiCDCSpec": schema_pkg_apis_pingcap_v1alpha1_TiCDCSpec(ref), "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBAccessConfig": schema_pkg_apis_pingcap_v1alpha1_TiDBAccessConfig(ref), "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBConfig": schema_pkg_apis_pingcap_v1alpha1_TiDBConfig(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBNGMonitor": schema_pkg_apis_pingcap_v1alpha1_TiDBNGMonitor(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBNGMonitorSpec": schema_pkg_apis_pingcap_v1alpha1_TiDBNGMonitorSpec(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBNGMonitoring": schema_pkg_apis_pingcap_v1alpha1_TiDBNGMonitoring(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBNGMonitoringSpec": schema_pkg_apis_pingcap_v1alpha1_TiDBNGMonitoringSpec(ref), "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBProbe": schema_pkg_apis_pingcap_v1alpha1_TiDBProbe(ref), "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBServiceSpec": schema_pkg_apis_pingcap_v1alpha1_TiDBServiceSpec(ref), "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBSlowLogTailerSpec": schema_pkg_apis_pingcap_v1alpha1_TiDBSlowLogTailerSpec(ref), @@ -3544,11 +3544,11 @@ func schema_pkg_apis_pingcap_v1alpha1_MonitorContainer(ref common.ReferenceCallb } } -func schema_pkg_apis_pingcap_v1alpha1_MonitorSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_pingcap_v1alpha1_NGMonitoringSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "MonitorSpec is spec of ng monitor", + Description: "NGMonitoringSpec is spec of ng monitoring", Type: []string{"object"}, Properties: map[string]spec.Schema{ "version": { @@ -3811,13 +3811,6 @@ func schema_pkg_apis_pingcap_v1alpha1_MonitorSpec(ref common.ReferenceCallback) }, }, }, - "replicas": { - SchemaProps: spec.SchemaProps{ - Description: "The desired ready replicas", - Type: []string{"integer"}, - Format: "int32", - }, - }, "baseImage": { SchemaProps: spec.SchemaProps{ Description: "Base image of the component, image tag is now allowed during validation", @@ -3827,13 +3820,13 @@ func schema_pkg_apis_pingcap_v1alpha1_MonitorSpec(ref common.ReferenceCallback) }, "storageClassName": { SchemaProps: spec.SchemaProps{ - Description: "StorageClassName is the persistent volume for ng monitor. Defaults to Kubernetes default storage class.", + Description: "StorageClassName is the persistent volume for ng monitoring. Defaults to Kubernetes default storage class.", Type: []string{"string"}, Format: "", }, }, }, - Required: []string{"replicas", "baseImage"}, + Required: []string{"baseImage"}, }, }, Dependencies: []string{ @@ -7489,7 +7482,7 @@ func schema_pkg_apis_pingcap_v1alpha1_TiDBConfig(ref common.ReferenceCallback) c } } -func schema_pkg_apis_pingcap_v1alpha1_TiDBNGMonitor(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_pingcap_v1alpha1_TiDBNGMonitoring(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -7513,7 +7506,7 @@ func schema_pkg_apis_pingcap_v1alpha1_TiDBNGMonitor(ref common.ReferenceCallback "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec contains all spec about tidb ng monitor", - Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBNGMonitorSpec"), + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBNGMonitoringSpec"), }, }, }, @@ -7521,15 +7514,16 @@ func schema_pkg_apis_pingcap_v1alpha1_TiDBNGMonitor(ref common.ReferenceCallback }, }, Dependencies: []string{ - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBNGMonitorSpec"}, + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBNGMonitoringSpec"}, } } -func schema_pkg_apis_pingcap_v1alpha1_TiDBNGMonitorSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_pingcap_v1alpha1_TiDBNGMonitoringSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, + Description: "TiDBNGMonitoringSpec is spec of tidb ng monitoring", + Type: []string{"object"}, Properties: map[string]spec.Schema{ "version": { SchemaProps: spec.SchemaProps{ @@ -7776,6 +7770,13 @@ func schema_pkg_apis_pingcap_v1alpha1_TiDBNGMonitorSpec(ref common.ReferenceCall }, }, }, + "paused": { + SchemaProps: spec.SchemaProps{ + Description: "Paused pause controller if it is true", + Type: []string{"boolean"}, + Format: "", + }, + }, }, Required: []string{"clusters"}, }, diff --git a/pkg/apis/pingcap/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/pingcap/v1alpha1/zz_generated.deepcopy.go index 2ce84266ac8..0974af7a746 100644 --- a/pkg/apis/pingcap/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/pingcap/v1alpha1/zz_generated.deepcopy.go @@ -2570,7 +2570,7 @@ func (in *MonitorContainer) DeepCopy() *MonitorContainer { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MonitorSpec) DeepCopyInto(out *MonitorSpec) { +func (in *NGMonitoringSpec) DeepCopyInto(out *NGMonitoringSpec) { *out = *in in.ComponentSpec.DeepCopyInto(&out.ComponentSpec) in.ResourceRequirements.DeepCopyInto(&out.ResourceRequirements) @@ -2582,18 +2582,18 @@ func (in *MonitorSpec) DeepCopyInto(out *MonitorSpec) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MonitorSpec. -func (in *MonitorSpec) DeepCopy() *MonitorSpec { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NGMonitoringSpec. +func (in *NGMonitoringSpec) DeepCopy() *NGMonitoringSpec { if in == nil { return nil } - out := new(MonitorSpec) + out := new(NGMonitoringSpec) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MonitorStatus) DeepCopyInto(out *MonitorStatus) { +func (in *NGMonitoringStatus) DeepCopyInto(out *NGMonitoringStatus) { *out = *in if in.StatefulSet != nil { in, out := &in.StatefulSet, &out.StatefulSet @@ -2603,12 +2603,12 @@ func (in *MonitorStatus) DeepCopyInto(out *MonitorStatus) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MonitorStatus. -func (in *MonitorStatus) DeepCopy() *MonitorStatus { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NGMonitoringStatus. +func (in *NGMonitoringStatus) DeepCopy() *NGMonitoringStatus { if in == nil { return nil } - out := new(MonitorStatus) + out := new(NGMonitoringStatus) in.DeepCopyInto(out) return out } @@ -5313,7 +5313,7 @@ func (in *TiDBMember) DeepCopy() *TiDBMember { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TiDBNGMonitor) DeepCopyInto(out *TiDBNGMonitor) { +func (in *TiDBNGMonitoring) DeepCopyInto(out *TiDBNGMonitoring) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) @@ -5322,24 +5322,32 @@ func (in *TiDBNGMonitor) DeepCopyInto(out *TiDBNGMonitor) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TiDBNGMonitor. -func (in *TiDBNGMonitor) DeepCopy() *TiDBNGMonitor { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TiDBNGMonitoring. +func (in *TiDBNGMonitoring) DeepCopy() *TiDBNGMonitoring { if in == nil { return nil } - out := new(TiDBNGMonitor) + out := new(TiDBNGMonitoring) in.DeepCopyInto(out) return out } +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TiDBNGMonitoring) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TiDBNGMonitorList) DeepCopyInto(out *TiDBNGMonitorList) { +func (in *TiDBNGMonitoringList) DeepCopyInto(out *TiDBNGMonitoringList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]TiDBNGMonitor, len(*in)) + *out = make([]TiDBNGMonitoring, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -5347,18 +5355,18 @@ func (in *TiDBNGMonitorList) DeepCopyInto(out *TiDBNGMonitorList) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TiDBNGMonitorList. -func (in *TiDBNGMonitorList) DeepCopy() *TiDBNGMonitorList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TiDBNGMonitoringList. +func (in *TiDBNGMonitoringList) DeepCopy() *TiDBNGMonitoringList { if in == nil { return nil } - out := new(TiDBNGMonitorList) + out := new(TiDBNGMonitoringList) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TiDBNGMonitorSpec) DeepCopyInto(out *TiDBNGMonitorSpec) { +func (in *TiDBNGMonitoringSpec) DeepCopyInto(out *TiDBNGMonitoringSpec) { *out = *in in.ComponentSpec.DeepCopyInto(&out.ComponentSpec) if in.Clusters != nil { @@ -5369,29 +5377,29 @@ func (in *TiDBNGMonitorSpec) DeepCopyInto(out *TiDBNGMonitorSpec) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TiDBNGMonitorSpec. -func (in *TiDBNGMonitorSpec) DeepCopy() *TiDBNGMonitorSpec { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TiDBNGMonitoringSpec. +func (in *TiDBNGMonitoringSpec) DeepCopy() *TiDBNGMonitoringSpec { if in == nil { return nil } - out := new(TiDBNGMonitorSpec) + out := new(TiDBNGMonitoringSpec) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TiDBNGMonitorStatus) DeepCopyInto(out *TiDBNGMonitorStatus) { +func (in *TiDBNGMonitoringStatus) DeepCopyInto(out *TiDBNGMonitoringStatus) { *out = *in - in.Monitor.DeepCopyInto(&out.Monitor) + in.NGMonitoring.DeepCopyInto(&out.NGMonitoring) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TiDBNGMonitorStatus. -func (in *TiDBNGMonitorStatus) DeepCopy() *TiDBNGMonitorStatus { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TiDBNGMonitoringStatus. +func (in *TiDBNGMonitoringStatus) DeepCopy() *TiDBNGMonitoringStatus { if in == nil { return nil } - out := new(TiDBNGMonitorStatus) + out := new(TiDBNGMonitoringStatus) in.DeepCopyInto(out) return out } diff --git a/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/fake/fake_pingcap_client.go b/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/fake/fake_pingcap_client.go index 9b1b6ce0da8..e3297745239 100644 --- a/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/fake/fake_pingcap_client.go +++ b/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/fake/fake_pingcap_client.go @@ -45,6 +45,10 @@ func (c *FakePingcapV1alpha1) Restores(namespace string) v1alpha1.RestoreInterfa return &FakeRestores{c, namespace} } +func (c *FakePingcapV1alpha1) TiDBNGMonitorings(namespace string) v1alpha1.TiDBNGMonitoringInterface { + return &FakeTiDBNGMonitorings{c, namespace} +} + func (c *FakePingcapV1alpha1) TidbClusters(namespace string) v1alpha1.TidbClusterInterface { return &FakeTidbClusters{c, namespace} } diff --git a/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/fake/fake_tidbngmonitoring.go b/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/fake/fake_tidbngmonitoring.go new file mode 100644 index 00000000000..0571a94d8d1 --- /dev/null +++ b/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/fake/fake_tidbngmonitoring.go @@ -0,0 +1,139 @@ +// Copyright PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1alpha1 "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" +) + +// FakeTiDBNGMonitorings implements TiDBNGMonitoringInterface +type FakeTiDBNGMonitorings struct { + Fake *FakePingcapV1alpha1 + ns string +} + +var tidbngmonitoringsResource = schema.GroupVersionResource{Group: "pingcap.com", Version: "v1alpha1", Resource: "tidbngmonitorings"} + +var tidbngmonitoringsKind = schema.GroupVersionKind{Group: "pingcap.com", Version: "v1alpha1", Kind: "TiDBNGMonitoring"} + +// Get takes name of the tiDBNGMonitoring, and returns the corresponding tiDBNGMonitoring object, and an error if there is any. +func (c *FakeTiDBNGMonitorings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.TiDBNGMonitoring, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(tidbngmonitoringsResource, c.ns, name), &v1alpha1.TiDBNGMonitoring{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.TiDBNGMonitoring), err +} + +// List takes label and field selectors, and returns the list of TiDBNGMonitorings that match those selectors. +func (c *FakeTiDBNGMonitorings) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.TiDBNGMonitoringList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(tidbngmonitoringsResource, tidbngmonitoringsKind, c.ns, opts), &v1alpha1.TiDBNGMonitoringList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.TiDBNGMonitoringList{ListMeta: obj.(*v1alpha1.TiDBNGMonitoringList).ListMeta} + for _, item := range obj.(*v1alpha1.TiDBNGMonitoringList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested tiDBNGMonitorings. +func (c *FakeTiDBNGMonitorings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(tidbngmonitoringsResource, c.ns, opts)) + +} + +// Create takes the representation of a tiDBNGMonitoring and creates it. Returns the server's representation of the tiDBNGMonitoring, and an error, if there is any. +func (c *FakeTiDBNGMonitorings) Create(ctx context.Context, tiDBNGMonitoring *v1alpha1.TiDBNGMonitoring, opts v1.CreateOptions) (result *v1alpha1.TiDBNGMonitoring, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(tidbngmonitoringsResource, c.ns, tiDBNGMonitoring), &v1alpha1.TiDBNGMonitoring{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.TiDBNGMonitoring), err +} + +// Update takes the representation of a tiDBNGMonitoring and updates it. Returns the server's representation of the tiDBNGMonitoring, and an error, if there is any. +func (c *FakeTiDBNGMonitorings) Update(ctx context.Context, tiDBNGMonitoring *v1alpha1.TiDBNGMonitoring, opts v1.UpdateOptions) (result *v1alpha1.TiDBNGMonitoring, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(tidbngmonitoringsResource, c.ns, tiDBNGMonitoring), &v1alpha1.TiDBNGMonitoring{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.TiDBNGMonitoring), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeTiDBNGMonitorings) UpdateStatus(ctx context.Context, tiDBNGMonitoring *v1alpha1.TiDBNGMonitoring, opts v1.UpdateOptions) (*v1alpha1.TiDBNGMonitoring, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(tidbngmonitoringsResource, "status", c.ns, tiDBNGMonitoring), &v1alpha1.TiDBNGMonitoring{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.TiDBNGMonitoring), err +} + +// Delete takes name of the tiDBNGMonitoring and deletes it. Returns an error if one occurs. +func (c *FakeTiDBNGMonitorings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteAction(tidbngmonitoringsResource, c.ns, name), &v1alpha1.TiDBNGMonitoring{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeTiDBNGMonitorings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(tidbngmonitoringsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.TiDBNGMonitoringList{}) + return err +} + +// Patch applies the patch and returns the patched tiDBNGMonitoring. +func (c *FakeTiDBNGMonitorings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.TiDBNGMonitoring, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(tidbngmonitoringsResource, c.ns, name, pt, data, subresources...), &v1alpha1.TiDBNGMonitoring{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.TiDBNGMonitoring), err +} diff --git a/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/generated_expansion.go b/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/generated_expansion.go index 5615cd24623..a20080a809f 100644 --- a/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/generated_expansion.go +++ b/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/generated_expansion.go @@ -25,6 +25,8 @@ type DataResourceExpansion interface{} type RestoreExpansion interface{} +type TiDBNGMonitoringExpansion interface{} + type TidbClusterExpansion interface{} type TidbClusterAutoScalerExpansion interface{} diff --git a/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/pingcap_client.go b/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/pingcap_client.go index 5f002baf642..9e4fe22c89f 100644 --- a/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/pingcap_client.go +++ b/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/pingcap_client.go @@ -28,6 +28,7 @@ type PingcapV1alpha1Interface interface { DMClustersGetter DataResourcesGetter RestoresGetter + TiDBNGMonitoringsGetter TidbClustersGetter TidbClusterAutoScalersGetter TidbInitializersGetter @@ -59,6 +60,10 @@ func (c *PingcapV1alpha1Client) Restores(namespace string) RestoreInterface { return newRestores(c, namespace) } +func (c *PingcapV1alpha1Client) TiDBNGMonitorings(namespace string) TiDBNGMonitoringInterface { + return newTiDBNGMonitorings(c, namespace) +} + func (c *PingcapV1alpha1Client) TidbClusters(namespace string) TidbClusterInterface { return newTidbClusters(c, namespace) } diff --git a/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/tidbngmonitoring.go b/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/tidbngmonitoring.go new file mode 100644 index 00000000000..3442c6ff785 --- /dev/null +++ b/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/tidbngmonitoring.go @@ -0,0 +1,192 @@ +// Copyright PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + "time" + + v1alpha1 "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" + scheme "github.com/pingcap/tidb-operator/pkg/client/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// TiDBNGMonitoringsGetter has a method to return a TiDBNGMonitoringInterface. +// A group's client should implement this interface. +type TiDBNGMonitoringsGetter interface { + TiDBNGMonitorings(namespace string) TiDBNGMonitoringInterface +} + +// TiDBNGMonitoringInterface has methods to work with TiDBNGMonitoring resources. +type TiDBNGMonitoringInterface interface { + Create(ctx context.Context, tiDBNGMonitoring *v1alpha1.TiDBNGMonitoring, opts v1.CreateOptions) (*v1alpha1.TiDBNGMonitoring, error) + Update(ctx context.Context, tiDBNGMonitoring *v1alpha1.TiDBNGMonitoring, opts v1.UpdateOptions) (*v1alpha1.TiDBNGMonitoring, error) + UpdateStatus(ctx context.Context, tiDBNGMonitoring *v1alpha1.TiDBNGMonitoring, opts v1.UpdateOptions) (*v1alpha1.TiDBNGMonitoring, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.TiDBNGMonitoring, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.TiDBNGMonitoringList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.TiDBNGMonitoring, err error) + TiDBNGMonitoringExpansion +} + +// tiDBNGMonitorings implements TiDBNGMonitoringInterface +type tiDBNGMonitorings struct { + client rest.Interface + ns string +} + +// newTiDBNGMonitorings returns a TiDBNGMonitorings +func newTiDBNGMonitorings(c *PingcapV1alpha1Client, namespace string) *tiDBNGMonitorings { + return &tiDBNGMonitorings{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the tiDBNGMonitoring, and returns the corresponding tiDBNGMonitoring object, and an error if there is any. +func (c *tiDBNGMonitorings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.TiDBNGMonitoring, err error) { + result = &v1alpha1.TiDBNGMonitoring{} + err = c.client.Get(). + Namespace(c.ns). + Resource("tidbngmonitorings"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of TiDBNGMonitorings that match those selectors. +func (c *tiDBNGMonitorings) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.TiDBNGMonitoringList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.TiDBNGMonitoringList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("tidbngmonitorings"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested tiDBNGMonitorings. +func (c *tiDBNGMonitorings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("tidbngmonitorings"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a tiDBNGMonitoring and creates it. Returns the server's representation of the tiDBNGMonitoring, and an error, if there is any. +func (c *tiDBNGMonitorings) Create(ctx context.Context, tiDBNGMonitoring *v1alpha1.TiDBNGMonitoring, opts v1.CreateOptions) (result *v1alpha1.TiDBNGMonitoring, err error) { + result = &v1alpha1.TiDBNGMonitoring{} + err = c.client.Post(). + Namespace(c.ns). + Resource("tidbngmonitorings"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(tiDBNGMonitoring). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a tiDBNGMonitoring and updates it. Returns the server's representation of the tiDBNGMonitoring, and an error, if there is any. +func (c *tiDBNGMonitorings) Update(ctx context.Context, tiDBNGMonitoring *v1alpha1.TiDBNGMonitoring, opts v1.UpdateOptions) (result *v1alpha1.TiDBNGMonitoring, err error) { + result = &v1alpha1.TiDBNGMonitoring{} + err = c.client.Put(). + Namespace(c.ns). + Resource("tidbngmonitorings"). + Name(tiDBNGMonitoring.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(tiDBNGMonitoring). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *tiDBNGMonitorings) UpdateStatus(ctx context.Context, tiDBNGMonitoring *v1alpha1.TiDBNGMonitoring, opts v1.UpdateOptions) (result *v1alpha1.TiDBNGMonitoring, err error) { + result = &v1alpha1.TiDBNGMonitoring{} + err = c.client.Put(). + Namespace(c.ns). + Resource("tidbngmonitorings"). + Name(tiDBNGMonitoring.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(tiDBNGMonitoring). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the tiDBNGMonitoring and deletes it. Returns an error if one occurs. +func (c *tiDBNGMonitorings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("tidbngmonitorings"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *tiDBNGMonitorings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("tidbngmonitorings"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched tiDBNGMonitoring. +func (c *tiDBNGMonitorings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.TiDBNGMonitoring, err error) { + result = &v1alpha1.TiDBNGMonitoring{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("tidbngmonitorings"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/pkg/client/informers/externalversions/generic.go b/pkg/client/informers/externalversions/generic.go index 768801e8b71..5f10a7b04f3 100644 --- a/pkg/client/informers/externalversions/generic.go +++ b/pkg/client/informers/externalversions/generic.go @@ -60,6 +60,8 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource return &genericInformer{resource: resource.GroupResource(), informer: f.Pingcap().V1alpha1().DataResources().Informer()}, nil case v1alpha1.SchemeGroupVersion.WithResource("restores"): return &genericInformer{resource: resource.GroupResource(), informer: f.Pingcap().V1alpha1().Restores().Informer()}, nil + case v1alpha1.SchemeGroupVersion.WithResource("tidbngmonitorings"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Pingcap().V1alpha1().TiDBNGMonitorings().Informer()}, nil case v1alpha1.SchemeGroupVersion.WithResource("tidbclusters"): return &genericInformer{resource: resource.GroupResource(), informer: f.Pingcap().V1alpha1().TidbClusters().Informer()}, nil case v1alpha1.SchemeGroupVersion.WithResource("tidbclusterautoscalers"): diff --git a/pkg/client/informers/externalversions/pingcap/v1alpha1/interface.go b/pkg/client/informers/externalversions/pingcap/v1alpha1/interface.go index a6f82de1533..f0942e9e5c7 100644 --- a/pkg/client/informers/externalversions/pingcap/v1alpha1/interface.go +++ b/pkg/client/informers/externalversions/pingcap/v1alpha1/interface.go @@ -31,6 +31,8 @@ type Interface interface { DataResources() DataResourceInformer // Restores returns a RestoreInformer. Restores() RestoreInformer + // TiDBNGMonitorings returns a TiDBNGMonitoringInformer. + TiDBNGMonitorings() TiDBNGMonitoringInformer // TidbClusters returns a TidbClusterInformer. TidbClusters() TidbClusterInformer // TidbClusterAutoScalers returns a TidbClusterAutoScalerInformer. @@ -77,6 +79,11 @@ func (v *version) Restores() RestoreInformer { return &restoreInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} } +// TiDBNGMonitorings returns a TiDBNGMonitoringInformer. +func (v *version) TiDBNGMonitorings() TiDBNGMonitoringInformer { + return &tiDBNGMonitoringInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} + // TidbClusters returns a TidbClusterInformer. func (v *version) TidbClusters() TidbClusterInformer { return &tidbClusterInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} diff --git a/pkg/client/informers/externalversions/pingcap/v1alpha1/tidbngmonitoring.go b/pkg/client/informers/externalversions/pingcap/v1alpha1/tidbngmonitoring.go new file mode 100644 index 00000000000..c36dbf6b93b --- /dev/null +++ b/pkg/client/informers/externalversions/pingcap/v1alpha1/tidbngmonitoring.go @@ -0,0 +1,87 @@ +// Copyright PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + time "time" + + pingcapv1alpha1 "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" + versioned "github.com/pingcap/tidb-operator/pkg/client/clientset/versioned" + internalinterfaces "github.com/pingcap/tidb-operator/pkg/client/informers/externalversions/internalinterfaces" + v1alpha1 "github.com/pingcap/tidb-operator/pkg/client/listers/pingcap/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +// TiDBNGMonitoringInformer provides access to a shared informer and lister for +// TiDBNGMonitorings. +type TiDBNGMonitoringInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha1.TiDBNGMonitoringLister +} + +type tiDBNGMonitoringInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewTiDBNGMonitoringInformer constructs a new informer for TiDBNGMonitoring type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewTiDBNGMonitoringInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredTiDBNGMonitoringInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredTiDBNGMonitoringInformer constructs a new informer for TiDBNGMonitoring type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredTiDBNGMonitoringInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.PingcapV1alpha1().TiDBNGMonitorings(namespace).List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.PingcapV1alpha1().TiDBNGMonitorings(namespace).Watch(context.TODO(), options) + }, + }, + &pingcapv1alpha1.TiDBNGMonitoring{}, + resyncPeriod, + indexers, + ) +} + +func (f *tiDBNGMonitoringInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredTiDBNGMonitoringInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *tiDBNGMonitoringInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&pingcapv1alpha1.TiDBNGMonitoring{}, f.defaultInformer) +} + +func (f *tiDBNGMonitoringInformer) Lister() v1alpha1.TiDBNGMonitoringLister { + return v1alpha1.NewTiDBNGMonitoringLister(f.Informer().GetIndexer()) +} diff --git a/pkg/client/listers/pingcap/v1alpha1/expansion_generated.go b/pkg/client/listers/pingcap/v1alpha1/expansion_generated.go index a3399796f94..88ea04e126a 100644 --- a/pkg/client/listers/pingcap/v1alpha1/expansion_generated.go +++ b/pkg/client/listers/pingcap/v1alpha1/expansion_generated.go @@ -55,6 +55,14 @@ type RestoreListerExpansion interface{} // RestoreNamespaceLister. type RestoreNamespaceListerExpansion interface{} +// TiDBNGMonitoringListerExpansion allows custom methods to be added to +// TiDBNGMonitoringLister. +type TiDBNGMonitoringListerExpansion interface{} + +// TiDBNGMonitoringNamespaceListerExpansion allows custom methods to be added to +// TiDBNGMonitoringNamespaceLister. +type TiDBNGMonitoringNamespaceListerExpansion interface{} + // TidbClusterListerExpansion allows custom methods to be added to // TidbClusterLister. type TidbClusterListerExpansion interface{} diff --git a/pkg/client/listers/pingcap/v1alpha1/tidbngmonitoring.go b/pkg/client/listers/pingcap/v1alpha1/tidbngmonitoring.go new file mode 100644 index 00000000000..fb78353f034 --- /dev/null +++ b/pkg/client/listers/pingcap/v1alpha1/tidbngmonitoring.go @@ -0,0 +1,96 @@ +// Copyright PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// TiDBNGMonitoringLister helps list TiDBNGMonitorings. +// All objects returned here must be treated as read-only. +type TiDBNGMonitoringLister interface { + // List lists all TiDBNGMonitorings in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.TiDBNGMonitoring, err error) + // TiDBNGMonitorings returns an object that can list and get TiDBNGMonitorings. + TiDBNGMonitorings(namespace string) TiDBNGMonitoringNamespaceLister + TiDBNGMonitoringListerExpansion +} + +// tiDBNGMonitoringLister implements the TiDBNGMonitoringLister interface. +type tiDBNGMonitoringLister struct { + indexer cache.Indexer +} + +// NewTiDBNGMonitoringLister returns a new TiDBNGMonitoringLister. +func NewTiDBNGMonitoringLister(indexer cache.Indexer) TiDBNGMonitoringLister { + return &tiDBNGMonitoringLister{indexer: indexer} +} + +// List lists all TiDBNGMonitorings in the indexer. +func (s *tiDBNGMonitoringLister) List(selector labels.Selector) (ret []*v1alpha1.TiDBNGMonitoring, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.TiDBNGMonitoring)) + }) + return ret, err +} + +// TiDBNGMonitorings returns an object that can list and get TiDBNGMonitorings. +func (s *tiDBNGMonitoringLister) TiDBNGMonitorings(namespace string) TiDBNGMonitoringNamespaceLister { + return tiDBNGMonitoringNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// TiDBNGMonitoringNamespaceLister helps list and get TiDBNGMonitorings. +// All objects returned here must be treated as read-only. +type TiDBNGMonitoringNamespaceLister interface { + // List lists all TiDBNGMonitorings in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.TiDBNGMonitoring, err error) + // Get retrieves the TiDBNGMonitoring from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1alpha1.TiDBNGMonitoring, error) + TiDBNGMonitoringNamespaceListerExpansion +} + +// tiDBNGMonitoringNamespaceLister implements the TiDBNGMonitoringNamespaceLister +// interface. +type tiDBNGMonitoringNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all TiDBNGMonitorings in the indexer for a given namespace. +func (s tiDBNGMonitoringNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.TiDBNGMonitoring, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.TiDBNGMonitoring)) + }) + return ret, err +} + +// Get retrieves the TiDBNGMonitoring from the indexer for a given namespace and name. +func (s tiDBNGMonitoringNamespaceLister) Get(name string) (*v1alpha1.TiDBNGMonitoring, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha1.Resource("tidbngmonitoring"), name) + } + return obj.(*v1alpha1.TiDBNGMonitoring), nil +} From 61d0830d11046caa1e451a68b4de9ad0c22248f7 Mon Sep 17 00:00:00 2001 From: Shiori Date: Thu, 2 Dec 2021 13:36:34 +0800 Subject: [PATCH 05/28] update all --- docs/api-references/docs.md | 95 +- manifests/crd.yaml | 2419 ++++++++++++++++- .../crd/v1/pingcap.com_tidbngmonitorings.yaml | 2287 +++++++++++++++- .../pingcap.com_tidbngmonitorings.yaml | 2283 +++++++++++++++- .../v1beta1/pingcap.com_tidbngmonitors.yaml | 2352 ---------------- manifests/crd_v1beta1.yaml | 2415 +++++++++++++++- pkg/apis/label/label.go | 20 + .../pingcap/v1alpha1/openapi_generated.go | 83 +- pkg/apis/pingcap/v1alpha1/types.go | 2 + .../pingcap/v1alpha1/zz_generated.deepcopy.go | 26 + 10 files changed, 9489 insertions(+), 2493 deletions(-) delete mode 100644 manifests/crd/v1beta1/pingcap.com_tidbngmonitors.yaml diff --git a/docs/api-references/docs.md b/docs/api-references/docs.md index d2c94ae1b17..3f8a32ac92b 100644 --- a/docs/api-references/docs.md +++ b/docs/api-references/docs.md @@ -1251,7 +1251,7 @@ RestoreStatus

    -monitor
    +ngMonitoring
    - -MonitorStatus + +NGMonitoringStatus
    +

    NGMonitoring is status of ng monitoring

    TiDBNGMonitoring

    -

    TidbMonitor contains the spec and status of tidb ng monitor

    +

    TiDBNGMonitoring contains the spec and status of tidb ng monitor

    @@ -1347,6 +1347,32 @@ bool

    Paused pause controller if it is true

    + + + + + + + +
    +pvReclaimPolicy
    + + +Kubernetes core/v1.PersistentVolumeReclaimPolicy + + +
    +

    Persistent volume reclaim policy applied to the PVs that consumed by TiDB cluster

    +
    +ngMonitoring
    + + +NGMonitoringSpec + + +
    +

    NGMonitoring is spec of ng monitoring

    +
    @@ -4908,6 +4934,18 @@ CrdKind + + +TiDBNGMonitoring
    + + +CrdKind + + + + + +

    DMClusterCondition

    @@ -8046,6 +8084,10 @@ Kubernetes core/v1.PullPolicy

    NGMonitoringSpec

    +(Appears on: +TiDBNGMonitoringSpec) +

    +

    NGMonitoringSpec is spec of ng monitoring

    @@ -8109,6 +8151,30 @@ string Defaults to Kubernetes default storage class.

    + + + + + + + +
    +storageVolumes
    + + +[]StorageVolume + + +
    +

    StorageVolumes configure additional storage for NG Monitoring pods.

    +
    +config
    + +github.com/pingcap/tidb-operator/pkg/apis/util/config.GenericConfig + +
    +

    Config is the configuration of ng monitoring

    +

    NGMonitoringStatus

    @@ -13014,6 +13080,7 @@ LocalStorageProvider

    StorageVolume

    (Appears on: +NGMonitoringSpec, PDSpec, TiCDCSpec, TiDBSpec, @@ -14523,6 +14590,32 @@ bool

    Paused pause controller if it is true

    + + +pvReclaimPolicy
    + + +Kubernetes core/v1.PersistentVolumeReclaimPolicy + + + + +

    Persistent volume reclaim policy applied to the PVs that consumed by TiDB cluster

    + + + + +ngMonitoring
    + + +NGMonitoringSpec + + + + +

    NGMonitoring is spec of ng monitoring

    + +

    TiDBNGMonitoringStatus

    diff --git a/manifests/crd.yaml b/manifests/crd.yaml index 877ba7d1fa8..6758ec3a445 100644 --- a/manifests/crd.yaml +++ b/manifests/crd.yaml @@ -31919,7 +31919,7 @@ spec: listKind: TiDBNGMonitoringList plural: tidbngmonitorings shortNames: - - tnm + - tngm singular: tidbngmonitoring scope: Namespaced versions: @@ -33452,6 +33452,7 @@ spec: - name type: object maxItems: 1 + minItems: 1 type: array configUpdateStrategy: type: string @@ -34078,77 +34079,2360 @@ spec: additionalProperties: type: string type: object - nodeSelector: - additionalProperties: - type: string - type: object - paused: - type: boolean - podManagementPolicy: - type: string - podSecurityContext: + ngMonitoring: properties: - fsGroup: - format: int64 - type: integer - fsGroupChangePolicy: - type: string - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - supplementalGroups: - items: - format: int64 - type: integer - type: array - sysctls: + additionalContainers: items: properties: - name: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: type: string - value: + imagePullPolicy: type: string - required: - - name - - value - type: object - type: array - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - runAsUserName: - type: string - type: object - type: object - priorityClassName: + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + 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 + 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 + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + additionalVolumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + additionalVolumes: + items: + properties: + awsElasticBlockStore: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + azureDisk: + properties: + cachingMode: + type: string + diskName: + type: string + diskURI: + type: string + fsType: + type: string + kind: + type: string + readOnly: + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + properties: + readOnly: + type: boolean + secretName: + type: string + shareName: + type: string + required: + - secretName + - shareName + type: object + cephfs: + properties: + monitors: + items: + type: string + type: array + path: + type: string + readOnly: + type: boolean + secretFile: + type: string + secretRef: + properties: + name: + type: string + type: object + user: + type: string + required: + - monitors + type: object + cinder: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + volumeID: + type: string + required: + - volumeID + type: object + configMap: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + csi: + properties: + driver: + type: string + fsType: + type: string + nodePublishSecretRef: + properties: + name: + type: string + type: object + readOnly: + type: boolean + volumeAttributes: + additionalProperties: + type: string + type: object + required: + - driver + type: object + downwardAPI: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + emptyDir: + properties: + medium: + type: string + sizeLimit: + 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: object + ephemeral: + properties: + readOnly: + type: boolean + volumeClaimTemplate: + properties: + metadata: + type: object + spec: + properties: + accessModes: + items: + type: string + type: array + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + resources: + 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 + 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 + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + storageClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object + required: + - spec + type: object + type: object + fc: + properties: + fsType: + type: string + lun: + format: int32 + type: integer + readOnly: + type: boolean + targetWWNs: + items: + type: string + type: array + wwids: + items: + type: string + type: array + type: object + flexVolume: + properties: + driver: + type: string + fsType: + type: string + options: + additionalProperties: + type: string + type: object + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + required: + - driver + type: object + flocker: + properties: + datasetName: + type: string + datasetUUID: + type: string + type: object + gcePersistentDisk: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + pdName: + type: string + readOnly: + type: boolean + required: + - pdName + type: object + gitRepo: + properties: + directory: + type: string + repository: + type: string + revision: + type: string + required: + - repository + type: object + glusterfs: + properties: + endpoints: + type: string + path: + type: string + readOnly: + type: boolean + required: + - endpoints + - path + type: object + hostPath: + properties: + path: + type: string + type: + type: string + required: + - path + type: object + iscsi: + properties: + chapAuthDiscovery: + type: boolean + chapAuthSession: + type: boolean + fsType: + type: string + initiatorName: + type: string + iqn: + type: string + iscsiInterface: + type: string + lun: + format: int32 + type: integer + portals: + items: + type: string + type: array + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + targetPortal: + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + type: string + nfs: + properties: + path: + type: string + readOnly: + type: boolean + server: + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + properties: + claimName: + type: string + readOnly: + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + properties: + fsType: + type: string + pdID: + type: string + required: + - pdID + type: object + portworxVolume: + properties: + fsType: + type: string + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + projected: + properties: + defaultMode: + format: int32 + type: integer + sources: + items: + properties: + configMap: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + downwardAPI: + properties: + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + secret: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + serviceAccountToken: + properties: + audience: + type: string + expirationSeconds: + format: int64 + type: integer + path: + type: string + required: + - path + type: object + type: object + type: array + required: + - sources + type: object + quobyte: + properties: + group: + type: string + readOnly: + type: boolean + registry: + type: string + tenant: + type: string + user: + type: string + volume: + type: string + required: + - registry + - volume + type: object + rbd: + properties: + fsType: + type: string + image: + type: string + keyring: + type: string + monitors: + items: + type: string + type: array + pool: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + user: + type: string + required: + - image + - monitors + type: object + scaleIO: + properties: + fsType: + type: string + gateway: + type: string + protectionDomain: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + sslEnabled: + type: boolean + storageMode: + type: string + storagePool: + type: string + system: + type: string + volumeName: + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + optional: + type: boolean + secretName: + type: string + type: object + storageos: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + volumeName: + type: string + volumeNamespace: + type: string + type: object + vsphereVolume: + properties: + fsType: + type: string + storagePolicyID: + type: string + storagePolicyName: + type: string + volumePath: + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + affinity: + properties: + nodeAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + preference: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + weight: + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + properties: + nodeSelectorTerms: + items: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + type: array + required: + - nodeSelectorTerms + type: object + type: object + podAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + type: object + podAntiAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + type: object + type: object + annotations: + additionalProperties: + type: string + type: object + baseImage: + default: pingcap/ng-monitoring + type: string + config: + x-kubernetes-preserve-unknown-fields: true + configUpdateStrategy: + type: string + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + hostNetwork: + type: boolean + image: + type: string + imagePullPolicy: + type: string + imagePullSecrets: + items: + properties: + name: + type: string + type: object + type: array + initContainers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + 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 + 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 + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + labels: + additionalProperties: + type: string + 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 + type: object + nodeSelector: + additionalProperties: + type: string + type: object + podManagementPolicy: + type: string + podSecurityContext: + properties: + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + supplementalGroups: + items: + format: int64 + type: integer + type: array + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + priorityClassName: + type: string + 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 + type: object + schedulerName: + type: string + statefulSetUpdateStrategy: + type: string + storageClassName: + type: string + storageVolumes: + items: + properties: + mountPath: + type: string + name: + type: string + storageClassName: + type: string + storageSize: + type: string + required: + - name + - storageSize + type: object + type: array + terminationGracePeriodSeconds: + format: int64 + type: integer + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + items: + properties: + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + x-kubernetes-list-map-keys: + - topologyKey + x-kubernetes-list-type: map + version: + type: string + required: + - baseImage + type: object + nodeSelector: + additionalProperties: + type: string + type: object + paused: + type: boolean + podManagementPolicy: + type: string + podSecurityContext: + properties: + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + supplementalGroups: + items: + format: int64 + type: integer + type: array + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + priorityClassName: + type: string + pvReclaimPolicy: + default: Retain type: string schedulerName: type: string @@ -34189,6 +36473,7 @@ spec: type: string required: - clusters + - ngMonitoring type: object status: properties: diff --git a/manifests/crd/v1/pingcap.com_tidbngmonitorings.yaml b/manifests/crd/v1/pingcap.com_tidbngmonitorings.yaml index 6895931499c..96cb9f1830f 100644 --- a/manifests/crd/v1/pingcap.com_tidbngmonitorings.yaml +++ b/manifests/crd/v1/pingcap.com_tidbngmonitorings.yaml @@ -14,7 +14,7 @@ spec: listKind: TiDBNGMonitoringList plural: tidbngmonitorings shortNames: - - tnm + - tngm singular: tidbngmonitoring scope: Namespaced versions: @@ -1547,6 +1547,7 @@ spec: - name type: object maxItems: 1 + minItems: 1 type: array configUpdateStrategy: type: string @@ -2173,6 +2174,2286 @@ spec: additionalProperties: type: string type: object + ngMonitoring: + properties: + additionalContainers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + 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 + 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 + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + additionalVolumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + additionalVolumes: + items: + properties: + awsElasticBlockStore: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + azureDisk: + properties: + cachingMode: + type: string + diskName: + type: string + diskURI: + type: string + fsType: + type: string + kind: + type: string + readOnly: + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + properties: + readOnly: + type: boolean + secretName: + type: string + shareName: + type: string + required: + - secretName + - shareName + type: object + cephfs: + properties: + monitors: + items: + type: string + type: array + path: + type: string + readOnly: + type: boolean + secretFile: + type: string + secretRef: + properties: + name: + type: string + type: object + user: + type: string + required: + - monitors + type: object + cinder: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + volumeID: + type: string + required: + - volumeID + type: object + configMap: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + csi: + properties: + driver: + type: string + fsType: + type: string + nodePublishSecretRef: + properties: + name: + type: string + type: object + readOnly: + type: boolean + volumeAttributes: + additionalProperties: + type: string + type: object + required: + - driver + type: object + downwardAPI: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + emptyDir: + properties: + medium: + type: string + sizeLimit: + 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: object + ephemeral: + properties: + readOnly: + type: boolean + volumeClaimTemplate: + properties: + metadata: + type: object + spec: + properties: + accessModes: + items: + type: string + type: array + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + resources: + 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 + 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 + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + storageClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object + required: + - spec + type: object + type: object + fc: + properties: + fsType: + type: string + lun: + format: int32 + type: integer + readOnly: + type: boolean + targetWWNs: + items: + type: string + type: array + wwids: + items: + type: string + type: array + type: object + flexVolume: + properties: + driver: + type: string + fsType: + type: string + options: + additionalProperties: + type: string + type: object + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + required: + - driver + type: object + flocker: + properties: + datasetName: + type: string + datasetUUID: + type: string + type: object + gcePersistentDisk: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + pdName: + type: string + readOnly: + type: boolean + required: + - pdName + type: object + gitRepo: + properties: + directory: + type: string + repository: + type: string + revision: + type: string + required: + - repository + type: object + glusterfs: + properties: + endpoints: + type: string + path: + type: string + readOnly: + type: boolean + required: + - endpoints + - path + type: object + hostPath: + properties: + path: + type: string + type: + type: string + required: + - path + type: object + iscsi: + properties: + chapAuthDiscovery: + type: boolean + chapAuthSession: + type: boolean + fsType: + type: string + initiatorName: + type: string + iqn: + type: string + iscsiInterface: + type: string + lun: + format: int32 + type: integer + portals: + items: + type: string + type: array + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + targetPortal: + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + type: string + nfs: + properties: + path: + type: string + readOnly: + type: boolean + server: + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + properties: + claimName: + type: string + readOnly: + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + properties: + fsType: + type: string + pdID: + type: string + required: + - pdID + type: object + portworxVolume: + properties: + fsType: + type: string + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + projected: + properties: + defaultMode: + format: int32 + type: integer + sources: + items: + properties: + configMap: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + downwardAPI: + properties: + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + secret: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + serviceAccountToken: + properties: + audience: + type: string + expirationSeconds: + format: int64 + type: integer + path: + type: string + required: + - path + type: object + type: object + type: array + required: + - sources + type: object + quobyte: + properties: + group: + type: string + readOnly: + type: boolean + registry: + type: string + tenant: + type: string + user: + type: string + volume: + type: string + required: + - registry + - volume + type: object + rbd: + properties: + fsType: + type: string + image: + type: string + keyring: + type: string + monitors: + items: + type: string + type: array + pool: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + user: + type: string + required: + - image + - monitors + type: object + scaleIO: + properties: + fsType: + type: string + gateway: + type: string + protectionDomain: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + sslEnabled: + type: boolean + storageMode: + type: string + storagePool: + type: string + system: + type: string + volumeName: + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + optional: + type: boolean + secretName: + type: string + type: object + storageos: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + volumeName: + type: string + volumeNamespace: + type: string + type: object + vsphereVolume: + properties: + fsType: + type: string + storagePolicyID: + type: string + storagePolicyName: + type: string + volumePath: + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + affinity: + properties: + nodeAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + preference: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + weight: + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + properties: + nodeSelectorTerms: + items: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + type: array + required: + - nodeSelectorTerms + type: object + type: object + podAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + type: object + podAntiAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + type: object + type: object + annotations: + additionalProperties: + type: string + type: object + baseImage: + default: pingcap/ng-monitoring + type: string + config: + x-kubernetes-preserve-unknown-fields: true + configUpdateStrategy: + type: string + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + hostNetwork: + type: boolean + image: + type: string + imagePullPolicy: + type: string + imagePullSecrets: + items: + properties: + name: + type: string + type: object + type: array + initContainers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + 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 + 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 + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + labels: + additionalProperties: + type: string + 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 + type: object + nodeSelector: + additionalProperties: + type: string + type: object + podManagementPolicy: + type: string + podSecurityContext: + properties: + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + supplementalGroups: + items: + format: int64 + type: integer + type: array + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + priorityClassName: + type: string + 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 + type: object + schedulerName: + type: string + statefulSetUpdateStrategy: + type: string + storageClassName: + type: string + storageVolumes: + items: + properties: + mountPath: + type: string + name: + type: string + storageClassName: + type: string + storageSize: + type: string + required: + - name + - storageSize + type: object + type: array + terminationGracePeriodSeconds: + format: int64 + type: integer + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + items: + properties: + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + x-kubernetes-list-map-keys: + - topologyKey + x-kubernetes-list-type: map + version: + type: string + required: + - baseImage + type: object nodeSelector: additionalProperties: type: string @@ -2245,6 +4526,9 @@ spec: type: object priorityClassName: type: string + pvReclaimPolicy: + default: Retain + type: string schedulerName: type: string statefulSetUpdateStrategy: @@ -2284,6 +4568,7 @@ spec: type: string required: - clusters + - ngMonitoring type: object status: properties: diff --git a/manifests/crd/v1beta1/pingcap.com_tidbngmonitorings.yaml b/manifests/crd/v1beta1/pingcap.com_tidbngmonitorings.yaml index 122ebdeec35..04a9343f7dd 100644 --- a/manifests/crd/v1beta1/pingcap.com_tidbngmonitorings.yaml +++ b/manifests/crd/v1beta1/pingcap.com_tidbngmonitorings.yaml @@ -14,7 +14,7 @@ spec: listKind: TiDBNGMonitoringList plural: tidbngmonitorings shortNames: - - tnm + - tngm singular: tidbngmonitoring preserveUnknownFields: false scope: Namespaced @@ -1545,6 +1545,7 @@ spec: - name type: object maxItems: 1 + minItems: 1 type: array configUpdateStrategy: type: string @@ -2170,6 +2171,2283 @@ spec: additionalProperties: type: string type: object + ngMonitoring: + properties: + additionalContainers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + 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 + 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 + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + additionalVolumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + additionalVolumes: + items: + properties: + awsElasticBlockStore: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + azureDisk: + properties: + cachingMode: + type: string + diskName: + type: string + diskURI: + type: string + fsType: + type: string + kind: + type: string + readOnly: + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + properties: + readOnly: + type: boolean + secretName: + type: string + shareName: + type: string + required: + - secretName + - shareName + type: object + cephfs: + properties: + monitors: + items: + type: string + type: array + path: + type: string + readOnly: + type: boolean + secretFile: + type: string + secretRef: + properties: + name: + type: string + type: object + user: + type: string + required: + - monitors + type: object + cinder: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + volumeID: + type: string + required: + - volumeID + type: object + configMap: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + csi: + properties: + driver: + type: string + fsType: + type: string + nodePublishSecretRef: + properties: + name: + type: string + type: object + readOnly: + type: boolean + volumeAttributes: + additionalProperties: + type: string + type: object + required: + - driver + type: object + downwardAPI: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + emptyDir: + properties: + medium: + type: string + sizeLimit: + 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: object + ephemeral: + properties: + readOnly: + type: boolean + volumeClaimTemplate: + properties: + metadata: + type: object + spec: + properties: + accessModes: + items: + type: string + type: array + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + resources: + 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 + 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 + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + storageClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object + required: + - spec + type: object + type: object + fc: + properties: + fsType: + type: string + lun: + format: int32 + type: integer + readOnly: + type: boolean + targetWWNs: + items: + type: string + type: array + wwids: + items: + type: string + type: array + type: object + flexVolume: + properties: + driver: + type: string + fsType: + type: string + options: + additionalProperties: + type: string + type: object + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + required: + - driver + type: object + flocker: + properties: + datasetName: + type: string + datasetUUID: + type: string + type: object + gcePersistentDisk: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + pdName: + type: string + readOnly: + type: boolean + required: + - pdName + type: object + gitRepo: + properties: + directory: + type: string + repository: + type: string + revision: + type: string + required: + - repository + type: object + glusterfs: + properties: + endpoints: + type: string + path: + type: string + readOnly: + type: boolean + required: + - endpoints + - path + type: object + hostPath: + properties: + path: + type: string + type: + type: string + required: + - path + type: object + iscsi: + properties: + chapAuthDiscovery: + type: boolean + chapAuthSession: + type: boolean + fsType: + type: string + initiatorName: + type: string + iqn: + type: string + iscsiInterface: + type: string + lun: + format: int32 + type: integer + portals: + items: + type: string + type: array + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + targetPortal: + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + type: string + nfs: + properties: + path: + type: string + readOnly: + type: boolean + server: + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + properties: + claimName: + type: string + readOnly: + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + properties: + fsType: + type: string + pdID: + type: string + required: + - pdID + type: object + portworxVolume: + properties: + fsType: + type: string + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + projected: + properties: + defaultMode: + format: int32 + type: integer + sources: + items: + properties: + configMap: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + downwardAPI: + properties: + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + secret: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + serviceAccountToken: + properties: + audience: + type: string + expirationSeconds: + format: int64 + type: integer + path: + type: string + required: + - path + type: object + type: object + type: array + required: + - sources + type: object + quobyte: + properties: + group: + type: string + readOnly: + type: boolean + registry: + type: string + tenant: + type: string + user: + type: string + volume: + type: string + required: + - registry + - volume + type: object + rbd: + properties: + fsType: + type: string + image: + type: string + keyring: + type: string + monitors: + items: + type: string + type: array + pool: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + user: + type: string + required: + - image + - monitors + type: object + scaleIO: + properties: + fsType: + type: string + gateway: + type: string + protectionDomain: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + sslEnabled: + type: boolean + storageMode: + type: string + storagePool: + type: string + system: + type: string + volumeName: + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + optional: + type: boolean + secretName: + type: string + type: object + storageos: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + volumeName: + type: string + volumeNamespace: + type: string + type: object + vsphereVolume: + properties: + fsType: + type: string + storagePolicyID: + type: string + storagePolicyName: + type: string + volumePath: + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + affinity: + properties: + nodeAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + preference: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + weight: + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + properties: + nodeSelectorTerms: + items: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + type: array + required: + - nodeSelectorTerms + type: object + type: object + podAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + type: object + podAntiAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + type: object + type: object + annotations: + additionalProperties: + type: string + type: object + baseImage: + type: string + config: + x-kubernetes-preserve-unknown-fields: true + configUpdateStrategy: + type: string + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + hostNetwork: + type: boolean + image: + type: string + imagePullPolicy: + type: string + imagePullSecrets: + items: + properties: + name: + type: string + type: object + type: array + initContainers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + 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 + 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 + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + labels: + additionalProperties: + type: string + 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 + type: object + nodeSelector: + additionalProperties: + type: string + type: object + podManagementPolicy: + type: string + podSecurityContext: + properties: + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + supplementalGroups: + items: + format: int64 + type: integer + type: array + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + priorityClassName: + type: string + 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 + type: object + schedulerName: + type: string + statefulSetUpdateStrategy: + type: string + storageClassName: + type: string + storageVolumes: + items: + properties: + mountPath: + type: string + name: + type: string + storageClassName: + type: string + storageSize: + type: string + required: + - name + - storageSize + type: object + type: array + terminationGracePeriodSeconds: + format: int64 + type: integer + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + items: + properties: + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + x-kubernetes-list-map-keys: + - topologyKey + x-kubernetes-list-type: map + version: + type: string + required: + - baseImage + type: object nodeSelector: additionalProperties: type: string @@ -2242,6 +4520,8 @@ spec: type: object priorityClassName: type: string + pvReclaimPolicy: + type: string schedulerName: type: string statefulSetUpdateStrategy: @@ -2281,6 +4561,7 @@ spec: type: string required: - clusters + - ngMonitoring type: object status: properties: diff --git a/manifests/crd/v1beta1/pingcap.com_tidbngmonitors.yaml b/manifests/crd/v1beta1/pingcap.com_tidbngmonitors.yaml deleted file mode 100644 index 26ff8e5909e..00000000000 --- a/manifests/crd/v1beta1/pingcap.com_tidbngmonitors.yaml +++ /dev/null @@ -1,2352 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.6.2 - creationTimestamp: null - name: tidbngmonitors.pingcap.com -spec: - group: pingcap.com - names: - kind: TiDBNGMonitor - listKind: TiDBNGMonitorList - plural: tidbngmonitors - shortNames: - - tnm - singular: tidbngmonitor - preserveUnknownFields: false - scope: Namespaced - validation: - openAPIV3Schema: - properties: - apiVersion: - type: string - kind: - type: string - metadata: - type: object - spec: - properties: - additionalContainers: - items: - properties: - args: - items: - type: string - type: array - command: - items: - type: string - type: array - env: - items: - properties: - name: - type: string - value: - type: string - valueFrom: - properties: - configMapKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - resourceFieldRef: - properties: - containerName: - type: string - divisor: - 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 - resource: - type: string - required: - - resource - type: object - secretKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - type: object - required: - - name - type: object - type: array - envFrom: - items: - properties: - configMapRef: - properties: - name: - type: string - optional: - type: boolean - type: object - prefix: - type: string - secretRef: - properties: - name: - type: string - optional: - type: boolean - type: object - type: object - type: array - image: - type: string - imagePullPolicy: - type: string - lifecycle: - properties: - postStart: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - preStop: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - type: object - livenessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - timeoutSeconds: - format: int32 - type: integer - type: object - name: - type: string - ports: - items: - properties: - containerPort: - format: int32 - type: integer - hostIP: - type: string - hostPort: - format: int32 - type: integer - name: - type: string - protocol: - type: string - required: - - containerPort - type: object - type: array - x-kubernetes-list-map-keys: - - containerPort - - protocol - x-kubernetes-list-type: map - readinessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - timeoutSeconds: - format: int32 - type: integer - type: object - resources: - 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 - 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 - type: object - type: object - securityContext: - properties: - allowPrivilegeEscalation: - type: boolean - capabilities: - properties: - add: - items: - type: string - type: array - drop: - items: - type: string - type: array - type: object - privileged: - type: boolean - procMount: - type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - runAsUserName: - type: string - type: object - type: object - startupProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - timeoutSeconds: - format: int32 - type: integer - type: object - stdin: - type: boolean - stdinOnce: - type: boolean - terminationMessagePath: - type: string - terminationMessagePolicy: - type: string - tty: - type: boolean - volumeDevices: - items: - properties: - devicePath: - type: string - name: - type: string - required: - - devicePath - - name - type: object - type: array - volumeMounts: - items: - properties: - mountPath: - type: string - mountPropagation: - type: string - name: - type: string - readOnly: - type: boolean - subPath: - type: string - subPathExpr: - type: string - required: - - mountPath - - name - type: object - type: array - workingDir: - type: string - required: - - name - type: object - type: array - additionalVolumeMounts: - items: - properties: - mountPath: - type: string - mountPropagation: - type: string - name: - type: string - readOnly: - type: boolean - subPath: - type: string - subPathExpr: - type: string - required: - - mountPath - - name - type: object - type: array - additionalVolumes: - items: - properties: - awsElasticBlockStore: - properties: - fsType: - type: string - partition: - format: int32 - type: integer - readOnly: - type: boolean - volumeID: - type: string - required: - - volumeID - type: object - azureDisk: - properties: - cachingMode: - type: string - diskName: - type: string - diskURI: - type: string - fsType: - type: string - kind: - type: string - readOnly: - type: boolean - required: - - diskName - - diskURI - type: object - azureFile: - properties: - readOnly: - type: boolean - secretName: - type: string - shareName: - type: string - required: - - secretName - - shareName - type: object - cephfs: - properties: - monitors: - items: - type: string - type: array - path: - type: string - readOnly: - type: boolean - secretFile: - type: string - secretRef: - properties: - name: - type: string - type: object - user: - type: string - required: - - monitors - type: object - cinder: - properties: - fsType: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - volumeID: - type: string - required: - - volumeID - type: object - configMap: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - csi: - properties: - driver: - type: string - fsType: - type: string - nodePublishSecretRef: - properties: - name: - type: string - type: object - readOnly: - type: boolean - volumeAttributes: - additionalProperties: - type: string - type: object - required: - - driver - type: object - downwardAPI: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - mode: - format: int32 - type: integer - path: - type: string - resourceFieldRef: - properties: - containerName: - type: string - divisor: - 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 - resource: - type: string - required: - - resource - type: object - required: - - path - type: object - type: array - type: object - emptyDir: - properties: - medium: - type: string - sizeLimit: - 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: object - ephemeral: - properties: - readOnly: - type: boolean - volumeClaimTemplate: - properties: - metadata: - type: object - spec: - properties: - accessModes: - items: - type: string - type: array - dataSource: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - resources: - 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 - 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 - type: object - type: object - selector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - storageClassName: - type: string - volumeMode: - type: string - volumeName: - type: string - type: object - required: - - spec - type: object - type: object - fc: - properties: - fsType: - type: string - lun: - format: int32 - type: integer - readOnly: - type: boolean - targetWWNs: - items: - type: string - type: array - wwids: - items: - type: string - type: array - type: object - flexVolume: - properties: - driver: - type: string - fsType: - type: string - options: - additionalProperties: - type: string - type: object - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - required: - - driver - type: object - flocker: - properties: - datasetName: - type: string - datasetUUID: - type: string - type: object - gcePersistentDisk: - properties: - fsType: - type: string - partition: - format: int32 - type: integer - pdName: - type: string - readOnly: - type: boolean - required: - - pdName - type: object - gitRepo: - properties: - directory: - type: string - repository: - type: string - revision: - type: string - required: - - repository - type: object - glusterfs: - properties: - endpoints: - type: string - path: - type: string - readOnly: - type: boolean - required: - - endpoints - - path - type: object - hostPath: - properties: - path: - type: string - type: - type: string - required: - - path - type: object - iscsi: - properties: - chapAuthDiscovery: - type: boolean - chapAuthSession: - type: boolean - fsType: - type: string - initiatorName: - type: string - iqn: - type: string - iscsiInterface: - type: string - lun: - format: int32 - type: integer - portals: - items: - type: string - type: array - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - targetPortal: - type: string - required: - - iqn - - lun - - targetPortal - type: object - name: - type: string - nfs: - properties: - path: - type: string - readOnly: - type: boolean - server: - type: string - required: - - path - - server - type: object - persistentVolumeClaim: - properties: - claimName: - type: string - readOnly: - type: boolean - required: - - claimName - type: object - photonPersistentDisk: - properties: - fsType: - type: string - pdID: - type: string - required: - - pdID - type: object - portworxVolume: - properties: - fsType: - type: string - readOnly: - type: boolean - volumeID: - type: string - required: - - volumeID - type: object - projected: - properties: - defaultMode: - format: int32 - type: integer - sources: - items: - properties: - configMap: - properties: - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - downwardAPI: - properties: - items: - items: - properties: - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - mode: - format: int32 - type: integer - path: - type: string - resourceFieldRef: - properties: - containerName: - type: string - divisor: - 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 - resource: - type: string - required: - - resource - type: object - required: - - path - type: object - type: array - type: object - secret: - properties: - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - serviceAccountToken: - properties: - audience: - type: string - expirationSeconds: - format: int64 - type: integer - path: - type: string - required: - - path - type: object - type: object - type: array - required: - - sources - type: object - quobyte: - properties: - group: - type: string - readOnly: - type: boolean - registry: - type: string - tenant: - type: string - user: - type: string - volume: - type: string - required: - - registry - - volume - type: object - rbd: - properties: - fsType: - type: string - image: - type: string - keyring: - type: string - monitors: - items: - type: string - type: array - pool: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - user: - type: string - required: - - image - - monitors - type: object - scaleIO: - properties: - fsType: - type: string - gateway: - type: string - protectionDomain: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - sslEnabled: - type: boolean - storageMode: - type: string - storagePool: - type: string - system: - type: string - volumeName: - type: string - required: - - gateway - - secretRef - - system - type: object - secret: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - optional: - type: boolean - secretName: - type: string - type: object - storageos: - properties: - fsType: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - volumeName: - type: string - volumeNamespace: - type: string - type: object - vsphereVolume: - properties: - fsType: - type: string - storagePolicyID: - type: string - storagePolicyName: - type: string - volumePath: - type: string - required: - - volumePath - type: object - required: - - name - type: object - type: array - affinity: - properties: - nodeAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - preference: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - weight: - format: int32 - type: integer - required: - - preference - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - properties: - nodeSelectorTerms: - items: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - type: array - required: - - nodeSelectorTerms - type: object - type: object - podAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - podAffinityTerm: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - weight: - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - items: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - type: array - type: object - podAntiAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - podAffinityTerm: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - weight: - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - items: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - type: array - type: object - type: object - annotations: - additionalProperties: - type: string - type: object - clusters: - items: - properties: - clusterDomain: - type: string - name: - type: string - namespace: - type: string - required: - - name - type: object - type: array - configUpdateStrategy: - type: string - env: - items: - properties: - name: - type: string - value: - type: string - valueFrom: - properties: - configMapKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - resourceFieldRef: - properties: - containerName: - type: string - divisor: - 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 - resource: - type: string - required: - - resource - type: object - secretKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - type: object - required: - - name - type: object - type: array - hostNetwork: - type: boolean - image: - type: string - imagePullPolicy: - type: string - imagePullSecrets: - items: - properties: - name: - type: string - type: object - type: array - initContainers: - items: - properties: - args: - items: - type: string - type: array - command: - items: - type: string - type: array - env: - items: - properties: - name: - type: string - value: - type: string - valueFrom: - properties: - configMapKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - resourceFieldRef: - properties: - containerName: - type: string - divisor: - 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 - resource: - type: string - required: - - resource - type: object - secretKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - type: object - required: - - name - type: object - type: array - envFrom: - items: - properties: - configMapRef: - properties: - name: - type: string - optional: - type: boolean - type: object - prefix: - type: string - secretRef: - properties: - name: - type: string - optional: - type: boolean - type: object - type: object - type: array - image: - type: string - imagePullPolicy: - type: string - lifecycle: - properties: - postStart: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - preStop: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - type: object - livenessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - timeoutSeconds: - format: int32 - type: integer - type: object - name: - type: string - ports: - items: - properties: - containerPort: - format: int32 - type: integer - hostIP: - type: string - hostPort: - format: int32 - type: integer - name: - type: string - protocol: - type: string - required: - - containerPort - type: object - type: array - x-kubernetes-list-map-keys: - - containerPort - - protocol - x-kubernetes-list-type: map - readinessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - timeoutSeconds: - format: int32 - type: integer - type: object - resources: - 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 - 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 - type: object - type: object - securityContext: - properties: - allowPrivilegeEscalation: - type: boolean - capabilities: - properties: - add: - items: - type: string - type: array - drop: - items: - type: string - type: array - type: object - privileged: - type: boolean - procMount: - type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - runAsUserName: - type: string - type: object - type: object - startupProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - timeoutSeconds: - format: int32 - type: integer - type: object - stdin: - type: boolean - stdinOnce: - type: boolean - terminationMessagePath: - type: string - terminationMessagePolicy: - type: string - tty: - type: boolean - volumeDevices: - items: - properties: - devicePath: - type: string - name: - type: string - required: - - devicePath - - name - type: object - type: array - volumeMounts: - items: - properties: - mountPath: - type: string - mountPropagation: - type: string - name: - type: string - readOnly: - type: boolean - subPath: - type: string - subPathExpr: - type: string - required: - - mountPath - - name - type: object - type: array - workingDir: - type: string - required: - - name - type: object - type: array - labels: - additionalProperties: - type: string - type: object - nodeSelector: - additionalProperties: - type: string - type: object - podManagementPolicy: - type: string - podSecurityContext: - properties: - fsGroup: - format: int64 - type: integer - fsGroupChangePolicy: - type: string - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - supplementalGroups: - items: - format: int64 - type: integer - type: array - sysctls: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - runAsUserName: - type: string - type: object - type: object - priorityClassName: - type: string - schedulerName: - type: string - statefulSetUpdateStrategy: - type: string - terminationGracePeriodSeconds: - format: int64 - type: integer - tolerations: - items: - properties: - effect: - type: string - key: - type: string - operator: - type: string - tolerationSeconds: - format: int64 - type: integer - value: - type: string - type: object - type: array - topologySpreadConstraints: - items: - properties: - topologyKey: - type: string - required: - - topologyKey - type: object - type: array - x-kubernetes-list-map-keys: - - topologyKey - x-kubernetes-list-type: map - version: - type: string - required: - - clusters - type: object - status: - properties: - monitor: - properties: - phase: - type: string - statefulSet: - properties: - collisionCount: - format: int32 - type: integer - conditions: - items: - properties: - lastTransitionTime: - format: date-time - type: string - message: - type: string - reason: - type: string - status: - type: string - type: - type: string - required: - - status - - type - type: object - type: array - currentReplicas: - format: int32 - type: integer - currentRevision: - type: string - observedGeneration: - format: int64 - type: integer - readyReplicas: - format: int32 - type: integer - replicas: - format: int32 - type: integer - updateRevision: - type: string - updatedReplicas: - format: int32 - type: integer - required: - - replicas - type: object - synced: - type: boolean - type: object - type: object - required: - - metadata - - spec - type: object - version: v1alpha1 - versions: - - name: v1alpha1 - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/manifests/crd_v1beta1.yaml b/manifests/crd_v1beta1.yaml index 61d81b1c906..bf0bb4b3d70 100644 --- a/manifests/crd_v1beta1.yaml +++ b/manifests/crd_v1beta1.yaml @@ -31897,7 +31897,7 @@ spec: listKind: TiDBNGMonitoringList plural: tidbngmonitorings shortNames: - - tnm + - tngm singular: tidbngmonitoring preserveUnknownFields: false scope: Namespaced @@ -33428,6 +33428,7 @@ spec: - name type: object maxItems: 1 + minItems: 1 type: array configUpdateStrategy: type: string @@ -34053,77 +34054,2356 @@ spec: additionalProperties: type: string type: object - nodeSelector: - additionalProperties: - type: string - type: object - paused: - type: boolean - podManagementPolicy: - type: string - podSecurityContext: + ngMonitoring: properties: - fsGroup: - format: int64 - type: integer - fsGroupChangePolicy: - type: string - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - supplementalGroups: - items: - format: int64 - type: integer - type: array - sysctls: + additionalContainers: items: properties: - name: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: type: string - value: + imagePullPolicy: type: string - required: - - name - - value - type: object - type: array - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - runAsUserName: - type: string - type: object - type: object - priorityClassName: + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + 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 + 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 + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + additionalVolumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + additionalVolumes: + items: + properties: + awsElasticBlockStore: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + azureDisk: + properties: + cachingMode: + type: string + diskName: + type: string + diskURI: + type: string + fsType: + type: string + kind: + type: string + readOnly: + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + properties: + readOnly: + type: boolean + secretName: + type: string + shareName: + type: string + required: + - secretName + - shareName + type: object + cephfs: + properties: + monitors: + items: + type: string + type: array + path: + type: string + readOnly: + type: boolean + secretFile: + type: string + secretRef: + properties: + name: + type: string + type: object + user: + type: string + required: + - monitors + type: object + cinder: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + volumeID: + type: string + required: + - volumeID + type: object + configMap: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + csi: + properties: + driver: + type: string + fsType: + type: string + nodePublishSecretRef: + properties: + name: + type: string + type: object + readOnly: + type: boolean + volumeAttributes: + additionalProperties: + type: string + type: object + required: + - driver + type: object + downwardAPI: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + emptyDir: + properties: + medium: + type: string + sizeLimit: + 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: object + ephemeral: + properties: + readOnly: + type: boolean + volumeClaimTemplate: + properties: + metadata: + type: object + spec: + properties: + accessModes: + items: + type: string + type: array + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + resources: + 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 + 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 + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + storageClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object + required: + - spec + type: object + type: object + fc: + properties: + fsType: + type: string + lun: + format: int32 + type: integer + readOnly: + type: boolean + targetWWNs: + items: + type: string + type: array + wwids: + items: + type: string + type: array + type: object + flexVolume: + properties: + driver: + type: string + fsType: + type: string + options: + additionalProperties: + type: string + type: object + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + required: + - driver + type: object + flocker: + properties: + datasetName: + type: string + datasetUUID: + type: string + type: object + gcePersistentDisk: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + pdName: + type: string + readOnly: + type: boolean + required: + - pdName + type: object + gitRepo: + properties: + directory: + type: string + repository: + type: string + revision: + type: string + required: + - repository + type: object + glusterfs: + properties: + endpoints: + type: string + path: + type: string + readOnly: + type: boolean + required: + - endpoints + - path + type: object + hostPath: + properties: + path: + type: string + type: + type: string + required: + - path + type: object + iscsi: + properties: + chapAuthDiscovery: + type: boolean + chapAuthSession: + type: boolean + fsType: + type: string + initiatorName: + type: string + iqn: + type: string + iscsiInterface: + type: string + lun: + format: int32 + type: integer + portals: + items: + type: string + type: array + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + targetPortal: + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + type: string + nfs: + properties: + path: + type: string + readOnly: + type: boolean + server: + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + properties: + claimName: + type: string + readOnly: + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + properties: + fsType: + type: string + pdID: + type: string + required: + - pdID + type: object + portworxVolume: + properties: + fsType: + type: string + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + projected: + properties: + defaultMode: + format: int32 + type: integer + sources: + items: + properties: + configMap: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + downwardAPI: + properties: + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + secret: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + serviceAccountToken: + properties: + audience: + type: string + expirationSeconds: + format: int64 + type: integer + path: + type: string + required: + - path + type: object + type: object + type: array + required: + - sources + type: object + quobyte: + properties: + group: + type: string + readOnly: + type: boolean + registry: + type: string + tenant: + type: string + user: + type: string + volume: + type: string + required: + - registry + - volume + type: object + rbd: + properties: + fsType: + type: string + image: + type: string + keyring: + type: string + monitors: + items: + type: string + type: array + pool: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + user: + type: string + required: + - image + - monitors + type: object + scaleIO: + properties: + fsType: + type: string + gateway: + type: string + protectionDomain: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + sslEnabled: + type: boolean + storageMode: + type: string + storagePool: + type: string + system: + type: string + volumeName: + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + optional: + type: boolean + secretName: + type: string + type: object + storageos: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + volumeName: + type: string + volumeNamespace: + type: string + type: object + vsphereVolume: + properties: + fsType: + type: string + storagePolicyID: + type: string + storagePolicyName: + type: string + volumePath: + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + affinity: + properties: + nodeAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + preference: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + weight: + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + properties: + nodeSelectorTerms: + items: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + type: array + required: + - nodeSelectorTerms + type: object + type: object + podAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + type: object + podAntiAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + type: object + type: object + annotations: + additionalProperties: + type: string + type: object + baseImage: + type: string + config: + x-kubernetes-preserve-unknown-fields: true + configUpdateStrategy: + type: string + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + hostNetwork: + type: boolean + image: + type: string + imagePullPolicy: + type: string + imagePullSecrets: + items: + properties: + name: + type: string + type: object + type: array + initContainers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + 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 + 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 + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + labels: + additionalProperties: + type: string + 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 + type: object + nodeSelector: + additionalProperties: + type: string + type: object + podManagementPolicy: + type: string + podSecurityContext: + properties: + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + supplementalGroups: + items: + format: int64 + type: integer + type: array + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + priorityClassName: + type: string + 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 + type: object + schedulerName: + type: string + statefulSetUpdateStrategy: + type: string + storageClassName: + type: string + storageVolumes: + items: + properties: + mountPath: + type: string + name: + type: string + storageClassName: + type: string + storageSize: + type: string + required: + - name + - storageSize + type: object + type: array + terminationGracePeriodSeconds: + format: int64 + type: integer + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + items: + properties: + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + x-kubernetes-list-map-keys: + - topologyKey + x-kubernetes-list-type: map + version: + type: string + required: + - baseImage + type: object + nodeSelector: + additionalProperties: + type: string + type: object + paused: + type: boolean + podManagementPolicy: + type: string + podSecurityContext: + properties: + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + supplementalGroups: + items: + format: int64 + type: integer + type: array + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + priorityClassName: + type: string + pvReclaimPolicy: type: string schedulerName: type: string @@ -34164,6 +36444,7 @@ spec: type: string required: - clusters + - ngMonitoring type: object status: properties: diff --git a/pkg/apis/label/label.go b/pkg/apis/label/label.go index 60a558c9d83..abc84fda9d0 100644 --- a/pkg/apis/label/label.go +++ b/pkg/apis/label/label.go @@ -154,6 +154,9 @@ const ( // DMWorkerLabelVal is dm-worker label value DMWorkerLabelVal string = "dm-worker" + // NGMonitorLabelVal is ng-monitoring label value + NGMonitorLabelVal string = "ng-monitoring" + // PrometheusVal is Prometheus label value PrometheusVal string = "prometheus" @@ -229,6 +232,13 @@ func NewMonitor() Label { } } +func NewTiDBNGMonitoring() Label { + return Label{ + NameLabelKey: "tidb-ng-monitoring", + ManagedByLabelKey: TiDBOperator, + } +} + func NewGroup() Label { return Label{ NameLabelKey: "tidb-cluster-group", @@ -377,6 +387,16 @@ func (l Label) Grafana() Label { return l.Application(GrafanaVal) } +// NGMonitoring assigns ng monitoring to component key in label +func (l Label) NGMonitoring() Label { + return l.Component(NGMonitorLabelVal) +} + +// IsNGMonitoring returns whether label is a NGMonitoring component +func (l Label) IsNGMonitoring() bool { + return l[ComponentLabelKey] == NGMonitorLabelVal +} + // IsMonitor returns whether label is a Monitor component func (l Label) IsMonitor() bool { return l[ComponentLabelKey] == TiDBMonitorVal diff --git a/pkg/apis/pingcap/v1alpha1/openapi_generated.go b/pkg/apis/pingcap/v1alpha1/openapi_generated.go index fb6377c1c2c..22b58ec50b3 100644 --- a/pkg/apis/pingcap/v1alpha1/openapi_generated.go +++ b/pkg/apis/pingcap/v1alpha1/openapi_generated.go @@ -119,6 +119,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBAccessConfig": schema_pkg_apis_pingcap_v1alpha1_TiDBAccessConfig(ref), "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBConfig": schema_pkg_apis_pingcap_v1alpha1_TiDBConfig(ref), "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBNGMonitoring": schema_pkg_apis_pingcap_v1alpha1_TiDBNGMonitoring(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBNGMonitoringList": schema_pkg_apis_pingcap_v1alpha1_TiDBNGMonitoringList(ref), "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBNGMonitoringSpec": schema_pkg_apis_pingcap_v1alpha1_TiDBNGMonitoringSpec(ref), "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBProbe": schema_pkg_apis_pingcap_v1alpha1_TiDBProbe(ref), "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBServiceSpec": schema_pkg_apis_pingcap_v1alpha1_TiDBServiceSpec(ref), @@ -3825,12 +3826,31 @@ func schema_pkg_apis_pingcap_v1alpha1_NGMonitoringSpec(ref common.ReferenceCallb Format: "", }, }, + "storageVolumes": { + SchemaProps: spec.SchemaProps{ + Description: "StorageVolumes configure additional storage for NG Monitoring pods.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.StorageVolume"), + }, + }, + }, + }, + }, + "config": { + SchemaProps: spec.SchemaProps{ + Description: "Config is the configuration of ng monitoring", + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/util/config.GenericConfig"), + }, + }, }, Required: []string{"baseImage"}, }, }, Dependencies: []string{ - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TopologySpreadConstraint", "k8s.io/api/core/v1.Affinity", "k8s.io/api/core/v1.Container", "k8s.io/api/core/v1.EnvVar", "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PodSecurityContext", "k8s.io/api/core/v1.Toleration", "k8s.io/api/core/v1.Volume", "k8s.io/api/core/v1.VolumeMount", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.StorageVolume", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TopologySpreadConstraint", "github.com/pingcap/tidb-operator/pkg/apis/util/config.GenericConfig", "k8s.io/api/core/v1.Affinity", "k8s.io/api/core/v1.Container", "k8s.io/api/core/v1.EnvVar", "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PodSecurityContext", "k8s.io/api/core/v1.Toleration", "k8s.io/api/core/v1.Volume", "k8s.io/api/core/v1.VolumeMount", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, } } @@ -7486,7 +7506,7 @@ func schema_pkg_apis_pingcap_v1alpha1_TiDBNGMonitoring(ref common.ReferenceCallb return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "TidbMonitor contains the spec and status of tidb ng monitor", + Description: "TiDBNGMonitoring contains the spec and status of tidb ng monitor", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -7518,6 +7538,48 @@ func schema_pkg_apis_pingcap_v1alpha1_TiDBNGMonitoring(ref common.ReferenceCallb } } +func schema_pkg_apis_pingcap_v1alpha1_TiDBNGMonitoringList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TiDBNGMonitoringList is TiDBNGMonitoring list", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + 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{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + 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{"string"}, + Format: "", + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBNGMonitoring"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBNGMonitoring"}, + } +} + func schema_pkg_apis_pingcap_v1alpha1_TiDBNGMonitoringSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -7777,12 +7839,25 @@ func schema_pkg_apis_pingcap_v1alpha1_TiDBNGMonitoringSpec(ref common.ReferenceC Format: "", }, }, + "pvReclaimPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "Persistent volume reclaim policy applied to the PVs that consumed by TiDB cluster", + Type: []string{"string"}, + Format: "", + }, + }, + "ngMonitoring": { + SchemaProps: spec.SchemaProps{ + Description: "NGMonitoring is spec of ng monitoring", + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.NGMonitoringSpec"), + }, + }, }, - Required: []string{"clusters"}, + Required: []string{"clusters", "ngMonitoring"}, }, }, Dependencies: []string{ - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbClusterRef", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TopologySpreadConstraint", "k8s.io/api/core/v1.Affinity", "k8s.io/api/core/v1.Container", "k8s.io/api/core/v1.EnvVar", "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PodSecurityContext", "k8s.io/api/core/v1.Toleration", "k8s.io/api/core/v1.Volume", "k8s.io/api/core/v1.VolumeMount"}, + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.NGMonitoringSpec", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbClusterRef", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TopologySpreadConstraint", "k8s.io/api/core/v1.Affinity", "k8s.io/api/core/v1.Container", "k8s.io/api/core/v1.EnvVar", "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PodSecurityContext", "k8s.io/api/core/v1.Toleration", "k8s.io/api/core/v1.Volume", "k8s.io/api/core/v1.VolumeMount"}, } } diff --git a/pkg/apis/pingcap/v1alpha1/types.go b/pkg/apis/pingcap/v1alpha1/types.go index 616b1b2082d..440dff36483 100644 --- a/pkg/apis/pingcap/v1alpha1/types.go +++ b/pkg/apis/pingcap/v1alpha1/types.go @@ -74,6 +74,8 @@ const ( RaftLogTailerMemberType MemberType = "raftlog" // TidbMonitorMemberType is tidbmonitor type TidbMonitorMemberType MemberType = "tidbmonitor" + // NGMonitoringMemberType is ng monitoring type + NGMonitoringMemberType MemberType = "ng-monitoring" // UnknownMemberType is unknown container type UnknownMemberType MemberType = "unknown" ) diff --git a/pkg/apis/pingcap/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/pingcap/v1alpha1/zz_generated.deepcopy.go index 0974af7a746..ddea51cb5fe 100644 --- a/pkg/apis/pingcap/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/pingcap/v1alpha1/zz_generated.deepcopy.go @@ -979,6 +979,7 @@ func (in *CrdKinds) DeepCopyInto(out *CrdKinds) { in.TiDBMonitor.DeepCopyInto(&out.TiDBMonitor) in.TiDBInitializer.DeepCopyInto(&out.TiDBInitializer) in.TidbClusterAutoScaler.DeepCopyInto(&out.TidbClusterAutoScaler) + in.TiDBNGMonitoring.DeepCopyInto(&out.TiDBNGMonitoring) return } @@ -2579,6 +2580,17 @@ func (in *NGMonitoringSpec) DeepCopyInto(out *NGMonitoringSpec) { *out = new(string) **out = **in } + if in.StorageVolumes != nil { + in, out := &in.StorageVolumes, &out.StorageVolumes + *out = make([]StorageVolume, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Config != nil { + in, out := &in.Config, &out.Config + *out = (*in).DeepCopy() + } return } @@ -5365,6 +5377,14 @@ func (in *TiDBNGMonitoringList) DeepCopy() *TiDBNGMonitoringList { return out } +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TiDBNGMonitoringList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TiDBNGMonitoringSpec) DeepCopyInto(out *TiDBNGMonitoringSpec) { *out = *in @@ -5374,6 +5394,12 @@ func (in *TiDBNGMonitoringSpec) DeepCopyInto(out *TiDBNGMonitoringSpec) { *out = make([]TidbClusterRef, len(*in)) copy(*out, *in) } + if in.PVReclaimPolicy != nil { + in, out := &in.PVReclaimPolicy, &out.PVReclaimPolicy + *out = new(v1.PersistentVolumeReclaimPolicy) + **out = **in + } + in.NGMonitoring.DeepCopyInto(&out.NGMonitoring) return } From ba068751b41def13662bd2d55d4316c44d70ea27 Mon Sep 17 00:00:00 2001 From: Shiori Date: Thu, 2 Dec 2021 17:38:31 +0800 Subject: [PATCH 06/28] core logic --- cmd/controller-manager/main.go | 2 + pkg/apis/pingcap/v1alpha1/crd_kinds.go | 6 + pkg/apis/pingcap/v1alpha1/register.go | 2 + .../pingcap/v1alpha1/tidbcluster_component.go | 1 + pkg/apis/pingcap/v1alpha1/tidbngmonitoring.go | 39 ++ .../v1alpha1/tidbngmonitoring_component.go | 47 ++ ...tor_types.go => tidbngmonitoring_types.go} | 37 +- .../pingcap/v1alpha1/validation/validation.go | 2 + pkg/controller/controller_utils.go | 20 + pkg/controller/dependences.go | 2 + .../tidbngmonitoring/ng_monitor_control.go | 147 ++++++ .../tidbngmonitoring/ng_monitor_controller.go | 135 +++++ pkg/manager/manager.go | 8 +- pkg/manager/meta/reclaim_policy_manager.go | 6 + .../meta/reclaim_policy_manager_test.go | 27 + .../tidbngmonitoring/monitor_manager.go | 462 ++++++++++++++++++ pkg/manager/tidbngmonitoring/name.go | 21 + pkg/manager/tidbngmonitoring/start_script.go | 52 ++ pkg/manager/utils/config.go | 144 ++++++ pkg/manager/utils/statefulset/builder.go | 129 +++++ pkg/manager/utils/statefulset/statefulset.go | 118 +++++ 21 files changed, 1400 insertions(+), 7 deletions(-) create mode 100644 pkg/apis/pingcap/v1alpha1/tidbngmonitoring.go create mode 100644 pkg/apis/pingcap/v1alpha1/tidbngmonitoring_component.go rename pkg/apis/pingcap/v1alpha1/{ngmonitor_types.go => tidbngmonitoring_types.go} (71%) create mode 100644 pkg/controller/tidbngmonitoring/ng_monitor_control.go create mode 100644 pkg/controller/tidbngmonitoring/ng_monitor_controller.go create mode 100644 pkg/manager/tidbngmonitoring/monitor_manager.go create mode 100644 pkg/manager/tidbngmonitoring/name.go create mode 100644 pkg/manager/tidbngmonitoring/start_script.go create mode 100644 pkg/manager/utils/config.go create mode 100644 pkg/manager/utils/statefulset/builder.go create mode 100644 pkg/manager/utils/statefulset/statefulset.go diff --git a/cmd/controller-manager/main.go b/cmd/controller-manager/main.go index f972a68363c..df58534e4df 100644 --- a/cmd/controller-manager/main.go +++ b/cmd/controller-manager/main.go @@ -36,6 +36,7 @@ import ( "github.com/pingcap/tidb-operator/pkg/controller/tidbcluster" "github.com/pingcap/tidb-operator/pkg/controller/tidbinitializer" "github.com/pingcap/tidb-operator/pkg/controller/tidbmonitor" + "github.com/pingcap/tidb-operator/pkg/controller/tidbngmonitoring" "github.com/pingcap/tidb-operator/pkg/features" "github.com/pingcap/tidb-operator/pkg/metrics" "github.com/pingcap/tidb-operator/pkg/scheme" @@ -165,6 +166,7 @@ func main() { backupschedule.NewController(deps), tidbinitializer.NewController(deps), tidbmonitor.NewController(deps), + tidbngmonitoring.NewController(deps), } if cliCfg.PodWebhookEnabled { controllers = append(controllers, periodicity.NewController(deps)) diff --git a/pkg/apis/pingcap/v1alpha1/crd_kinds.go b/pkg/apis/pingcap/v1alpha1/crd_kinds.go index eb0b0444479..3c558d672ce 100644 --- a/pkg/apis/pingcap/v1alpha1/crd_kinds.go +++ b/pkg/apis/pingcap/v1alpha1/crd_kinds.go @@ -53,6 +53,10 @@ const ( TidbClusterAutoScalerKind = "TidbClusterAutoScaler" TidbClusterAutoScalerKindKey = "tidbclusterautoscaler" + TiDBNGMonitoringName = "tidbngmonitorings" + TiDBNGMonitoringKind = "TiDBNGMonitoring" + TiDBNGMonitoringKindKey = "tidbngmonitoring" + SpecPath = "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1." ) @@ -74,6 +78,7 @@ type CrdKinds struct { TiDBMonitor CrdKind TiDBInitializer CrdKind TidbClusterAutoScaler CrdKind + TiDBNGMonitoring CrdKind } var DefaultCrdKinds = CrdKinds{ @@ -86,4 +91,5 @@ var DefaultCrdKinds = CrdKinds{ TiDBMonitor: CrdKind{Plural: TiDBMonitorName, Kind: TiDBMonitorKind, ShortNames: []string{"tm"}, SpecName: SpecPath + TiDBMonitorKind}, TiDBInitializer: CrdKind{Plural: TiDBInitializerName, Kind: TiDBInitializerKind, ShortNames: []string{"ti"}, SpecName: SpecPath + TiDBInitializerKind}, TidbClusterAutoScaler: CrdKind{Plural: TidbClusterAutoScalerName, Kind: TidbClusterAutoScalerKind, ShortNames: []string{"ta"}, SpecName: SpecPath + TidbClusterAutoScalerKind}, + TiDBNGMonitoring: CrdKind{Plural: TiDBNGMonitoringName, Kind: TiDBNGMonitoringKind, ShortNames: []string{"tngm"}, SpecName: SpecPath + TiDBNGMonitoringKind}, } diff --git a/pkg/apis/pingcap/v1alpha1/register.go b/pkg/apis/pingcap/v1alpha1/register.go index 11e2bf2076c..8a54d1e3476 100644 --- a/pkg/apis/pingcap/v1alpha1/register.go +++ b/pkg/apis/pingcap/v1alpha1/register.go @@ -68,6 +68,8 @@ func addKnownTypes(scheme *runtime.Scheme) error { &TidbClusterAutoScalerList{}, &DMCluster{}, &DMClusterList{}, + &TiDBNGMonitoring{}, + &TiDBNGMonitoringList{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) diff --git a/pkg/apis/pingcap/v1alpha1/tidbcluster_component.go b/pkg/apis/pingcap/v1alpha1/tidbcluster_component.go index d9c74b1affa..702be06bf41 100644 --- a/pkg/apis/pingcap/v1alpha1/tidbcluster_component.go +++ b/pkg/apis/pingcap/v1alpha1/tidbcluster_component.go @@ -66,6 +66,7 @@ const ( ComponentDMDiscovery ComponentDMMaster ComponentDMWorker + ComponentNGMonitoring ) type componentAccessorImpl struct { diff --git a/pkg/apis/pingcap/v1alpha1/tidbngmonitoring.go b/pkg/apis/pingcap/v1alpha1/tidbngmonitoring.go new file mode 100644 index 00000000000..af8d28583ff --- /dev/null +++ b/pkg/apis/pingcap/v1alpha1/tidbngmonitoring.go @@ -0,0 +1,39 @@ +// Copyright 2021 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1alpha1 + +import "fmt" + +func (tngm *TiDBNGMonitoring) GetInstanceName() string { + return tngm.Name +} + +// NGMonitoringImage return the image used by NGMonitoring. +func (tngm *TiDBNGMonitoring) NGMonitoringImage() string { + image := tngm.Spec.NGMonitoring.Image + baseImage := tngm.Spec.NGMonitoring.BaseImage + // base image takes higher priority + if baseImage != "" { + version := tngm.Spec.NGMonitoring.Version + if version == nil { + version = tngm.Spec.Version + } + if *version == "" { + image = baseImage + } else { + image = fmt.Sprintf("%s:%s", baseImage, *version) + } + } + return image +} diff --git a/pkg/apis/pingcap/v1alpha1/tidbngmonitoring_component.go b/pkg/apis/pingcap/v1alpha1/tidbngmonitoring_component.go new file mode 100644 index 00000000000..f30f42b675d --- /dev/null +++ b/pkg/apis/pingcap/v1alpha1/tidbngmonitoring_component.go @@ -0,0 +1,47 @@ +// Copyright 2021 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1alpha1 + +func (tngm *TiDBNGMonitoring) BaseNGMonitoringSpec() ComponentAccessor { + return buildTiDBNGMonitoringComponentAccessor(ComponentNGMonitoring, tngm, &tngm.Spec.NGMonitoring.ComponentSpec) +} + +func buildTiDBNGMonitoringComponentAccessor(c Component, tngm *TiDBNGMonitoring, componentSpec *ComponentSpec) ComponentAccessor { + commonSpec := tngm.Spec.ComponentSpec + impl := &componentAccessorImpl{ + name: tngm.GetName(), + kind: TiDBNGMonitoringKind, + component: c, + imagePullSecrets: commonSpec.ImagePullSecrets, + hostNetwork: commonSpec.HostNetwork, + affinity: commonSpec.Affinity, + priorityClassName: commonSpec.PriorityClassName, + clusterNodeSelector: commonSpec.NodeSelector, + clusterLabels: commonSpec.Labels, + clusterAnnotations: commonSpec.Annotations, + tolerations: commonSpec.Tolerations, + configUpdateStrategy: ConfigUpdateStrategyRollingUpdate, + podSecurityContext: commonSpec.PodSecurityContext, + topologySpreadConstraints: commonSpec.TopologySpreadConstraints, + + ComponentSpec: componentSpec, + } + if commonSpec.ImagePullPolicy != nil { + impl.imagePullPolicy = *commonSpec.ImagePullPolicy + } + if commonSpec.SchedulerName != nil { + impl.schedulerName = *commonSpec.SchedulerName + } + return impl +} diff --git a/pkg/apis/pingcap/v1alpha1/ngmonitor_types.go b/pkg/apis/pingcap/v1alpha1/tidbngmonitoring_types.go similarity index 71% rename from pkg/apis/pingcap/v1alpha1/ngmonitor_types.go rename to pkg/apis/pingcap/v1alpha1/tidbngmonitoring_types.go index 60da44d7da3..6205f3f80af 100644 --- a/pkg/apis/pingcap/v1alpha1/ngmonitor_types.go +++ b/pkg/apis/pingcap/v1alpha1/tidbngmonitoring_types.go @@ -14,20 +14,22 @@ package v1alpha1 import ( + "github.com/pingcap/tidb-operator/pkg/apis/util/config" apps "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// TidbMonitor contains the spec and status of tidb ng monitor +// TiDBNGMonitoring contains the spec and status of tidb ng monitor // +// +genclient +// +genclient:noStatus // +k8s:openapi-gen=true -// +kubebuilder:resource:shortName="tnm" +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:resource:shortName="tngm" type TiDBNGMonitoring struct { metav1.TypeMeta `json:",inline"` + // +k8s:openapi-gen=false metav1.ObjectMeta `json:"metadata"` @@ -40,8 +42,13 @@ type TiDBNGMonitoring struct { Status TiDBNGMonitoringStatus `json:"status,omitempty"` } +// TiDBNGMonitoringList is TiDBNGMonitoring list +// +// +k8s:openapi-gen=true +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object type TiDBNGMonitoringList struct { metav1.TypeMeta `json:",inline"` + // +k8s:openapi-gen=false metav1.ListMeta `json:"metadata"` @@ -59,10 +66,19 @@ type TiDBNGMonitoringSpec struct { // Clusters reference TiDB cluster // // +kubebuilder:validation:MaxItems=1 + // +kubebuilder:validation:MinItems=1 Clusters []TidbClusterRef `json:"clusters"` // Paused pause controller if it is true Paused bool `json:"paused,omitempty"` + + // Persistent volume reclaim policy applied to the PVs that consumed by TiDB cluster + // + // +kubebuilder:default=Retain + PVReclaimPolicy *corev1.PersistentVolumeReclaimPolicy `json:"pvReclaimPolicy,omitempty"` + + // NGMonitoring is spec of ng monitoring + NGMonitoring NGMonitoringSpec `json:"ngMonitoring"` } // TiDBNGMonitoringStatus is status of tidb ng monitoring @@ -81,11 +97,20 @@ type NGMonitoringSpec struct { // Base image of the component, image tag is now allowed during validation // // +kubebuilder:default=pingcap/ng-monitoring - BaseImage string `json:"baseImage"` + BaseImage string `json:"baseImage,omitempty"` // StorageClassName is the persistent volume for ng monitoring. // Defaults to Kubernetes default storage class. StorageClassName *string `json:"storageClassName,omitempty"` + + // StorageVolumes configure additional storage for NG Monitoring pods. + StorageVolumes []StorageVolume `json:"storageVolumes,omitempty"` + + // Config is the configuration of ng monitoring + // + // +kubebuilder:validation:Schemaless + // +kubebuilder:validation:XPreserveUnknownFields + Config *config.GenericConfig `json:"config,omitempty"` } // NGMonitoringStatus is latest status of ng monitoring diff --git a/pkg/apis/pingcap/v1alpha1/validation/validation.go b/pkg/apis/pingcap/v1alpha1/validation/validation.go index a4f16606f16..5034b640539 100644 --- a/pkg/apis/pingcap/v1alpha1/validation/validation.go +++ b/pkg/apis/pingcap/v1alpha1/validation/validation.go @@ -62,6 +62,8 @@ func ValidateDMCluster(dc *v1alpha1.DMCluster) field.ErrorList { return allErrs } +// FIXME: TiDBNGMonitoring + func ValidateTidbMonitor(monitor *v1alpha1.TidbMonitor) field.ErrorList { allErrs := field.ErrorList{} // validate monitor service diff --git a/pkg/controller/controller_utils.go b/pkg/controller/controller_utils.go index 5440651f08d..6a38768ad81 100644 --- a/pkg/controller/controller_utils.go +++ b/pkg/controller/controller_utils.go @@ -57,6 +57,9 @@ var ( // tidbClusterAutoScalerKind cotnains the schema.GroupVersionKind for TidbClusterAutoScaler controller type. tidbClusterAutoScalerKind = v1alpha1.SchemeGroupVersion.WithKind("TidbClusterAutoScaler") + + // tidbNGMonitoringKind cotnains the schema.GroupVersionKind for TiDBNGMonitoring controller type. + tidbNGMonitoringKind = v1alpha1.SchemeGroupVersion.WithKind("TiDBNGMonitoring") ) // RequeueError is used to requeue the item, this error type should't be considered as a real error @@ -195,6 +198,19 @@ func GetTiDBClusterAutoScalerOwnerRef(tac *v1alpha1.TidbClusterAutoScaler) metav } } +func GetTiDBNGMonitoringOwnerRef(tngm *v1alpha1.TiDBNGMonitoring) metav1.OwnerReference { + controller := true + blockOwnerDeletion := true + return metav1.OwnerReference{ + APIVersion: tidbNGMonitoringKind.GroupVersion().String(), + Kind: tidbNGMonitoringKind.Kind, + Name: tngm.GetName(), + UID: tngm.GetUID(), + Controller: &controller, + BlockOwnerDeletion: &blockOwnerDeletion, + } +} + // GetServiceType returns member's service type func GetServiceType(services []v1alpha1.Service, serviceName string) corev1.ServiceType { for _, svc := range services { @@ -329,6 +345,10 @@ func DMWorkerPeerMemberName(clusterName string) string { return fmt.Sprintf("%s-dm-worker-peer", clusterName) } +func NGMonitoringName(monitorName string) string { + return fmt.Sprintf("%s-ng-monitoring", monitorName) +} + // AnnProm adds annotations for prometheus scraping metrics func AnnProm(port int32) map[string]string { return map[string]string{ diff --git a/pkg/controller/dependences.go b/pkg/controller/dependences.go index 97f9530d7e2..2e5b90412ad 100644 --- a/pkg/controller/dependences.go +++ b/pkg/controller/dependences.go @@ -216,6 +216,7 @@ type Dependencies struct { BackupScheduleLister listers.BackupScheduleLister TiDBInitializerLister listers.TidbInitializerLister TiDBMonitorLister listers.TidbMonitorLister + TiDBNGMonitoringLister listers.TiDBNGMonitoringLister // Controls Controls @@ -348,6 +349,7 @@ func newDependencies( BackupScheduleLister: informerFactory.Pingcap().V1alpha1().BackupSchedules().Lister(), TiDBInitializerLister: informerFactory.Pingcap().V1alpha1().TidbInitializers().Lister(), TiDBMonitorLister: informerFactory.Pingcap().V1alpha1().TidbMonitors().Lister(), + TiDBNGMonitoringLister: informerFactory.Pingcap().V1alpha1().TiDBNGMonitorings().Lister(), }, nil } diff --git a/pkg/controller/tidbngmonitoring/ng_monitor_control.go b/pkg/controller/tidbngmonitoring/ng_monitor_control.go new file mode 100644 index 00000000000..916bf2716d7 --- /dev/null +++ b/pkg/controller/tidbngmonitoring/ng_monitor_control.go @@ -0,0 +1,147 @@ +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package tidbngmonitoring + +import ( + "context" + "fmt" + + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" + "github.com/pingcap/tidb-operator/pkg/controller" + "github.com/pingcap/tidb-operator/pkg/manager" + + apiequality "k8s.io/apimachinery/pkg/api/equality" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + errorutils "k8s.io/apimachinery/pkg/util/errors" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/client-go/util/retry" + "k8s.io/klog" +) + +const ( + + // Event Type + EventTypeFailedSync = "FailedSync" + EventTypeSuccessSync = "SuccessSync" +) + +type ReclaimPolicyManager interface { + SyncTiDBNGMonitoring(monitor *v1alpha1.TiDBNGMonitoring) error +} + +// ControlInterface provide function about control TiDBNGMonitoring +type ControlInterface interface { + // Reconcile a TiDBNGMonitoring + Reconcile(*v1alpha1.TiDBNGMonitoring) error + + // Update a TiDBNGMonitoring + Update(*v1alpha1.TiDBNGMonitoring) (*v1alpha1.TiDBNGMonitoring, error) +} + +func NewDefaultTiDBNGMonitoringControl( + deps *controller.Dependencies, + ngmMnger manager.TiDBNGMonitoringManager, + reclaimPolicyManager ReclaimPolicyManager, +) ControlInterface { + + return &defaultTiDBNGMonitoringControl{ + deps: deps, + ngmMnger: ngmMnger, + reclaimPolicyManager: reclaimPolicyManager, + } +} + +type defaultTiDBNGMonitoringControl struct { + deps *controller.Dependencies + + ngmMnger manager.TiDBNGMonitoringManager + reclaimPolicyManager ReclaimPolicyManager +} + +func (c *defaultTiDBNGMonitoringControl) Reconcile(tngm *v1alpha1.TiDBNGMonitoring) error { + // TODO: default and validate + + var errs []error + + oldStatus := tngm.Status.DeepCopy() + + // reconcile + err := c.reconcile(tngm) + if err != nil { + errs = append(errs, err) + } + + if apiequality.Semantic.DeepEqual(&tngm.Status, oldStatus) { + return errorutils.NewAggregate(errs) + } + + // update resource + _, err = c.Update(tngm.DeepCopy()) + if err != nil { + errs = append(errs, err) + } + + return errorutils.NewAggregate(errs) +} + +func (c *defaultTiDBNGMonitoringControl) reconcile(tngm *v1alpha1.TiDBNGMonitoring) error { + if tngm.DeletionTimestamp != nil { + return nil + } + + // reoncile recliam policy of pvc + err := c.reclaimPolicyManager.SyncTiDBNGMonitoring(tngm) + if err != nil { + return err + } + + // reconcile ng monitoring + err = c.ngmMnger.Sync(tngm) + if err != nil { + return err + } + + return nil +} + +func (c *defaultTiDBNGMonitoringControl) Update(tngm *v1alpha1.TiDBNGMonitoring) (*v1alpha1.TiDBNGMonitoring, error) { + var ( + ns string = tngm.GetNamespace() + name string = tngm.GetName() + status *v1alpha1.TiDBNGMonitoringStatus = tngm.Status.DeepCopy() + update *v1alpha1.TiDBNGMonitoring + ) + + // don't wait due to limited number of clients, but backoff after the default number of steps + err := retry.RetryOnConflict(retry.DefaultRetry, func() error { + var updateErr error + + update, updateErr = c.deps.Clientset.PingcapV1alpha1().TiDBNGMonitorings(ns).Update(context.TODO(), tngm, metav1.UpdateOptions{}) + if updateErr == nil { + klog.Infof("TiDBNGMonitoring: [%s/%s] updated successfully", ns, name) + return nil + } + + klog.V(4).Infof("failed to update TiDBNGMonitoring: [%s/%s], error: %v", ns, name, updateErr) + + if updated, err := c.deps.TiDBNGMonitoringLister.TiDBNGMonitorings(ns).Get(name); err == nil { + // make a copy so we don't mutate the shared cache + tngm = updated.DeepCopy() + tngm.Status = *status + } else { + utilruntime.HandleError(fmt.Errorf("error getting updated TiDBNGMonitoring %s/%s from lister: %v", ns, name, err)) + } + + return updateErr + }) + if err != nil { + klog.Errorf("failed to update TidbMonTiDBNGMonitoringitor: [%s/%s], error: %v", ns, tngm, err) + } + return update, err +} diff --git a/pkg/controller/tidbngmonitoring/ng_monitor_controller.go b/pkg/controller/tidbngmonitoring/ng_monitor_controller.go new file mode 100644 index 00000000000..a269cba5868 --- /dev/null +++ b/pkg/controller/tidbngmonitoring/ng_monitor_controller.go @@ -0,0 +1,135 @@ +// Copyright 2021 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package tidbngmonitoring + +import ( + "fmt" + "time" + + "github.com/pingcap/tidb-operator/pkg/controller" + "github.com/pingcap/tidb-operator/pkg/manager/meta" + "github.com/pingcap/tidb-operator/pkg/manager/tidbngmonitoring" + + perrors "github.com/pingcap/errors" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/runtime" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/client-go/tools/cache" + "k8s.io/client-go/util/workqueue" + "k8s.io/klog" +) + +// Controller sync TiDBNGMonitoring +type Controller struct { + deps *controller.Dependencies + control ControlInterface + queue workqueue.RateLimitingInterface +} + +func NewController(deps *controller.Dependencies) *Controller { + control := NewDefaultTiDBNGMonitoringControl( + deps, + tidbngmonitoring.NewNGMonitorManager(deps), + meta.NewReclaimPolicyManager(deps), + ) + + c := &Controller{ + deps: deps, + control: control, + queue: workqueue.NewNamedRateLimitingQueue( + controller.NewControllerRateLimiter(1*time.Second, 100*time.Second), + "tidb-ng-monitoring", + ), + } + + tnmInformer := deps.InformerFactory.Pingcap().V1alpha1().TiDBNGMonitorings() + stsInformer := deps.KubeInformerFactory.Apps().V1().StatefulSets() + controller.WatchForObject(tnmInformer.Informer(), c.queue) + controller.WatchForController( + stsInformer.Informer(), + c.queue, + func(ns, name string) (runtime.Object, error) { + return c.deps.TiDBNGMonitoringLister.TiDBNGMonitorings(ns).Get(name) + }, + nil, + ) + + return c +} + +func (c *Controller) Run(workers int, stopCh <-chan struct{}) { + defer utilruntime.HandleCrash() + defer c.queue.ShutDown() + + klog.Info("Starting tidbngmonitor controller") + defer klog.Info("Shutting down tidbngmonitor controller") + + for i := 0; i < workers; i++ { + go wait.Until(c.worker, time.Second, stopCh) + } + + <-stopCh +} + +func (c *Controller) worker() { + for c.processNextWorkItem() { + } +} + +func (c *Controller) processNextWorkItem() bool { + keyIface, quit := c.queue.Get() + if quit { + return false + } + defer c.queue.Done(keyIface) + + key := keyIface.(string) + err := c.sync(key) + if err != nil { + if perrors.Find(err, controller.IsRequeueError) != nil { + klog.Infof("TiDBNGMonitoring %v still need sync: %v, requeuing", key, err) + } else { + utilruntime.HandleError(fmt.Errorf("TiDBNGMonitoring %v sync failed, err: %v", key, err)) + } + c.queue.AddRateLimited(key) + } else { + c.queue.Forget(err) + } + + return true +} + +func (c *Controller) sync(key string) error { + startTime := time.Now() + defer func() { + klog.V(4).Infof("Finished syncing TiDBNGMonitoring %s (%v)", key, time.Since(startTime)) + }() + + ns, name, err := cache.SplitMetaNamespaceKey(key) + if err != nil { + return err + } + + tngm, err := c.deps.TiDBNGMonitoringLister.TiDBNGMonitorings(ns).Get(name) + if errors.IsNotFound(err) { + klog.Infof("TiDBNGMonitoring %s has been deleted", key) + return nil + } + if err != nil { + return err + } + + return c.control.Reconcile(tngm) +} diff --git a/pkg/manager/manager.go b/pkg/manager/manager.go index 2592b5a58ae..a90ce1b188e 100644 --- a/pkg/manager/manager.go +++ b/pkg/manager/manager.go @@ -13,7 +13,9 @@ package manager -import "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" +import ( + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" +) // Manager implements the logic for syncing tidbcluster. type Manager interface { @@ -25,3 +27,7 @@ type DMManager interface { // Sync implements the logic for syncing dmcluster. SyncDM(*v1alpha1.DMCluster) error } + +type TiDBNGMonitoringManager interface { + Sync(*v1alpha1.TiDBNGMonitoring) error +} diff --git a/pkg/manager/meta/reclaim_policy_manager.go b/pkg/manager/meta/reclaim_policy_manager.go index dd3c376079d..ba4561339fc 100644 --- a/pkg/manager/meta/reclaim_policy_manager.go +++ b/pkg/manager/meta/reclaim_policy_manager.go @@ -46,6 +46,10 @@ func (m *reclaimPolicyManager) SyncMonitor(tm *v1alpha1.TidbMonitor) error { return m.sync(v1alpha1.TiDBMonitorKind, tm, false, *tm.Spec.PVReclaimPolicy) } +func (m *reclaimPolicyManager) SyncTiDBNGMonitoring(tngm *v1alpha1.TiDBNGMonitoring) error { + return m.sync(v1alpha1.TiDBNGMonitoringKind, tngm, false, *tngm.Spec.PVReclaimPolicy) +} + func (m *reclaimPolicyManager) SyncDM(dc *v1alpha1.DMCluster) error { return m.sync(v1alpha1.DMClusterKind, dc, dc.IsPVReclaimEnabled(), *dc.Spec.PVReclaimPolicy) } @@ -71,6 +75,8 @@ func (m *reclaimPolicyManager) sync(kind string, obj runtime.Object, isPVReclaim selector, err = label.NewMonitor().Instance(instanceName).Monitor().Selector() case v1alpha1.DMClusterKind: selector, err = label.NewDM().Instance(instanceName).Selector() + case v1alpha1.TiDBNGMonitoringKind: + selector, err = label.NewTiDBNGMonitoring().Instance(instanceName).Selector() default: return fmt.Errorf("unsupported kind %s", kind) } diff --git a/pkg/manager/meta/reclaim_policy_manager_test.go b/pkg/manager/meta/reclaim_policy_manager_test.go index 660a6fcde1f..6ca2760d07e 100644 --- a/pkg/manager/meta/reclaim_policy_manager_test.go +++ b/pkg/manager/meta/reclaim_policy_manager_test.go @@ -50,6 +50,8 @@ func TestReclaimPolicyManagerSync(t *testing.T) { obj = newTidbClusterForMeta() case v1alpha1.DMClusterKind: obj = newDMClusterForMeta() + case v1alpha1.TiDBNGMonitoringKind: + obj = newTiDBNGMonitoringForMeta() } pv1 := newPV("1") pvc1 := newPVC(obj, "1") @@ -65,6 +67,10 @@ func TestReclaimPolicyManagerSync(t *testing.T) { obj.(*v1alpha1.TidbCluster).Spec.EnablePVReclaim = &test.enablePVRecalim case v1alpha1.DMClusterKind: obj.(*v1alpha1.DMCluster).Spec.EnablePVReclaim = &test.enablePVRecalim + case v1alpha1.TiDBNGMonitoringKind: + if test.enablePVRecalim { + return // skip because don't support enablePVRecalim + } } if test.hasDeferDeleteAnn { pvc1.Annotations = map[string]string{label.AnnPVCDeferDeleting: time.Now().String()} @@ -85,6 +91,8 @@ func TestReclaimPolicyManagerSync(t *testing.T) { err = rpm.Sync(obj.(*v1alpha1.TidbCluster)) case v1alpha1.DMClusterKind: err = rpm.SyncDM(obj.(*v1alpha1.DMCluster)) + case v1alpha1.TiDBNGMonitoringKind: + err = rpm.SyncTiDBNGMonitoring(obj.(*v1alpha1.TiDBNGMonitoring)) } if test.err { g.Expect(err).To(HaveOccurred()) @@ -295,6 +303,25 @@ func newTiDBMonitorForMeta() *v1alpha1.TidbMonitor { } } +func newTiDBNGMonitoringForMeta() *v1alpha1.TiDBNGMonitoring { + pvp := corev1.PersistentVolumeReclaimDelete + return &v1alpha1.TiDBNGMonitoring{ + TypeMeta: metav1.TypeMeta{ + Kind: "TiDBNGMonitoring", + APIVersion: "pingcap.com/v1alpha1", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: controller.TestClusterName, + Namespace: corev1.NamespaceDefault, + UID: types.UID("test"), + Labels: label.NewDM().Instance(controller.TestClusterName), + }, + Spec: v1alpha1.TiDBNGMonitoringSpec{ + PVReclaimPolicy: &pvp, + }, + } +} + func newPV(index string) *corev1.PersistentVolume { return &corev1.PersistentVolume{ TypeMeta: metav1.TypeMeta{ diff --git a/pkg/manager/tidbngmonitoring/monitor_manager.go b/pkg/manager/tidbngmonitoring/monitor_manager.go new file mode 100644 index 00000000000..5a3245de473 --- /dev/null +++ b/pkg/manager/tidbngmonitoring/monitor_manager.go @@ -0,0 +1,462 @@ +// Copyright 2021 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package tidbngmonitoring + +import ( + "fmt" + "strings" + + "github.com/pingcap/tidb-operator/pkg/apis/label" + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" + "github.com/pingcap/tidb-operator/pkg/controller" + "github.com/pingcap/tidb-operator/pkg/manager" + "github.com/pingcap/tidb-operator/pkg/manager/utils" + stsutils "github.com/pingcap/tidb-operator/pkg/manager/utils/statefulset" + "github.com/pingcap/tidb-operator/pkg/util" + + apps "k8s.io/api/apps/v1" + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/intstr" + "k8s.io/klog" +) + +const ( + ngmPodDataVolumeMountDir = "/var/lib/ng-monitoring" // the mount path for ng monitoring data volume + ngmPodConfigVolumeMountDir = "/etc/ng-monitoring" // the dir for ng monitoring config + ngmPodConfigFilename = "ng-monitoring.toml" // the filename of config file + + ngmConfigMapConfigKey = "ng-monitoring-config" // the key for config data in config map + + // pdClusterCertPath is where the cert for inter-cluster communication stored (if any) + pdClusterCertPath = "/var/lib/pd-tls" + tidbClientCertPath = "/var/lib/tidb-client-tls" + + ngmServicePort = 12020 +) + +type ngMonitoringManager struct { + deps *controller.Dependencies +} + +func NewNGMonitorManager(deps *controller.Dependencies) manager.TiDBNGMonitoringManager { + return &ngMonitoringManager{ + deps: deps, + } +} + +func (m *ngMonitoringManager) Sync(tngm *v1alpha1.TiDBNGMonitoring) error { + var err error + + err = m.syncService(tngm) + if err != nil { + return err + } + + err = m.syncCore(tngm) + if err != nil { + return err + } + + return nil +} + +func (m *ngMonitoringManager) syncService(tngm *v1alpha1.TiDBNGMonitoring) error { + ns := tngm.GetNamespace() + name := tngm.GetName() + + if tngm.Spec.Paused { + klog.V(4).Infof("tikv cluster %s/%s is paused, skip syncing for ng monitoring headless service", ns, name) + return nil + } + + newSvc := GenerateNGMonitoringHeadlessService(tngm) + oldSvc, err := m.deps.ServiceLister.Services(newSvc.Namespace).Get(newSvc.Name) + svcNotFound := errors.IsNotFound(err) + + if err != nil && !svcNotFound { + return fmt.Errorf("syncService: failed to get headless svc %s/%s for ng monitoring %s/%s, error %s", newSvc.Namespace, newSvc.Name, ns, name, err) + } + + // first creation + if svcNotFound { + err := controller.SetServiceLastAppliedConfigAnnotation(newSvc) + if err != nil { + return err + } + return m.deps.ServiceControl.CreateService(tngm, newSvc) + } + + // update existing service if needed + equal, err := controller.ServiceEqual(newSvc, oldSvc) + if err != nil { + return err + } + isOrphan := metav1.GetControllerOf(oldSvc) == nil + if !equal || isOrphan { + svc := *oldSvc + svc.Spec = newSvc.Spec + err = controller.SetServiceLastAppliedConfigAnnotation(&svc) + if err != nil { + return err + } + // Adopt headless-service created by helm + if isOrphan { + svc.OwnerReferences = newSvc.OwnerReferences + svc.Labels = newSvc.Labels + } + _, err = m.deps.ServiceControl.UpdateService(tngm, &svc) + return err + } + + return nil +} + +func (m *ngMonitoringManager) syncCore(tngm *v1alpha1.TiDBNGMonitoring) error { + ns := tngm.GetNamespace() + name := tngm.GetName() + + stsName := controller.NGMonitoringName(name) + oldStsTemp, err := m.deps.StatefulSetLister.StatefulSets(ns).Get(stsName) + if err != nil && !errors.IsNotFound(err) { + return fmt.Errorf("populateStatus: failed to get sts %s for tidb ng monitor %s/%s, error: %s", stsName, ns, name, err) + } + stsNotFound := errors.IsNotFound(err) + oldSts := oldStsTemp.DeepCopy() + + // sync status + err = m.populateStatus(tngm, oldSts) + if err != nil { + klog.Errorf("failed to sync ng monitoring's status of tidb ng monitring %s/%s, error: %v", ns, name, err) + return err + } + + if tngm.Spec.Paused { + klog.V(4).Infof("tidb ng monitring %s/%s is paused, skip syncing for ng monitoring statefulset", ns, name) + return nil + } + + // sync resources + + cm, err := m.syncConfigMap(tngm, oldSts) + if err != nil { + klog.Errorf("failed to sync ng monitoring's configmap of tidb ng monitring %s/%s, error: %v", ns, name, err) + return err + } + + newSts, err := GenerateNGMonitoringStatefulSet(tngm, cm) + if err != nil { + return err + } + + // first creation + if stsNotFound { + err = stsutils.SetStatefulSetLastAppliedConfigAnnotation(newSts) + if err != nil { + return err + } + return m.deps.StatefulSetControl.CreateStatefulSet(tngm, newSts) + } + + // update existing statefulset if needed + return stsutils.UpdateStatefulSet(m.deps.StatefulSetControl, tngm, oldSts, newSts) +} + +func (m *ngMonitoringManager) syncConfigMap(tngm *v1alpha1.TiDBNGMonitoring, sts *apps.StatefulSet) (*corev1.ConfigMap, error) { + spec := tngm.BaseNGMonitoringSpec() + + newCM, err := GenerateNGMonitoringConfigMap(tngm) + if err != nil { + return nil, err + } + + var inUseName string + if sts != nil { + inUseName = stsutils.FindConfigMapVolume(&sts.Spec.Template.Spec, func(name string) bool { + return strings.HasPrefix(name, controller.NGMonitoringName(tngm.Name)) + }) + } + + err = utils.UpdateConfigMapIfNeed(m.deps.ConfigMapLister, spec.ConfigUpdateStrategy(), inUseName, newCM) + if err != nil { + return nil, err + } + + return m.deps.TypedControl.CreateOrUpdateConfigMap(tngm, newCM) +} + +func (m *ngMonitoringManager) populateStatus(tngm *v1alpha1.TiDBNGMonitoring, sts *apps.StatefulSet) error { + if sts == nil { + return nil // skip if not created yet + } + + tngm.Status.NGMonitoring.StatefulSet = &sts.Status + + upgrading, err := m.confirmStatefulSetIsUpgrading(tngm, sts) + if err != nil { + tngm.Status.NGMonitoring.Synced = false + return err + } + if upgrading { + tngm.Status.NGMonitoring.Phase = v1alpha1.UpgradePhase + } else { + tngm.Status.NGMonitoring.Phase = v1alpha1.NormalPhase + } + + tngm.Status.NGMonitoring.Synced = true + + return nil +} + +func (m *ngMonitoringManager) confirmStatefulSetIsUpgrading(tngm *v1alpha1.TiDBNGMonitoring, oldSts *apps.StatefulSet) (bool, error) { + if stsutils.StatefulSetIsUpgrading(oldSts) { + return true, nil + } + + selector, err := label.NewTiDBNGMonitoring(). + Instance(tngm.GetInstanceName()). + NGMonitoring(). + Selector() + if err != nil { + return false, err + } + + pods, err := m.deps.PodLister.Pods(tngm.GetNamespace()).List(selector) + if err != nil { + return false, fmt.Errorf("confirmStatefulSetIsUpgrading: failed to list pod for tidb ng monitor %s/%s, selector %s, error: %s", tngm.GetNamespace(), tngm.GetName(), selector, err) + } + + for _, pod := range pods { + revisionHash, exist := pod.Labels[apps.ControllerRevisionHashLabelKey] + if !exist { + return false, nil + } + if revisionHash != oldSts.Status.UpdateRevision { + return true, nil + } + } + return false, nil +} + +func GenerateNGMonitoringStatefulSet(tngm *v1alpha1.TiDBNGMonitoring, cm *corev1.ConfigMap) (*apps.StatefulSet, error) { + ns := tngm.GetNamespace() + name := tngm.GetName() + + spec := tngm.BaseNGMonitoringSpec() + meta, stsLabels := GenerateNGMonitoringMeta(tngm, controller.NGMonitoringName) + headlessServiceName := NGMonitoringHeadlessServiceName(name) + replicas := int32(1) // only support one replica now + + dataVolumeName := v1alpha1.NGMonitoringMemberType.String() + configVolumeName := "config" + + // base containers, base pod spec and base statefulset + + // base containers + baseContainers := []corev1.Container{} + nmContainerName := v1alpha1.NGMonitoringMemberType.String() + startScript, err := GenerateNGMonitoringStartScript(tngm) + if err != nil { + return nil, fmt.Errorf("cannot render start-script for ng monitoring, tidb ng monitoring %s/%s, error: %v", ns, name, err) + } + nmVolumeMounts := []corev1.VolumeMount{ + {Name: configVolumeName, ReadOnly: true, MountPath: ngmPodConfigVolumeMountDir}, // config + {Name: dataVolumeName, MountPath: ngmPodDataVolumeMountDir}, // data + } + baseContainers = append(baseContainers, corev1.Container{ + Name: nmContainerName, + Image: tngm.NGMonitoringImage(), + ImagePullPolicy: spec.ImagePullPolicy(), + Command: []string{"/bin/sh", "-c", startScript}, + Ports: []corev1.ContainerPort{ + { + + Name: "ng-monitoring", + ContainerPort: ngmServicePort, + }, + }, + VolumeMounts: nmVolumeMounts, + Resources: controller.ContainerResource(tngm.Spec.NGMonitoring.ResourceRequirements), + // LivenessProbe: &corev1.Probe{ + // Handler: corev1.Handler{ + // HTTPGet: &corev1.HTTPGetAction{ + // Path: "/health", + // Port: intstr.FromInt(ngmServicePort), + // }, + // }, + // }, + Env: []corev1.EnvVar{ + { + Name: "HEADLESS_SERVICE_NAME", + Value: headlessServiceName, + }, + }, + }) + baseVolumes := []corev1.Volume{ + { + Name: configVolumeName, + VolumeSource: corev1.VolumeSource{ + ConfigMap: &corev1.ConfigMapVolumeSource{ + LocalObjectReference: corev1.LocalObjectReference{ + Name: cm.Name, + }, + Items: []corev1.KeyToPath{ + { + Key: ngmConfigMapConfigKey, + Path: ngmPodConfigFilename, + }, + }, + }, + }, + }, + } + // base pod spec + // TODO: place it in builder in order to reuse + podSpec := spec.BuildPodSpec() + podSpec.InitContainers = spec.InitContainers() + podSpec.DNSPolicy = spec.DnsPolicy() + podSpec.SecurityContext = spec.PodSecurityContext() + podSpec.Containers = baseContainers + podSpec.Volumes = baseVolumes + basePodTemplate := corev1.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: stsLabels, + }, + Spec: podSpec, + } + // base statefulset + storageRequest, err := controller.ParseStorageRequest(tngm.Spec.NGMonitoring.Requests) + if err != nil { + return nil, fmt.Errorf("cannot parse storage request for ng monitoring, tidb ng monitoring %s/%s, error: %v", ns, name, err) + } + baseSts := &apps.StatefulSet{ + ObjectMeta: meta, + Spec: apps.StatefulSetSpec{ + Selector: stsLabels.LabelSelector(), + ServiceName: headlessServiceName, + Replicas: &replicas, + + Template: basePodTemplate, + VolumeClaimTemplates: []corev1.PersistentVolumeClaim{ + { + ObjectMeta: metav1.ObjectMeta{ + Name: dataVolumeName, + }, + Spec: corev1.PersistentVolumeClaimSpec{ + AccessModes: []corev1.PersistentVolumeAccessMode{ + corev1.ReadWriteOnce, + }, + StorageClassName: tngm.Spec.NGMonitoring.StorageClassName, + Resources: storageRequest, + }, + }, + }, + UpdateStrategy: apps.StatefulSetUpdateStrategy{ + Type: spec.StatefulSetUpdateStrategy(), + }, + PodManagementPolicy: spec.PodManagementPolicy(), + }, + } + + builder := stsutils.NewStatefulSetBuilder(baseSts) + + // features + + // hostnework + if spec.HostNetwork() { + builder.PodTemplateSpecBuilder().RunInHostNetwork() + } + // downward + builder.PodTemplateSpecBuilder().ContainerBuilder(nmContainerName).AddEnvs(spec.Env()...) + builder.PodTemplateSpecBuilder().AddLabels(spec.Labels()) + builder.PodTemplateSpecBuilder().AddLabels(spec.Annotations()) + // additional storage volumes + storageVolMounts, additionalPVCs := util.BuildStorageVolumeAndVolumeMount(tngm.Spec.NGMonitoring.StorageVolumes, tngm.Spec.NGMonitoring.StorageClassName, v1alpha1.NGMonitoringMemberType) + builder.PodTemplateSpecBuilder().ContainerBuilder(nmContainerName).AddVolumeMounts(storageVolMounts...) + builder.AddVolumeClaims(additionalPVCs...) + // additional volumes and mounts + builder.PodTemplateSpecBuilder().ContainerBuilder(nmContainerName).AddVolumeMounts(spec.AdditionalVolumeMounts()...) + builder.PodTemplateSpecBuilder().AddVolumes(spec.AdditionalVolumes()...) + // TODO: TLS + + return builder.Get(), nil +} + +// GenerateNGMonitoringConfigMap generate ConfigMap from tidb ng monitoring +func GenerateNGMonitoringConfigMap(tngm *v1alpha1.TiDBNGMonitoring) (*corev1.ConfigMap, error) { + config := tngm.Spec.NGMonitoring.Config + meta, _ := GenerateNGMonitoringMeta(tngm, controller.NGMonitoringName) + + // TODO: TLS + + confText, err := config.MarshalTOML() + if err != nil { + return nil, err + } + + name := controller.NGMonitoringName(tngm.Name) + confTextStr := string(confText) + + data := map[string]string{ + ngmConfigMapConfigKey: confTextStr, + } + + meta.Name = name + + return &corev1.ConfigMap{ + ObjectMeta: meta, + Data: data, + }, nil +} + +// GenerateNGMonitoringMeta build ObjectMeta and Label for ng monitoring +func GenerateNGMonitoringMeta(tngm *v1alpha1.TiDBNGMonitoring, nameFunc func(string) string) (metav1.ObjectMeta, label.Label) { + instanceName := tngm.GetInstanceName() + label := label.NewTiDBNGMonitoring().Instance(instanceName).NGMonitoring() + + objMeta := metav1.ObjectMeta{ + Name: nameFunc(tngm.Name), + Namespace: tngm.GetNamespace(), + Labels: label, + OwnerReferences: []metav1.OwnerReference{controller.GetTiDBNGMonitoringOwnerRef(tngm)}, + } + return objMeta, label +} + +// GenerateNGMonitoringHeadlessService build headless service for ng monitoring +func GenerateNGMonitoringHeadlessService(tngm *v1alpha1.TiDBNGMonitoring) *corev1.Service { + meta, labels := GenerateNGMonitoringMeta(tngm, NGMonitoringHeadlessServiceName) + + return &corev1.Service{ + ObjectMeta: meta, + Spec: corev1.ServiceSpec{ + ClusterIP: "None", + Ports: []corev1.ServicePort{ + { + Name: "ng-monitoring", + Port: ngmServicePort, + TargetPort: intstr.FromInt(ngmServicePort), + Protocol: corev1.ProtocolTCP, + }, + }, + Selector: labels, + PublishNotReadyAddresses: true, + }, + } +} + +func GenerateNGMonitoringStartScript(tngm *v1alpha1.TiDBNGMonitoring) (string, error) { + return "sleep 3600", nil +} diff --git a/pkg/manager/tidbngmonitoring/name.go b/pkg/manager/tidbngmonitoring/name.go new file mode 100644 index 00000000000..49ac45de3ea --- /dev/null +++ b/pkg/manager/tidbngmonitoring/name.go @@ -0,0 +1,21 @@ +// Copyright 2021 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package tidbngmonitoring + +import "fmt" + +// NGMonitoringHeadlessServiceName return headless service name +func NGMonitoringHeadlessServiceName(tngm string) string { + return fmt.Sprintf("%s-ng-monitoring", tngm) +} diff --git a/pkg/manager/tidbngmonitoring/start_script.go b/pkg/manager/tidbngmonitoring/start_script.go new file mode 100644 index 00000000000..d5115c2c8e2 --- /dev/null +++ b/pkg/manager/tidbngmonitoring/start_script.go @@ -0,0 +1,52 @@ +// Copyright 2021 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package tidbngmonitoring + +import ( + "fmt" + "html/template" + + "github.com/pingcap/tidb-operator/pkg/controller" +) + +type NGMonitoringStartScriptModel struct { + Scheme string + + TCName string // name of tidb cluster + TCNamespace string // namespace of tidb cluster's namespace + TCClusterDomain string // cluster domain of tidb cluster + + TNGMName string // name of tidb ng monitoring + TNGMNamespace string // namespace of tidb ng monitoring +} + +func (m *NGMonitoringStartScriptModel) FormatClusterDomain() string { + if len(m.TCClusterDomain) > 0 { + return "." + m.TCClusterDomain + } + return "" +} + +func (m *NGMonitoringStartScriptModel) PDAddress() string { + // don't need add scheme, ng monitoring will use https if cert is configured + return fmt.Sprintf("%s.%s:2379", controller.PDMemberName(m.TCName), m.TCNamespace) +} + +// TODO: Find a better method to start +var ngMonitoringStartScriptTpl = template.Must(template.New("ng-monitoring-start-script").Parse(`/ng-monitoring-server \ + --pd.endpoints {{ .PDAddress }} \ + --advertise-address ${POD_NAME}.${HEADLESS_SERVICE_NAME}:12020 \ + --config /etc/ng-monitoring/ng-monitoring.toml \ + --storage.path /var/lib/ng-monitoring +`)) diff --git a/pkg/manager/utils/config.go b/pkg/manager/utils/config.go new file mode 100644 index 00000000000..260932076f8 --- /dev/null +++ b/pkg/manager/utils/config.go @@ -0,0 +1,144 @@ +// Copyright 2020 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package utils + +import ( + "crypto/sha256" + "encoding/json" + "fmt" + + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" + "github.com/pingcap/tidb-operator/pkg/apis/util/toml" + + perrors "github.com/pingcap/errors" + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/errors" + corelisters "k8s.io/client-go/listers/core/v1" +) + +func updateConfigMap(old, new *corev1.ConfigMap) (bool, error) { + dataEqual := true + + // check config + tomlField := []string{"config-file" /*pd,tikv,tidb */, "pump-config", "config_templ.toml" /*tiflash*/, "proxy_templ.toml" /*tiflash*/} + for _, k := range tomlField { + oldData, oldOK := old.Data[k] + newData, newOK := new.Data[k] + + if oldOK != newOK { + dataEqual = false + } + + if !oldOK || !newOK { + continue + } + + equal, err := toml.Equal([]byte(oldData), []byte(newData)) + if err != nil { + return false, perrors.Annotatef(err, "compare %s/%s %s and %s failed", old.Namespace, old.Name, oldData, newData) + } + + if equal { + new.Data[k] = oldData + } else { + dataEqual = false + } + } + + // check startup script + field := "startup-script" + oldScript, oldExist := old.Data[field] + newScript, newExist := new.Data[field] + if oldExist != newExist { + dataEqual = false + } else if oldExist && newExist { + if oldScript != newScript { + dataEqual = false + } + } + + return dataEqual, nil +} + +// UpdateConfigMapIfNeed set the toml field as the old one if they are logically equal. +func UpdateConfigMapIfNeed( + cmLister corelisters.ConfigMapLister, + configUpdateStrategy v1alpha1.ConfigUpdateStrategy, + inUseName string, + desired *corev1.ConfigMap, +) error { + + switch configUpdateStrategy { + case v1alpha1.ConfigUpdateStrategyInPlace: + if inUseName != "" { + desired.Name = inUseName + } + return nil + case v1alpha1.ConfigUpdateStrategyRollingUpdate: + existing, err := cmLister.ConfigMaps(desired.Namespace).Get(inUseName) + if err != nil { + if errors.IsNotFound(err) { + AddConfigMapDigestSuffix(desired) + return nil + } + + return perrors.AddStack(err) + } + + dataEqual, err := updateConfigMap(existing, desired) + if err != nil { + return err + } + + AddConfigMapDigestSuffix(desired) + + confirmNameByData(existing, desired, dataEqual) + + return nil + default: + return perrors.Errorf("unknown config update strategy: %v", configUpdateStrategy) + } +} + +// confirmNameByData is used to fix the problem that +// when configUpdateStrategy is changed from InPlace to RollingUpdate for the first time, +// the name of desired configmap maybe different from the existing one while +// the data of them are the same, which will cause rolling update. +func confirmNameByData(existing, desired *corev1.ConfigMap, dataEqual bool) { + if dataEqual && existing.Name != desired.Name { + desired.Name = existing.Name + } + if !dataEqual && existing.Name == desired.Name { + desired.Name = fmt.Sprintf("%s-new", desired.Name) + } +} + +func AddConfigMapDigestSuffix(cm *corev1.ConfigMap) error { + sum, err := Sha256Sum(cm.Data) + if err != nil { + return err + } + suffix := fmt.Sprintf("%x", sum)[0:7] + cm.Name = fmt.Sprintf("%s-%s", cm.Name, suffix) + return nil +} + +func Sha256Sum(v interface{}) (string, error) { + data, err := json.Marshal(v) + if err != nil { + return "", err + } + sum := sha256.Sum256(data) + return fmt.Sprintf("%x", sum), nil +} diff --git a/pkg/manager/utils/statefulset/builder.go b/pkg/manager/utils/statefulset/builder.go new file mode 100644 index 00000000000..e23625d2745 --- /dev/null +++ b/pkg/manager/utils/statefulset/builder.go @@ -0,0 +1,129 @@ +// Copyright 2021 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package statefulset + +import ( + "github.com/pingcap/tidb-operator/pkg/util" + + apps "k8s.io/api/apps/v1" + corev1 "k8s.io/api/core/v1" +) + +type ContainerBuilder struct { + prototype *corev1.Container +} + +func NewContainerBuilder(container *corev1.Container) *ContainerBuilder { + return &ContainerBuilder{ + prototype: container, + } +} + +func (cb *ContainerBuilder) Get() *corev1.Container { + return cb.prototype +} + +func (cb *ContainerBuilder) Clone() *corev1.Container { + return cb.prototype.DeepCopy() +} + +func (cb *ContainerBuilder) AddVolumeMounts(mounts ...corev1.VolumeMount) { + cb.prototype.VolumeMounts = append(cb.prototype.VolumeMounts, mounts...) +} + +func (cb *ContainerBuilder) AddEnvs(envs ...corev1.EnvVar) { + cb.prototype.Env = util.AppendEnv(cb.prototype.Env, envs) +} + +type PodTemplateSpecBuilder struct { + prototype *corev1.PodTemplateSpec +} + +func NewPodTemplateSpecBuilder(podTemplate *corev1.PodTemplateSpec) *PodTemplateSpecBuilder { + return &PodTemplateSpecBuilder{ + prototype: podTemplate, + } +} + +func (pb *PodTemplateSpecBuilder) Get() *corev1.PodTemplateSpec { + return pb.prototype +} + +func (pb *PodTemplateSpecBuilder) Clone() *corev1.PodTemplateSpec { + return pb.prototype.DeepCopy() +} + +func (pb *PodTemplateSpecBuilder) ContainerBuilder(name string) *ContainerBuilder { + for i := range pb.prototype.Spec.Containers { + container := pb.prototype.Spec.Containers[i] + if container.Name == name { + return NewContainerBuilder(&container) + } + } + return nil +} + +func (b *PodTemplateSpecBuilder) AddVolumes(volumes ...corev1.Volume) { + b.prototype.Spec.Volumes = append(b.prototype.Spec.Volumes, volumes...) +} + +func (b *PodTemplateSpecBuilder) AddLabels(labels map[string]string) { + b.prototype.Labels = util.CombineStringMap(b.prototype.Labels, labels) +} + +func (b *PodTemplateSpecBuilder) AddAnnotations(annos map[string]string) { + b.prototype.Labels = util.CombineStringMap(b.prototype.Annotations, annos) +} + +func (b *PodTemplateSpecBuilder) RunInHostNetwork() { + b.prototype.Spec.DNSPolicy = corev1.DNSClusterFirstWithHostNet + for _, container := range b.prototype.Spec.Containers { + container.Env = util.AppendEnv(container.Env, []corev1.EnvVar{ + { + Name: "POD_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + }) + } +} + +type StatefulSetBuilder struct { + prototype *apps.StatefulSet +} + +func NewStatefulSetBuilder(sts *apps.StatefulSet) *StatefulSetBuilder { + return &StatefulSetBuilder{ + prototype: sts, + } +} + +func (sb *StatefulSetBuilder) Get() *apps.StatefulSet { + return sb.prototype +} + +func (sb *StatefulSetBuilder) Clone() *apps.StatefulSet { + return sb.prototype.DeepCopy() +} + +func (sb *StatefulSetBuilder) PodTemplateSpecBuilder() *PodTemplateSpecBuilder { + return NewPodTemplateSpecBuilder(&sb.prototype.Spec.Template) +} + +func (sb *StatefulSetBuilder) AddVolumeClaims(pvcs ...corev1.PersistentVolumeClaim) { + sb.prototype.Spec.VolumeClaimTemplates = append(sb.prototype.Spec.VolumeClaimTemplates, pvcs...) +} diff --git a/pkg/manager/utils/statefulset/statefulset.go b/pkg/manager/utils/statefulset/statefulset.go new file mode 100644 index 00000000000..4209396607a --- /dev/null +++ b/pkg/manager/utils/statefulset/statefulset.go @@ -0,0 +1,118 @@ +// Copyright 2021 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package statefulset + +import ( + "github.com/pingcap/tidb-operator/pkg/apis/label" + "github.com/pingcap/tidb-operator/pkg/controller" + "github.com/pingcap/tidb-operator/pkg/util" + + apps "k8s.io/api/apps/v1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" +) + +const ( + // LastAppliedConfigAnnotation is annotation key of last applied configuration + LastAppliedConfigAnnotation = "pingcap.com/last-applied-configuration" +) + +// StatefulSetIsUpgrading confirms whether the statefulSet is upgrading phase +func StatefulSetIsUpgrading(set *apps.StatefulSet) bool { + if set.Status.CurrentRevision != set.Status.UpdateRevision { + return true + } + if set.Generation > set.Status.ObservedGeneration && *set.Spec.Replicas == set.Status.Replicas { + return true + } + return false +} + +// SetStatefulSetLastAppliedConfigAnnotation set last applied config to Statefulset's annotation +func SetStatefulSetLastAppliedConfigAnnotation(set *apps.StatefulSet) error { + setApply, err := util.Encode(set.Spec) + if err != nil { + return err + } + if set.Annotations == nil { + set.Annotations = map[string]string{} + } + set.Annotations[LastAppliedConfigAnnotation] = setApply + return nil +} + +// UpdateStatefulSet is a template function to update the statefulset of components +func UpdateStatefulSet(setCtl controller.StatefulSetControlInterface, object runtime.Object, newSet, oldSet *apps.StatefulSet) error { + isOrphan := metav1.GetControllerOf(oldSet) == nil + if newSet.Annotations == nil { + newSet.Annotations = map[string]string{} + } + if oldSet.Annotations == nil { + oldSet.Annotations = map[string]string{} + } + + // Check if an upgrade is needed. + // If not, early return. + if util.StatefulSetEqual(*newSet, *oldSet) && !isOrphan { + return nil + } + + set := *oldSet + + // update specs for sts + *set.Spec.Replicas = *newSet.Spec.Replicas + set.Spec.UpdateStrategy = newSet.Spec.UpdateStrategy + set.Labels = newSet.Labels + set.Annotations = newSet.Annotations + set.Spec.Template = newSet.Spec.Template + if isOrphan { + set.OwnerReferences = newSet.OwnerReferences + } + + var podConfig string + var hasPodConfig bool + if oldSet.Spec.Template.Annotations != nil { + podConfig, hasPodConfig = oldSet.Spec.Template.Annotations[LastAppliedConfigAnnotation] + } + if hasPodConfig { + if set.Spec.Template.Annotations == nil { + set.Spec.Template.Annotations = map[string]string{} + } + set.Spec.Template.Annotations[LastAppliedConfigAnnotation] = podConfig + } + v, ok := oldSet.Annotations[label.AnnStsLastSyncTimestamp] + if ok { + set.Annotations[label.AnnStsLastSyncTimestamp] = v + } + + err := SetStatefulSetLastAppliedConfigAnnotation(&set) + if err != nil { + return err + } + + // commit to k8s + _, err = setCtl.UpdateStatefulSet(object, &set) + return err +} + +// FindConfigMapVolume returns the configmap which's name matches the predicate in a PodSpec, empty indicates not found +func FindConfigMapVolume(podSpec *corev1.PodSpec, pred func(string) bool) string { + for _, vol := range podSpec.Volumes { + if vol.ConfigMap != nil && pred(vol.ConfigMap.LocalObjectReference.Name) { + return vol.ConfigMap.LocalObjectReference.Name + } + } + return "" +} From 5ddb081dde6ebda913ddb5eac2fb734ffc339ea5 Mon Sep 17 00:00:00 2001 From: Shiori Date: Fri, 3 Dec 2021 16:23:37 +0800 Subject: [PATCH 07/28] move some utils to pkg manager/utils --- pkg/manager/member/config.go | 123 ------------------ .../member/dm_master_member_manager.go | 13 +- .../member/dm_master_member_manager_test.go | 3 +- pkg/manager/member/dm_master_upgrader.go | 8 +- pkg/manager/member/dm_master_upgrader_test.go | 3 +- .../member/dm_worker_member_manager.go | 9 +- .../member/dm_worker_member_manager_test.go | 3 +- pkg/manager/member/pd_member_manager.go | 18 +-- pkg/manager/member/pd_upgrader.go | 9 +- pkg/manager/member/pd_upgrader_test.go | 5 +- pkg/manager/member/pump_member_manager.go | 12 +- .../member/pump_member_manager_test.go | 8 +- pkg/manager/member/ticdc_member_manager.go | 14 +- pkg/manager/member/ticdc_upgrader.go | 9 +- pkg/manager/member/ticdc_upgrader_test.go | 17 ++- pkg/manager/member/tidb_member_manager.go | 15 ++- .../member/tidb_member_manager_test.go | 9 +- pkg/manager/member/tidb_upgrader.go | 9 +- pkg/manager/member/tidb_upgrader_test.go | 7 +- pkg/manager/member/tiflash_member_manager.go | 14 +- pkg/manager/member/tiflash_upgrader.go | 18 +-- pkg/manager/member/tiflash_upgrader_test.go | 30 +++-- pkg/manager/member/tikv_member_manager.go | 16 ++- pkg/manager/member/tikv_upgrader.go | 14 +- pkg/manager/member/tikv_upgrader_test.go | 39 +++--- pkg/manager/member/utils.go | 114 ---------------- pkg/manager/member/utils_test.go | 75 ----------- pkg/manager/utils/config.go | 25 +--- pkg/manager/{member => utils}/config_test.go | 2 +- pkg/manager/utils/configmap.go | 51 ++++++++ .../utils/{statefulset => }/statefulset.go | 16 +-- .../builder.go => statefulset_builder.go} | 2 +- pkg/manager/utils/statefulset_test.go | 96 ++++++++++++++ pkg/monitor/monitor/monitor_manager.go | 5 +- 34 files changed, 337 insertions(+), 474 deletions(-) delete mode 100644 pkg/manager/member/config.go rename pkg/manager/{member => utils}/config_test.go (99%) create mode 100644 pkg/manager/utils/configmap.go rename pkg/manager/utils/{statefulset => }/statefulset.go (88%) rename pkg/manager/utils/{statefulset/builder.go => statefulset_builder.go} (99%) create mode 100644 pkg/manager/utils/statefulset_test.go diff --git a/pkg/manager/member/config.go b/pkg/manager/member/config.go deleted file mode 100644 index d666eabbe62..00000000000 --- a/pkg/manager/member/config.go +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright 2020 PingCAP, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// See the License for the specific language governing permissions and -// limitations under the License. - -package member - -import ( - "fmt" - - perrors "github.com/pingcap/errors" - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" - "github.com/pingcap/tidb-operator/pkg/apis/util/toml" - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/errors" - corelisters "k8s.io/client-go/listers/core/v1" -) - -func updateConfigMap(old, new *corev1.ConfigMap) (bool, error) { - dataEqual := true - - // check config - tomlField := []string{"config-file" /*pd,tikv,tidb */, "pump-config", "config_templ.toml" /*tiflash*/, "proxy_templ.toml" /*tiflash*/} - for _, k := range tomlField { - oldData, oldOK := old.Data[k] - newData, newOK := new.Data[k] - - if oldOK != newOK { - dataEqual = false - } - - if !oldOK || !newOK { - continue - } - - equal, err := toml.Equal([]byte(oldData), []byte(newData)) - if err != nil { - return false, perrors.Annotatef(err, "compare %s/%s %s and %s failed", old.Namespace, old.Name, oldData, newData) - } - - if equal { - new.Data[k] = oldData - } else { - dataEqual = false - } - } - - // check startup script - field := "startup-script" - oldScript, oldExist := old.Data[field] - newScript, newExist := new.Data[field] - if oldExist != newExist { - dataEqual = false - } else if oldExist && newExist { - if oldScript != newScript { - dataEqual = false - } - } - - return dataEqual, nil -} - -// updateConfigMap set the toml field as the old one if they are logically equal. -func updateConfigMapIfNeed( - cmLister corelisters.ConfigMapLister, - configUpdateStrategy v1alpha1.ConfigUpdateStrategy, - inUseName string, - desired *corev1.ConfigMap, -) error { - - switch configUpdateStrategy { - case v1alpha1.ConfigUpdateStrategyInPlace: - if inUseName != "" { - desired.Name = inUseName - } - return nil - case v1alpha1.ConfigUpdateStrategyRollingUpdate: - existing, err := cmLister.ConfigMaps(desired.Namespace).Get(inUseName) - if err != nil { - if errors.IsNotFound(err) { - AddConfigMapDigestSuffix(desired) - return nil - } - - return perrors.AddStack(err) - } - - dataEqual, err := updateConfigMap(existing, desired) - if err != nil { - return err - } - - AddConfigMapDigestSuffix(desired) - - confirmNameByData(existing, desired, dataEqual) - - return nil - default: - return perrors.Errorf("unknown config update strategy: %v", configUpdateStrategy) - - } -} - -// confirmNameByData is used to fix the problem that -// when configUpdateStrategy is changed from InPlace to RollingUpdate for the first time, -// the name of desired configmap maybe different from the existing one while -// the data of them are the same, which will cause rolling update. -func confirmNameByData(existing, desired *corev1.ConfigMap, dataEqual bool) { - if dataEqual && existing.Name != desired.Name { - desired.Name = existing.Name - } - if !dataEqual && existing.Name == desired.Name { - desired.Name = fmt.Sprintf("%s-new", desired.Name) - } -} diff --git a/pkg/manager/member/dm_master_member_manager.go b/pkg/manager/member/dm_master_member_manager.go index 712e8602544..428e4a7a7ff 100644 --- a/pkg/manager/member/dm_master_member_manager.go +++ b/pkg/manager/member/dm_master_member_manager.go @@ -23,6 +23,7 @@ import ( "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" "github.com/pingcap/tidb-operator/pkg/controller" "github.com/pingcap/tidb-operator/pkg/manager" + mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" "github.com/pingcap/tidb-operator/pkg/util" apps "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" @@ -193,7 +194,7 @@ func (m *masterMemberManager) syncMasterStatefulSetForDMCluster(dc *v1alpha1.DMC return err } if setNotExist { - err = SetStatefulSetLastAppliedConfigAnnotation(newMasterSet) + err = mngerutils.SetStatefulSetLastAppliedConfigAnnotation(newMasterSet) if err != nil { return err } @@ -207,8 +208,8 @@ func (m *masterMemberManager) syncMasterStatefulSetForDMCluster(dc *v1alpha1.DMC // Force update takes precedence over scaling because force upgrade won't take effect when cluster gets stuck at scaling if !dc.Status.Master.Synced && NeedForceUpgrade(dc.Annotations) { dc.Status.Master.Phase = v1alpha1.UpgradePhase - setUpgradePartition(newMasterSet, 0) - errSTS := UpdateStatefulSet(m.deps.StatefulSetControl, dc, newMasterSet, oldMasterSet) + mngerutils.SetUpgradePartition(newMasterSet, 0) + errSTS := mngerutils.UpdateStatefulSet(m.deps.StatefulSetControl, dc, newMasterSet, oldMasterSet) return controller.RequeueErrorf("dmcluster: [%s/%s]'s dm-master needs force upgrade, %v", ns, dcName, errSTS) } @@ -240,7 +241,7 @@ func (m *masterMemberManager) syncMasterStatefulSetForDMCluster(dc *v1alpha1.DMC } } - return UpdateStatefulSet(m.deps.StatefulSetControl, dc, newMasterSet, oldMasterSet) + return mngerutils.UpdateStatefulSet(m.deps.StatefulSetControl, dc, newMasterSet, oldMasterSet) } // shouldRecover checks whether we should perform recovery operation. @@ -466,7 +467,7 @@ func getNewMasterHeadlessServiceForDMCluster(dc *v1alpha1.DMCluster) *corev1.Ser } func (m *masterMemberManager) masterStatefulSetIsUpgrading(set *apps.StatefulSet, dc *v1alpha1.DMCluster) (bool, error) { - if statefulSetIsUpgrading(set) { + if mngerutils.StatefulSetIsUpgrading(set) { return true, nil } instanceName := dc.GetInstanceName() @@ -749,7 +750,7 @@ func getMasterConfigMap(dc *v1alpha1.DMCluster) (*corev1.ConfigMap, error) { }, } - if err := AddConfigMapDigestSuffix(cm); err != nil { + if err := mngerutils.AddConfigMapDigestSuffix(cm); err != nil { return nil, err } return cm, nil diff --git a/pkg/manager/member/dm_master_member_manager_test.go b/pkg/manager/member/dm_master_member_manager_test.go index aeec33857e4..b5cdb1040dd 100644 --- a/pkg/manager/member/dm_master_member_manager_test.go +++ b/pkg/manager/member/dm_master_member_manager_test.go @@ -25,6 +25,7 @@ import ( "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" "github.com/pingcap/tidb-operator/pkg/controller" "github.com/pingcap/tidb-operator/pkg/dmapi" + mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" apps "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" v1 "k8s.io/api/core/v1" @@ -1345,7 +1346,7 @@ ssl-key = "/var/lib/dm-master-tls/tls.key" g.Expect(err).To(Succeed()) // startup-script is better to be tested in e2e tt.expected.Data["startup-script"] = cm.Data["startup-script"] - g.Expect(AddConfigMapDigestSuffix(tt.expected)).To(Succeed()) + g.Expect(mngerutils.AddConfigMapDigestSuffix(tt.expected)).To(Succeed()) if diff := cmp.Diff(*tt.expected, *cm); diff != "" { t.Errorf("unexpected plugin configuration (-want, +got): %s", diff) } diff --git a/pkg/manager/member/dm_master_upgrader.go b/pkg/manager/member/dm_master_upgrader.go index 0811b11015d..41a3dbcc70a 100644 --- a/pkg/manager/member/dm_master_upgrader.go +++ b/pkg/manager/member/dm_master_upgrader.go @@ -19,6 +19,8 @@ import ( "github.com/pingcap/advanced-statefulset/client/apis/apps/v1/helper" "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" "github.com/pingcap/tidb-operator/pkg/controller" + mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" + apps "k8s.io/api/apps/v1" "k8s.io/klog" ) @@ -73,7 +75,7 @@ func (u *masterUpgrader) gracefulUpgrade(dc *v1alpha1.DMCluster, oldSet *apps.St return nil } - setUpgradePartition(newSet, *oldSet.Spec.UpdateStrategy.RollingUpdate.Partition) + mngerutils.SetUpgradePartition(newSet, *oldSet.Spec.UpdateStrategy.RollingUpdate.Partition) podOrdinals := helper.GetPodOrdinals(*oldSet.Spec.Replicas, oldSet).List() for _i := len(podOrdinals) - 1; _i >= 0; _i-- { i := podOrdinals[_i] @@ -96,7 +98,7 @@ func (u *masterUpgrader) gracefulUpgrade(dc *v1alpha1.DMCluster, oldSet *apps.St } //if controller.PodWebhookEnabled { - // setUpgradePartition(newSet, i) + // mngerutils.SetUpgradePartition(newSet, i) // return nil //} @@ -120,7 +122,7 @@ func (u *masterUpgrader) upgradeMasterPod(dc *v1alpha1.DMCluster, ordinal int32, return controller.RequeueErrorf("dmcluster: [%s/%s]'s dm-master member: evicting [%s]'s leader", ns, dcName, upgradePodName) } - setUpgradePartition(newSet, ordinal) + mngerutils.SetUpgradePartition(newSet, ordinal) return nil } diff --git a/pkg/manager/member/dm_master_upgrader_test.go b/pkg/manager/member/dm_master_upgrader_test.go index ed74e7b8cb8..6ec71ac46c2 100644 --- a/pkg/manager/member/dm_master_upgrader_test.go +++ b/pkg/manager/member/dm_master_upgrader_test.go @@ -18,6 +18,7 @@ import ( "testing" "github.com/pingcap/tidb-operator/pkg/apis/label" + mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" @@ -79,7 +80,7 @@ func TestMasterUpgraderUpgrade(t *testing.T) { if test.changeOldSet != nil { test.changeOldSet(oldSet) } - SetStatefulSetLastAppliedConfigAnnotation(oldSet) + mngerutils.SetStatefulSetLastAppliedConfigAnnotation(oldSet) newSet.Spec.UpdateStrategy.RollingUpdate.Partition = pointer.Int32Ptr(3) diff --git a/pkg/manager/member/dm_worker_member_manager.go b/pkg/manager/member/dm_worker_member_manager.go index 22706d32911..11e72a1779d 100644 --- a/pkg/manager/member/dm_worker_member_manager.go +++ b/pkg/manager/member/dm_worker_member_manager.go @@ -22,6 +22,7 @@ import ( "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" "github.com/pingcap/tidb-operator/pkg/controller" "github.com/pingcap/tidb-operator/pkg/manager" + mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" "github.com/pingcap/tidb-operator/pkg/util" apps "k8s.io/api/apps/v1" @@ -191,7 +192,7 @@ func (m *workerMemberManager) syncWorkerStatefulSetForDMCluster(dc *v1alpha1.DMC } if stsNotExist { - err = SetStatefulSetLastAppliedConfigAnnotation(newSts) + err = mngerutils.SetStatefulSetLastAppliedConfigAnnotation(newSts) if err != nil { return err } @@ -217,7 +218,7 @@ func (m *workerMemberManager) syncWorkerStatefulSetForDMCluster(dc *v1alpha1.DMC } } - return UpdateStatefulSet(m.deps.StatefulSetControl, dc, newSts, oldSts) + return mngerutils.UpdateStatefulSet(m.deps.StatefulSetControl, dc, newSts, oldSts) } func (m *workerMemberManager) syncDMClusterStatus(dc *v1alpha1.DMCluster, set *apps.StatefulSet) error { @@ -288,7 +289,7 @@ func (m *workerMemberManager) syncDMClusterStatus(dc *v1alpha1.DMCluster, set *a } func (m *workerMemberManager) workerStatefulSetIsUpgrading(set *apps.StatefulSet, dc *v1alpha1.DMCluster) (bool, error) { - if statefulSetIsUpgrading(set) { + if mngerutils.StatefulSetIsUpgrading(set) { return true, nil } instanceName := dc.GetInstanceName() @@ -556,7 +557,7 @@ func getWorkerConfigMap(dc *v1alpha1.DMCluster) (*corev1.ConfigMap, error) { }, } - if err := AddConfigMapDigestSuffix(cm); err != nil { + if err := mngerutils.AddConfigMapDigestSuffix(cm); err != nil { return nil, err } return cm, nil diff --git a/pkg/manager/member/dm_worker_member_manager_test.go b/pkg/manager/member/dm_worker_member_manager_test.go index 1147f17f2a4..627b02a0667 100644 --- a/pkg/manager/member/dm_worker_member_manager_test.go +++ b/pkg/manager/member/dm_worker_member_manager_test.go @@ -20,6 +20,7 @@ import ( "testing" "github.com/pingcap/tidb-operator/pkg/apis/label" + mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" "github.com/google/go-cmp/cmp" "k8s.io/apimachinery/pkg/util/intstr" @@ -654,7 +655,7 @@ func TestWorkerSyncConfigUpdate(t *testing.T) { g.Expect(r.listCm).To(Succeed()) g.Expect(r.cms).To(HaveLen(2)) g.Expect(r.getSet).To(Succeed()) - using := FindConfigMapVolume(&r.set.Spec.Template.Spec, func(name string) bool { + using := mngerutils.FindConfigMapVolume(&r.set.Spec.Template.Spec, func(name string) bool { return strings.HasPrefix(name, controller.DMWorkerMemberName("test")) }) g.Expect(using).NotTo(BeEmpty()) diff --git a/pkg/manager/member/pd_member_manager.go b/pkg/manager/member/pd_member_manager.go index 89fc00f9d68..0a7fe1ba1c6 100644 --- a/pkg/manager/member/pd_member_manager.go +++ b/pkg/manager/member/pd_member_manager.go @@ -21,12 +21,14 @@ import ( "strconv" "strings" - "github.com/Masterminds/semver" "github.com/pingcap/tidb-operator/pkg/apis/label" "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" "github.com/pingcap/tidb-operator/pkg/controller" "github.com/pingcap/tidb-operator/pkg/manager" + mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" "github.com/pingcap/tidb-operator/pkg/util" + + "github.com/Masterminds/semver" apps "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" @@ -202,7 +204,7 @@ func (m *pdMemberManager) syncPDStatefulSetForTidbCluster(tc *v1alpha1.TidbClust return err } if setNotExist { - err = SetStatefulSetLastAppliedConfigAnnotation(newPDSet) + err = mngerutils.SetStatefulSetLastAppliedConfigAnnotation(newPDSet) if err != nil { return err } @@ -216,8 +218,8 @@ func (m *pdMemberManager) syncPDStatefulSetForTidbCluster(tc *v1alpha1.TidbClust // Force update takes precedence over scaling because force upgrade won't take effect when cluster gets stuck at scaling if !tc.Status.PD.Synced && !templateEqual(newPDSet, oldPDSet) && (NeedForceUpgrade(tc.Annotations) || *oldPDSet.Spec.Replicas < 2) { tc.Status.PD.Phase = v1alpha1.UpgradePhase - setUpgradePartition(newPDSet, 0) - errSTS := UpdateStatefulSet(m.deps.StatefulSetControl, tc, newPDSet, oldPDSet) + mngerutils.SetUpgradePartition(newPDSet, 0) + errSTS := mngerutils.UpdateStatefulSet(m.deps.StatefulSetControl, tc, newPDSet, oldPDSet) return controller.RequeueErrorf("tidbcluster: [%s/%s]'s pd needs force upgrade, %v", ns, tcName, errSTS) } @@ -246,7 +248,7 @@ func (m *pdMemberManager) syncPDStatefulSetForTidbCluster(tc *v1alpha1.TidbClust } } - return UpdateStatefulSet(m.deps.StatefulSetControl, tc, newPDSet, oldPDSet) + return mngerutils.UpdateStatefulSet(m.deps.StatefulSetControl, tc, newPDSet, oldPDSet) } // shouldRecover checks whether we should perform recovery operation. @@ -414,12 +416,12 @@ func (m *pdMemberManager) syncPDConfigMap(tc *v1alpha1.TidbCluster, set *apps.St var inUseName string if set != nil { - inUseName = FindConfigMapVolume(&set.Spec.Template.Spec, func(name string) bool { + inUseName = mngerutils.FindConfigMapVolume(&set.Spec.Template.Spec, func(name string) bool { return strings.HasPrefix(name, controller.PDMemberName(tc.Name)) }) } - err = updateConfigMapIfNeed(m.deps.ConfigMapLister, tc.BasePDSpec().ConfigUpdateStrategy(), inUseName, newCm) + err = mngerutils.UpdateConfigMapIfNeed(m.deps.ConfigMapLister, tc.BasePDSpec().ConfigUpdateStrategy(), inUseName, newCm) if err != nil { return nil, err } @@ -508,7 +510,7 @@ func getNewPDHeadlessServiceForTidbCluster(tc *v1alpha1.TidbCluster) *corev1.Ser } func (m *pdMemberManager) pdStatefulSetIsUpgrading(set *apps.StatefulSet, tc *v1alpha1.TidbCluster) (bool, error) { - if statefulSetIsUpgrading(set) { + if mngerutils.StatefulSetIsUpgrading(set) { return true, nil } instanceName := tc.GetInstanceName() diff --git a/pkg/manager/member/pd_upgrader.go b/pkg/manager/member/pd_upgrader.go index d6c7b07cb06..33e123f3b28 100644 --- a/pkg/manager/member/pd_upgrader.go +++ b/pkg/manager/member/pd_upgrader.go @@ -16,9 +16,12 @@ package member import ( "fmt" + mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" + "github.com/pingcap/advanced-statefulset/client/apis/apps/v1/helper" "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" "github.com/pingcap/tidb-operator/pkg/controller" + apps "k8s.io/api/apps/v1" "k8s.io/klog" ) @@ -74,7 +77,7 @@ func (u *pdUpgrader) gracefulUpgrade(tc *v1alpha1.TidbCluster, oldSet *apps.Stat return nil } - setUpgradePartition(newSet, *oldSet.Spec.UpdateStrategy.RollingUpdate.Partition) + mngerutils.SetUpgradePartition(newSet, *oldSet.Spec.UpdateStrategy.RollingUpdate.Partition) podOrdinals := helper.GetPodOrdinals(*oldSet.Spec.Replicas, oldSet).List() for _i := len(podOrdinals) - 1; _i >= 0; _i-- { i := podOrdinals[_i] @@ -97,7 +100,7 @@ func (u *pdUpgrader) gracefulUpgrade(tc *v1alpha1.TidbCluster, oldSet *apps.Stat } if u.deps.CLIConfig.PodWebhookEnabled { - setUpgradePartition(newSet, i) + mngerutils.SetUpgradePartition(newSet, i) return nil } @@ -141,7 +144,7 @@ func (u *pdUpgrader) upgradePDPod(tc *v1alpha1.TidbCluster, ordinal int32, newSe return controller.RequeueErrorf("tidbcluster: [%s/%s]'s pd member: [%s] is transferring leader to pd member: [%s]", ns, tcName, upgradePdName, targetName) } } - setUpgradePartition(newSet, ordinal) + mngerutils.SetUpgradePartition(newSet, ordinal) return nil } diff --git a/pkg/manager/member/pd_upgrader_test.go b/pkg/manager/member/pd_upgrader_test.go index 6ca0fb06842..07480fe7549 100644 --- a/pkg/manager/member/pd_upgrader_test.go +++ b/pkg/manager/member/pd_upgrader_test.go @@ -17,11 +17,14 @@ import ( "fmt" "testing" + mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" + . "github.com/onsi/gomega" "github.com/pingcap/tidb-operator/pkg/apis/label" "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" "github.com/pingcap/tidb-operator/pkg/controller" "github.com/pingcap/tidb-operator/pkg/pdapi" + apps "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -76,7 +79,7 @@ func TestPDUpgraderUpgrade(t *testing.T) { if test.changeOldSet != nil { test.changeOldSet(oldSet) } - SetStatefulSetLastAppliedConfigAnnotation(oldSet) + mngerutils.SetStatefulSetLastAppliedConfigAnnotation(oldSet) newSet.Spec.UpdateStrategy.RollingUpdate.Partition = pointer.Int32Ptr(3) diff --git a/pkg/manager/member/pump_member_manager.go b/pkg/manager/member/pump_member_manager.go index 9a000a8f64a..0b9ede92eb0 100644 --- a/pkg/manager/member/pump_member_manager.go +++ b/pkg/manager/member/pump_member_manager.go @@ -26,8 +26,10 @@ import ( "github.com/pingcap/tidb-operator/pkg/binlog" "github.com/pingcap/tidb-operator/pkg/controller" "github.com/pingcap/tidb-operator/pkg/manager" + mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" "github.com/pingcap/tidb-operator/pkg/pdapi" "github.com/pingcap/tidb-operator/pkg/util" + apps "k8s.io/api/apps/v1" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" @@ -102,7 +104,7 @@ func (m *pumpMemberManager) syncPumpStatefulSetForTidbCluster(tc *v1alpha1.TidbC return err } if notFound { - err = SetStatefulSetLastAppliedConfigAnnotation(newSet) + err = mngerutils.SetStatefulSetLastAppliedConfigAnnotation(newSet) if err != nil { return err } @@ -124,7 +126,7 @@ func (m *pumpMemberManager) syncPumpStatefulSetForTidbCluster(tc *v1alpha1.TidbC return nil } - return UpdateStatefulSet(m.deps.StatefulSetControl, tc, newSet, oldSet) + return mngerutils.UpdateStatefulSet(m.deps.StatefulSetControl, tc, newSet, oldSet) } func (p *pumpMemberManager) buildBinlogClient(tc *v1alpha1.TidbCluster, control pdapi.PDControlInterface) (client binlogClient, err error) { @@ -243,12 +245,12 @@ func (m *pumpMemberManager) syncConfigMap(tc *v1alpha1.TidbCluster, set *appsv1. var inUseName string if set != nil { - inUseName = FindConfigMapVolume(&set.Spec.Template.Spec, func(name string) bool { + inUseName = mngerutils.FindConfigMapVolume(&set.Spec.Template.Spec, func(name string) bool { return strings.HasPrefix(name, controller.PumpMemberName(tc.Name)) }) } - err = updateConfigMapIfNeed(m.deps.ConfigMapLister, basePumpSpec.ConfigUpdateStrategy(), inUseName, newCm) + err = mngerutils.UpdateConfigMapIfNeed(m.deps.ConfigMapLister, basePumpSpec.ConfigUpdateStrategy(), inUseName, newCm) if err != nil { return nil, err } @@ -533,7 +535,7 @@ func getPumpLogLevel(tc *v1alpha1.TidbCluster) string { } func (m *pumpMemberManager) pumpStatefulSetIsUpgrading(set *apps.StatefulSet, tc *v1alpha1.TidbCluster) (bool, error) { - if statefulSetIsUpgrading(set) { + if mngerutils.StatefulSetIsUpgrading(set) { return true, nil } selector, err := label.New(). diff --git a/pkg/manager/member/pump_member_manager_test.go b/pkg/manager/member/pump_member_manager_test.go index 081325194c2..fee2dab9f5f 100644 --- a/pkg/manager/member/pump_member_manager_test.go +++ b/pkg/manager/member/pump_member_manager_test.go @@ -19,11 +19,13 @@ import ( "strings" "testing" - "github.com/google/go-cmp/cmp" - . "github.com/onsi/gomega" "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" "github.com/pingcap/tidb-operator/pkg/apis/util/config" "github.com/pingcap/tidb-operator/pkg/controller" + mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" + + "github.com/google/go-cmp/cmp" + . "github.com/onsi/gomega" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" @@ -395,7 +397,7 @@ func TestSyncConfigUpdate(t *testing.T) { g.Expect(r.listCm).To(Succeed()) g.Expect(r.cms).To(HaveLen(2)) g.Expect(r.getSet).To(Succeed()) - using := FindConfigMapVolume(&r.set.Spec.Template.Spec, func(name string) bool { + using := mngerutils.FindConfigMapVolume(&r.set.Spec.Template.Spec, func(name string) bool { return strings.HasPrefix(name, controller.PumpMemberName("test")) }) g.Expect(using).NotTo(BeEmpty()) diff --git a/pkg/manager/member/ticdc_member_manager.go b/pkg/manager/member/ticdc_member_manager.go index 18f53115559..b08e10209ba 100644 --- a/pkg/manager/member/ticdc_member_manager.go +++ b/pkg/manager/member/ticdc_member_manager.go @@ -18,13 +18,15 @@ import ( "path" "strings" - "github.com/pingcap/advanced-statefulset/client/apis/apps/v1/helper" "github.com/pingcap/tidb-operator/pkg/apis/label" "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" "github.com/pingcap/tidb-operator/pkg/controller" "github.com/pingcap/tidb-operator/pkg/manager" + mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" "github.com/pingcap/tidb-operator/pkg/pdapi" "github.com/pingcap/tidb-operator/pkg/util" + + "github.com/pingcap/advanced-statefulset/client/apis/apps/v1/helper" apps "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" @@ -105,14 +107,14 @@ func (m *ticdcMemberManager) syncTiCDCConfigMap(tc *v1alpha1.TidbCluster, set *a var inUseName string if set != nil { - inUseName = FindConfigMapVolume(&set.Spec.Template.Spec, func(name string) bool { + inUseName = mngerutils.FindConfigMapVolume(&set.Spec.Template.Spec, func(name string) bool { return strings.HasPrefix(name, controller.TiCDCMemberName(tc.Name)) }) } klog.V(3).Info("get ticdc in use config map name: ", inUseName) - err = updateConfigMapIfNeed(m.deps.ConfigMapLister, tc.BaseTiCDCSpec().ConfigUpdateStrategy(), inUseName, newCm) + err = mngerutils.UpdateConfigMapIfNeed(m.deps.ConfigMapLister, tc.BaseTiCDCSpec().ConfigUpdateStrategy(), inUseName, newCm) if err != nil { return nil, err } @@ -171,7 +173,7 @@ func (m *ticdcMemberManager) syncStatefulSet(tc *v1alpha1.TidbCluster) error { klog.Infof("TidbCluster: %s/%s, waiting for PD cluster running", ns, tcName) return nil } - err = SetStatefulSetLastAppliedConfigAnnotation(newSts) + err = mngerutils.SetStatefulSetLastAppliedConfigAnnotation(newSts) if err != nil { return err } @@ -197,7 +199,7 @@ func (m *ticdcMemberManager) syncStatefulSet(tc *v1alpha1.TidbCluster) error { } } - return UpdateStatefulSet(m.deps.StatefulSetControl, tc, newSts, oldSts) + return mngerutils.UpdateStatefulSet(m.deps.StatefulSetControl, tc, newSts, oldSts) } func (m *ticdcMemberManager) syncTiCDCStatus(tc *v1alpha1.TidbCluster, sts *apps.StatefulSet) error { @@ -544,7 +546,7 @@ func labelTiCDC(tc *v1alpha1.TidbCluster) label.Label { } func ticdcStatefulSetIsUpgrading(podLister corelisters.PodLister, pdControl pdapi.PDControlInterface, set *apps.StatefulSet, tc *v1alpha1.TidbCluster) (bool, error) { - if statefulSetIsUpgrading(set) { + if mngerutils.StatefulSetIsUpgrading(set) { return true, nil } instanceName := tc.GetInstanceName() diff --git a/pkg/manager/member/ticdc_upgrader.go b/pkg/manager/member/ticdc_upgrader.go index da16d728cbe..c4b36615186 100644 --- a/pkg/manager/member/ticdc_upgrader.go +++ b/pkg/manager/member/ticdc_upgrader.go @@ -16,9 +16,12 @@ package member import ( "fmt" - "github.com/pingcap/advanced-statefulset/client/apis/apps/v1/helper" + mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" "github.com/pingcap/tidb-operator/pkg/controller" + + "github.com/pingcap/advanced-statefulset/client/apis/apps/v1/helper" apps "k8s.io/api/apps/v1" "k8s.io/klog" ) @@ -82,7 +85,7 @@ func (u *ticdcUpgrader) Upgrade(tc *v1alpha1.TidbCluster, oldSet *apps.StatefulS return nil } - setUpgradePartition(newSet, *oldSet.Spec.UpdateStrategy.RollingUpdate.Partition) + mngerutils.SetUpgradePartition(newSet, *oldSet.Spec.UpdateStrategy.RollingUpdate.Partition) podOrdinals := helper.GetPodOrdinals(*oldSet.Spec.Replicas, oldSet).List() for _i := len(podOrdinals) - 1; _i >= 0; _i-- { i := podOrdinals[_i] @@ -102,7 +105,7 @@ func (u *ticdcUpgrader) Upgrade(tc *v1alpha1.TidbCluster, oldSet *apps.StatefulS } continue } - setUpgradePartition(newSet, i) + mngerutils.SetUpgradePartition(newSet, i) return nil } diff --git a/pkg/manager/member/ticdc_upgrader_test.go b/pkg/manager/member/ticdc_upgrader_test.go index bc29d869651..6883194cac7 100644 --- a/pkg/manager/member/ticdc_upgrader_test.go +++ b/pkg/manager/member/ticdc_upgrader_test.go @@ -16,10 +16,13 @@ package member import ( "testing" - . "github.com/onsi/gomega" + mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" + "github.com/pingcap/tidb-operator/pkg/apis/label" "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" "github.com/pingcap/tidb-operator/pkg/controller" + + . "github.com/onsi/gomega" apps "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -64,7 +67,7 @@ func TestTiCDCUpgrader_Upgrade(t *testing.T) { if test.changeOldSet != nil { test.changeOldSet(oldSet) } - SetStatefulSetLastAppliedConfigAnnotation(oldSet) + mngerutils.SetStatefulSetLastAppliedConfigAnnotation(oldSet) err := upgrader.Upgrade(tc, oldSet, newSet) if test.errorExpect { @@ -179,7 +182,7 @@ func TestTiCDCUpgrader_Upgrade(t *testing.T) { tc.Status.TiCDC.Synced = true }, changeOldSet: func(oldSet *apps.StatefulSet) { - SetStatefulSetLastAppliedConfigAnnotation(oldSet) + mngerutils.SetStatefulSetLastAppliedConfigAnnotation(oldSet) }, errorExpect: false, expectFn: func(g *GomegaWithT, tc *v1alpha1.TidbCluster, newSet *apps.StatefulSet) { @@ -198,7 +201,7 @@ func TestTiCDCUpgrader_Upgrade(t *testing.T) { tc.Status.TiCDC.Synced = true }, changeOldSet: func(oldSet *apps.StatefulSet) { - SetStatefulSetLastAppliedConfigAnnotation(oldSet) + mngerutils.SetStatefulSetLastAppliedConfigAnnotation(oldSet) }, errorExpect: false, expectFn: func(g *GomegaWithT, tc *v1alpha1.TidbCluster, newSet *apps.StatefulSet) { @@ -217,7 +220,7 @@ func TestTiCDCUpgrader_Upgrade(t *testing.T) { tc.Status.TiCDC.Synced = true }, changeOldSet: func(oldSet *apps.StatefulSet) { - SetStatefulSetLastAppliedConfigAnnotation(oldSet) + mngerutils.SetStatefulSetLastAppliedConfigAnnotation(oldSet) }, errorExpect: false, expectFn: func(g *GomegaWithT, tc *v1alpha1.TidbCluster, newSet *apps.StatefulSet) { @@ -236,7 +239,7 @@ func TestTiCDCUpgrader_Upgrade(t *testing.T) { tc.Status.TiCDC.Synced = true }, changeOldSet: func(oldSet *apps.StatefulSet) { - SetStatefulSetLastAppliedConfigAnnotation(oldSet) + mngerutils.SetStatefulSetLastAppliedConfigAnnotation(oldSet) }, errorExpect: false, expectFn: func(g *GomegaWithT, tc *v1alpha1.TidbCluster, newSet *apps.StatefulSet) { @@ -255,7 +258,7 @@ func TestTiCDCUpgrader_Upgrade(t *testing.T) { tc.Status.TiCDC.Synced = true }, changeOldSet: func(oldSet *apps.StatefulSet) { - SetStatefulSetLastAppliedConfigAnnotation(oldSet) + mngerutils.SetStatefulSetLastAppliedConfigAnnotation(oldSet) }, errorExpect: false, expectFn: func(g *GomegaWithT, tc *v1alpha1.TidbCluster, newSet *apps.StatefulSet) { diff --git a/pkg/manager/member/tidb_member_manager.go b/pkg/manager/member/tidb_member_manager.go index ea81d028a3f..20a0f10592a 100644 --- a/pkg/manager/member/tidb_member_manager.go +++ b/pkg/manager/member/tidb_member_manager.go @@ -20,12 +20,15 @@ import ( "strconv" "strings" - "github.com/pingcap/advanced-statefulset/client/apis/apps/v1/helper" + mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" + "github.com/pingcap/tidb-operator/pkg/apis/label" "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" "github.com/pingcap/tidb-operator/pkg/controller" "github.com/pingcap/tidb-operator/pkg/manager" "github.com/pingcap/tidb-operator/pkg/util" + + "github.com/pingcap/advanced-statefulset/client/apis/apps/v1/helper" apps "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/equality" @@ -203,7 +206,7 @@ func (m *tidbMemberManager) syncTiDBStatefulSetForTidbCluster(tc *v1alpha1.TidbC } if setNotExist { - err = SetStatefulSetLastAppliedConfigAnnotation(newTiDBSet) + err = mngerutils.SetStatefulSetLastAppliedConfigAnnotation(newTiDBSet) if err != nil { return err } @@ -240,7 +243,7 @@ func (m *tidbMemberManager) syncTiDBStatefulSetForTidbCluster(tc *v1alpha1.TidbC } } - return UpdateStatefulSet(m.deps.StatefulSetControl, tc, newTiDBSet, oldTiDBSet) + return mngerutils.UpdateStatefulSet(m.deps.StatefulSetControl, tc, newTiDBSet, oldTiDBSet) } func (m *tidbMemberManager) shouldRecover(tc *v1alpha1.TidbCluster) bool { @@ -357,14 +360,14 @@ func (m *tidbMemberManager) syncTiDBConfigMap(tc *v1alpha1.TidbCluster, set *app var inUseName string if set != nil { - inUseName = FindConfigMapVolume(&set.Spec.Template.Spec, func(name string) bool { + inUseName = mngerutils.FindConfigMapVolume(&set.Spec.Template.Spec, func(name string) bool { return strings.HasPrefix(name, controller.TiDBMemberName(tc.Name)) }) } klog.V(3).Info("get tidb in use config map name: ", inUseName) - err = updateConfigMapIfNeed(m.deps.ConfigMapLister, tc.BaseTiDBSpec().ConfigUpdateStrategy(), inUseName, newCm) + err = mngerutils.UpdateConfigMapIfNeed(m.deps.ConfigMapLister, tc.BaseTiDBSpec().ConfigUpdateStrategy(), inUseName, newCm) if err != nil { return nil, err } @@ -897,7 +900,7 @@ func (m *tidbMemberManager) syncTidbClusterStatus(tc *v1alpha1.TidbCluster, set } func tidbStatefulSetIsUpgrading(podLister corelisters.PodLister, set *apps.StatefulSet, tc *v1alpha1.TidbCluster) (bool, error) { - if statefulSetIsUpgrading(set) { + if mngerutils.StatefulSetIsUpgrading(set) { return true, nil } selector, err := label.New(). diff --git a/pkg/manager/member/tidb_member_manager_test.go b/pkg/manager/member/tidb_member_manager_test.go index 7481c924188..01aa97b6486 100644 --- a/pkg/manager/member/tidb_member_manager_test.go +++ b/pkg/manager/member/tidb_member_manager_test.go @@ -21,12 +21,15 @@ import ( "testing" "time" - "github.com/google/go-cmp/cmp" - . "github.com/onsi/gomega" + mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" + "github.com/pingcap/tidb-operator/pkg/apis/label" "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" "github.com/pingcap/tidb-operator/pkg/apis/util/toml" "github.com/pingcap/tidb-operator/pkg/controller" + + "github.com/google/go-cmp/cmp" + . "github.com/onsi/gomega" apps "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" v1 "k8s.io/api/core/v1" @@ -1009,7 +1012,7 @@ func TestGetNewTiDBSetForTidbCluster(t *testing.T) { }, }, testSts: func(sts *apps.StatefulSet) { - cmName := FindConfigMapVolume(&sts.Spec.Template.Spec, func(name string) bool { + cmName := mngerutils.FindConfigMapVolume(&sts.Spec.Template.Spec, func(name string) bool { return strings.HasPrefix(name, controller.TiDBMemberName("tc")) }) g := NewGomegaWithT(t) diff --git a/pkg/manager/member/tidb_upgrader.go b/pkg/manager/member/tidb_upgrader.go index 795a646270d..53a1baeafd1 100644 --- a/pkg/manager/member/tidb_upgrader.go +++ b/pkg/manager/member/tidb_upgrader.go @@ -16,9 +16,12 @@ package member import ( "fmt" - "github.com/pingcap/advanced-statefulset/client/apis/apps/v1/helper" + mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" "github.com/pingcap/tidb-operator/pkg/controller" + + "github.com/pingcap/advanced-statefulset/client/apis/apps/v1/helper" apps "k8s.io/api/apps/v1" "k8s.io/klog" ) @@ -82,7 +85,7 @@ func (u *tidbUpgrader) Upgrade(tc *v1alpha1.TidbCluster, oldSet *apps.StatefulSe return nil } - setUpgradePartition(newSet, *oldSet.Spec.UpdateStrategy.RollingUpdate.Partition) + mngerutils.SetUpgradePartition(newSet, *oldSet.Spec.UpdateStrategy.RollingUpdate.Partition) podOrdinals := helper.GetPodOrdinals(*oldSet.Spec.Replicas, oldSet).List() for _i := len(podOrdinals) - 1; _i >= 0; _i-- { i := podOrdinals[_i] @@ -109,7 +112,7 @@ func (u *tidbUpgrader) Upgrade(tc *v1alpha1.TidbCluster, oldSet *apps.StatefulSe } func (u *tidbUpgrader) upgradeTiDBPod(tc *v1alpha1.TidbCluster, ordinal int32, newSet *apps.StatefulSet) error { - setUpgradePartition(newSet, ordinal) + mngerutils.SetUpgradePartition(newSet, ordinal) return nil } diff --git a/pkg/manager/member/tidb_upgrader_test.go b/pkg/manager/member/tidb_upgrader_test.go index 8cbaee9b5a7..1e925d16d9f 100644 --- a/pkg/manager/member/tidb_upgrader_test.go +++ b/pkg/manager/member/tidb_upgrader_test.go @@ -16,10 +16,13 @@ package member import ( "testing" - . "github.com/onsi/gomega" + mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" + "github.com/pingcap/tidb-operator/pkg/apis/label" "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" "github.com/pingcap/tidb-operator/pkg/controller" + + . "github.com/onsi/gomega" apps "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,7 +64,7 @@ func TestTiDBUpgrader_Upgrade(t *testing.T) { if test.getLastAppliedConfigErr { oldSet.SetAnnotations(map[string]string{LastAppliedConfigAnnotation: "fake apply config"}) } else { - SetStatefulSetLastAppliedConfigAnnotation(oldSet) + mngerutils.SetStatefulSetLastAppliedConfigAnnotation(oldSet) } err := upgrader.Upgrade(tc, oldSet, newSet) if test.errorExpect { diff --git a/pkg/manager/member/tiflash_member_manager.go b/pkg/manager/member/tiflash_member_manager.go index d5849bea874..deebcb68449 100644 --- a/pkg/manager/member/tiflash_member_manager.go +++ b/pkg/manager/member/tiflash_member_manager.go @@ -19,13 +19,15 @@ import ( "regexp" "strings" - "github.com/pingcap/kvproto/pkg/metapb" "github.com/pingcap/tidb-operator/pkg/apis/label" "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" "github.com/pingcap/tidb-operator/pkg/controller" "github.com/pingcap/tidb-operator/pkg/manager" + mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" "github.com/pingcap/tidb-operator/pkg/pdapi" "github.com/pingcap/tidb-operator/pkg/util" + + "github.com/pingcap/kvproto/pkg/metapb" apps "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" @@ -188,7 +190,7 @@ func (m *tiflashMemberManager) syncStatefulSet(tc *v1alpha1.TidbCluster) error { klog.Infof("TidbCluster: %s/%s, waiting for PD cluster running", ns, tcName) return nil } - err = SetStatefulSetLastAppliedConfigAnnotation(newSet) + err = mngerutils.SetStatefulSetLastAppliedConfigAnnotation(newSet) if err != nil { return err } @@ -227,7 +229,7 @@ func (m *tiflashMemberManager) syncStatefulSet(tc *v1alpha1.TidbCluster) error { } } - return UpdateStatefulSet(m.deps.StatefulSetControl, tc, newSet, oldSet) + return mngerutils.UpdateStatefulSet(m.deps.StatefulSetControl, tc, newSet, oldSet) } func (m *tiflashMemberManager) syncConfigMap(tc *v1alpha1.TidbCluster, set *apps.StatefulSet) (*corev1.ConfigMap, error) { @@ -238,12 +240,12 @@ func (m *tiflashMemberManager) syncConfigMap(tc *v1alpha1.TidbCluster, set *apps var inUseName string if set != nil { - inUseName = FindConfigMapVolume(&set.Spec.Template.Spec, func(name string) bool { + inUseName = mngerutils.FindConfigMapVolume(&set.Spec.Template.Spec, func(name string) bool { return strings.HasPrefix(name, controller.TiFlashMemberName(tc.Name)) }) } - err = updateConfigMapIfNeed(m.deps.ConfigMapLister, tc.BaseTiFlashSpec().ConfigUpdateStrategy(), inUseName, newCm) + err = mngerutils.UpdateConfigMapIfNeed(m.deps.ConfigMapLister, tc.BaseTiFlashSpec().ConfigUpdateStrategy(), inUseName, newCm) if err != nil { return nil, err } @@ -833,7 +835,7 @@ func (m *tiflashMemberManager) storeLabelsEqualNodeLabels(storeLabels []*metapb. } func tiflashStatefulSetIsUpgrading(podLister corelisters.PodLister, pdControl pdapi.PDControlInterface, set *apps.StatefulSet, tc *v1alpha1.TidbCluster) (bool, error) { - if statefulSetIsUpgrading(set) { + if mngerutils.StatefulSetIsUpgrading(set) { return true, nil } instanceName := tc.GetInstanceName() diff --git a/pkg/manager/member/tiflash_upgrader.go b/pkg/manager/member/tiflash_upgrader.go index 320706989b2..8b18113653b 100644 --- a/pkg/manager/member/tiflash_upgrader.go +++ b/pkg/manager/member/tiflash_upgrader.go @@ -16,15 +16,17 @@ package member import ( "fmt" - apps "k8s.io/api/apps/v1" - "k8s.io/klog" - podutil "k8s.io/kubernetes/pkg/api/v1/pod" + mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" - "github.com/Masterminds/semver" - "github.com/pingcap/advanced-statefulset/client/apis/apps/v1/helper" "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" "github.com/pingcap/tidb-operator/pkg/controller" "github.com/pingcap/tidb-operator/pkg/tiflashapi" + + "github.com/Masterminds/semver" + "github.com/pingcap/advanced-statefulset/client/apis/apps/v1/helper" + apps "k8s.io/api/apps/v1" + "k8s.io/klog" + podutil "k8s.io/kubernetes/pkg/api/v1/pod" ) var ( @@ -85,13 +87,13 @@ func (u *tiflashUpgrader) Upgrade(tc *v1alpha1.TidbCluster, oldSet *apps.Statefu return nil } - setUpgradePartition(newSet, *oldSet.Spec.UpdateStrategy.RollingUpdate.Partition) + mngerutils.SetUpgradePartition(newSet, *oldSet.Spec.UpdateStrategy.RollingUpdate.Partition) podOrdinals := helper.GetPodOrdinals(*oldSet.Spec.Replicas, oldSet).List() for _i := len(podOrdinals) - 1; _i >= 0; _i-- { i := podOrdinals[_i] store := getTiFlashStoreByOrdinal(tc.GetName(), tc.Status.TiFlash, i) if store == nil { - setUpgradePartition(newSet, i) + mngerutils.SetUpgradePartition(newSet, i) continue } podName := TiFlashPodName(tcName, i) @@ -133,7 +135,7 @@ func (u *tiflashUpgrader) Upgrade(tc *v1alpha1.TidbCluster, oldSet *apps.Statefu continue } - setUpgradePartition(newSet, i) + mngerutils.SetUpgradePartition(newSet, i) return nil } diff --git a/pkg/manager/member/tiflash_upgrader_test.go b/pkg/manager/member/tiflash_upgrader_test.go index eedcdc30992..95b75dce898 100644 --- a/pkg/manager/member/tiflash_upgrader_test.go +++ b/pkg/manager/member/tiflash_upgrader_test.go @@ -26,6 +26,8 @@ import ( podinformers "k8s.io/client-go/informers/core/v1" "k8s.io/utils/pointer" + mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" + "github.com/pingcap/tidb-operator/pkg/apis/label" "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" "github.com/pingcap/tidb-operator/pkg/controller" @@ -91,7 +93,7 @@ func TestTiFlashUpgraderUpgrade(t *testing.T) { name: "modify oldSet update strategy to OnDelete", changeFn: nil, changeOldSet: func(oldSet *apps.StatefulSet) { - SetStatefulSetLastAppliedConfigAnnotation(oldSet) + mngerutils.SetStatefulSetLastAppliedConfigAnnotation(oldSet) oldSet.Spec.UpdateStrategy = apps.StatefulSetUpdateStrategy{ Type: apps.OnDeleteStatefulSetStrategyType, } @@ -110,7 +112,7 @@ func TestTiFlashUpgraderUpgrade(t *testing.T) { name: "set oldSet's RollingUpdate strategy to nil", changeFn: nil, changeOldSet: func(oldSet *apps.StatefulSet) { - SetStatefulSetLastAppliedConfigAnnotation(oldSet) + mngerutils.SetStatefulSetLastAppliedConfigAnnotation(oldSet) oldSet.Spec.UpdateStrategy = apps.StatefulSetUpdateStrategy{ Type: apps.RollingUpdateStatefulSetStrategyType, } @@ -137,7 +139,7 @@ func TestTiFlashUpgraderUpgrade(t *testing.T) { tc.Status.TiFlash.Stores["3"] = store }, changeOldSet: func(oldSet *apps.StatefulSet) { - SetStatefulSetLastAppliedConfigAnnotation(oldSet) + mngerutils.SetStatefulSetLastAppliedConfigAnnotation(oldSet) }, changePods: nil, updatePodErr: false, @@ -163,7 +165,7 @@ func TestTiFlashUpgraderUpgrade(t *testing.T) { tc.Status.TiFlash.Stores["2"] = store }, changeOldSet: func(oldSet *apps.StatefulSet) { - SetStatefulSetLastAppliedConfigAnnotation(oldSet) + mngerutils.SetStatefulSetLastAppliedConfigAnnotation(oldSet) oldSet.Status.CurrentReplicas = 2 oldSet.Status.UpdatedReplicas = 1 oldSet.Spec.UpdateStrategy.RollingUpdate.Partition = pointer.Int32Ptr(2) @@ -186,7 +188,7 @@ func TestTiFlashUpgraderUpgrade(t *testing.T) { }, changeOldSet: func(oldSet *apps.StatefulSet) { oldSet.Spec.Template.Spec.Containers[0].Image = "old-image" - SetStatefulSetLastAppliedConfigAnnotation(oldSet) + mngerutils.SetStatefulSetLastAppliedConfigAnnotation(oldSet) }, changePods: nil, updatePodErr: false, @@ -224,7 +226,7 @@ func TestTiFlashUpgraderUpgrade(t *testing.T) { tc.Status.TiFlash.Synced = true }, changeOldSet: func(oldSet *apps.StatefulSet) { - SetStatefulSetLastAppliedConfigAnnotation(oldSet) + mngerutils.SetStatefulSetLastAppliedConfigAnnotation(oldSet) }, changePods: nil, updatePodErr: false, @@ -272,7 +274,7 @@ func TestTiFlashUpgraderUpgrade(t *testing.T) { }) }, changeOldSet: func(oldSet *apps.StatefulSet) { // tigger upgrade - SetStatefulSetLastAppliedConfigAnnotation(oldSet) + mngerutils.SetStatefulSetLastAppliedConfigAnnotation(oldSet) oldSet.Spec.Template.Spec.Containers[0].Image = "old-image" }, changePods: func(pods []*corev1.Pod, tc *v1alpha1.TidbCluster, old, new *apps.StatefulSet) { @@ -303,7 +305,7 @@ func TestTiFlashUpgraderUpgrade(t *testing.T) { }) }, changeOldSet: func(oldSet *apps.StatefulSet) { // tigger upgrade - SetStatefulSetLastAppliedConfigAnnotation(oldSet) + mngerutils.SetStatefulSetLastAppliedConfigAnnotation(oldSet) oldSet.Spec.Template.Spec.Containers[0].Image = "old-image" }, changePods: func(pods []*corev1.Pod, tc *v1alpha1.TidbCluster, old, new *apps.StatefulSet) { @@ -334,7 +336,7 @@ func TestTiFlashUpgraderUpgrade(t *testing.T) { }) }, changeOldSet: func(oldSet *apps.StatefulSet) { // tigger upgrade - SetStatefulSetLastAppliedConfigAnnotation(oldSet) + mngerutils.SetStatefulSetLastAppliedConfigAnnotation(oldSet) oldSet.Spec.Template.Spec.Containers[0].Image = "old-image" }, changePods: func(pods []*corev1.Pod, tc *v1alpha1.TidbCluster, old, new *apps.StatefulSet) { @@ -365,7 +367,7 @@ func TestTiFlashUpgraderUpgrade(t *testing.T) { }) }, changeOldSet: func(oldSet *apps.StatefulSet) { // tigger upgrade - SetStatefulSetLastAppliedConfigAnnotation(oldSet) + mngerutils.SetStatefulSetLastAppliedConfigAnnotation(oldSet) oldSet.Spec.Template.Spec.Containers[0].Image = "old-image" }, changePods: func(pods []*corev1.Pod, tc *v1alpha1.TidbCluster, old, new *apps.StatefulSet) { @@ -396,7 +398,7 @@ func TestTiFlashUpgraderUpgrade(t *testing.T) { }) }, changeOldSet: func(oldSet *apps.StatefulSet) { // tigger upgrade - SetStatefulSetLastAppliedConfigAnnotation(oldSet) + mngerutils.SetStatefulSetLastAppliedConfigAnnotation(oldSet) oldSet.Spec.Template.Spec.Containers[0].Image = "old-image" }, changePods: func(pods []*corev1.Pod, tc *v1alpha1.TidbCluster, old, new *apps.StatefulSet) { @@ -427,7 +429,7 @@ func TestTiFlashUpgraderUpgrade(t *testing.T) { }) }, changeOldSet: func(oldSet *apps.StatefulSet) { // tigger upgrade - SetStatefulSetLastAppliedConfigAnnotation(oldSet) + mngerutils.SetStatefulSetLastAppliedConfigAnnotation(oldSet) oldSet.Spec.Template.Spec.Containers[0].Image = "old-image" }, changePods: func(pods []*corev1.Pod, tc *v1alpha1.TidbCluster, old, new *apps.StatefulSet) { @@ -459,7 +461,7 @@ func TestTiFlashUpgraderUpgrade(t *testing.T) { }) }, changeOldSet: func(oldSet *apps.StatefulSet) { // tigger upgrade - SetStatefulSetLastAppliedConfigAnnotation(oldSet) + mngerutils.SetStatefulSetLastAppliedConfigAnnotation(oldSet) oldSet.Spec.Template.Spec.Containers[0].Image = "old-image" }, changePods: func(pods []*corev1.Pod, tc *v1alpha1.TidbCluster, old, new *apps.StatefulSet) { @@ -491,7 +493,7 @@ func TestTiFlashUpgraderUpgrade(t *testing.T) { }) }, changeOldSet: func(oldSet *apps.StatefulSet) { // tigger upgrade - SetStatefulSetLastAppliedConfigAnnotation(oldSet) + mngerutils.SetStatefulSetLastAppliedConfigAnnotation(oldSet) oldSet.Spec.Template.Spec.Containers[0].Image = "old-image" }, changePods: func(pods []*corev1.Pod, tc *v1alpha1.TidbCluster, old, new *apps.StatefulSet) { diff --git a/pkg/manager/member/tikv_member_manager.go b/pkg/manager/member/tikv_member_manager.go index 75b4a3a2078..8ddf46c24a1 100644 --- a/pkg/manager/member/tikv_member_manager.go +++ b/pkg/manager/member/tikv_member_manager.go @@ -22,14 +22,16 @@ import ( "strconv" "strings" - "github.com/pingcap/advanced-statefulset/client/apis/apps/v1/helper" - "github.com/pingcap/kvproto/pkg/metapb" "github.com/pingcap/tidb-operator/pkg/apis/label" "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" "github.com/pingcap/tidb-operator/pkg/controller" "github.com/pingcap/tidb-operator/pkg/manager" + mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" "github.com/pingcap/tidb-operator/pkg/pdapi" "github.com/pingcap/tidb-operator/pkg/util" + + "github.com/pingcap/advanced-statefulset/client/apis/apps/v1/helper" + "github.com/pingcap/kvproto/pkg/metapb" apps "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" @@ -198,7 +200,7 @@ func (m *tikvMemberManager) syncStatefulSetForTidbCluster(tc *v1alpha1.TidbClust return err } if setNotExist { - err = SetStatefulSetLastAppliedConfigAnnotation(newSet) + err = mngerutils.SetStatefulSetLastAppliedConfigAnnotation(newSet) if err != nil { return err } @@ -240,7 +242,7 @@ func (m *tikvMemberManager) syncStatefulSetForTidbCluster(tc *v1alpha1.TidbClust } } - return UpdateStatefulSet(m.deps.StatefulSetControl, tc, newSet, oldSet) + return mngerutils.UpdateStatefulSet(m.deps.StatefulSetControl, tc, newSet, oldSet) } func (m *tikvMemberManager) syncTiKVConfigMap(tc *v1alpha1.TidbCluster, set *apps.StatefulSet) (*corev1.ConfigMap, error) { @@ -255,12 +257,12 @@ func (m *tikvMemberManager) syncTiKVConfigMap(tc *v1alpha1.TidbCluster, set *app var inUseName string if set != nil { - inUseName = FindConfigMapVolume(&set.Spec.Template.Spec, func(name string) bool { + inUseName = mngerutils.FindConfigMapVolume(&set.Spec.Template.Spec, func(name string) bool { return strings.HasPrefix(name, controller.TiKVMemberName(tc.Name)) }) } - err = updateConfigMapIfNeed(m.deps.ConfigMapLister, tc.BaseTiKVSpec().ConfigUpdateStrategy(), inUseName, newCm) + err = mngerutils.UpdateConfigMapIfNeed(m.deps.ConfigMapLister, tc.BaseTiKVSpec().ConfigUpdateStrategy(), inUseName, newCm) if err != nil { return nil, err } @@ -959,7 +961,7 @@ func (m *tikvMemberManager) storeLabelsEqualNodeLabels(storeLabels []*metapb.Sto } func tikvStatefulSetIsUpgrading(podLister corelisters.PodLister, pdControl pdapi.PDControlInterface, set *apps.StatefulSet, tc *v1alpha1.TidbCluster) (bool, error) { - if statefulSetIsUpgrading(set) { + if mngerutils.StatefulSetIsUpgrading(set) { return true, nil } instanceName := tc.GetInstanceName() diff --git a/pkg/manager/member/tikv_upgrader.go b/pkg/manager/member/tikv_upgrader.go index 0532cb7b980..f28dfd2a315 100644 --- a/pkg/manager/member/tikv_upgrader.go +++ b/pkg/manager/member/tikv_upgrader.go @@ -18,10 +18,12 @@ import ( "strconv" "time" - "github.com/pingcap/advanced-statefulset/client/apis/apps/v1/helper" "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" "github.com/pingcap/tidb-operator/pkg/controller" + mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" "github.com/pingcap/tidb-operator/pkg/pdapi" + + "github.com/pingcap/advanced-statefulset/client/apis/apps/v1/helper" apps "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -78,7 +80,7 @@ func (u *tikvUpgrader) Upgrade(meta metav1.Object, oldSet *apps.StatefulSet, new if *oldSet.Spec.Replicas < 2 { klog.Infof("TiKV statefulset replicas are less than 2, skip evicting region leader for tc %s/%s", ns, tcName) status.Phase = v1alpha1.UpgradePhase - setUpgradePartition(newSet, 0) + mngerutils.SetUpgradePartition(newSet, 0) return nil } @@ -107,13 +109,13 @@ func (u *tikvUpgrader) Upgrade(meta metav1.Object, oldSet *apps.StatefulSet, new return nil } - setUpgradePartition(newSet, *oldSet.Spec.UpdateStrategy.RollingUpdate.Partition) + mngerutils.SetUpgradePartition(newSet, *oldSet.Spec.UpdateStrategy.RollingUpdate.Partition) podOrdinals := helper.GetPodOrdinals(*oldSet.Spec.Replicas, oldSet).List() for _i := len(podOrdinals) - 1; _i >= 0; _i-- { i := podOrdinals[_i] store := getStoreByOrdinal(meta.GetName(), *status, i) if store == nil { - setUpgradePartition(newSet, i) + mngerutils.SetUpgradePartition(newSet, i) continue } podName := TikvPodName(tcName, i) @@ -150,7 +152,7 @@ func (u *tikvUpgrader) Upgrade(meta metav1.Object, oldSet *apps.StatefulSet, new } if u.deps.CLIConfig.PodWebhookEnabled { - setUpgradePartition(newSet, i) + mngerutils.SetUpgradePartition(newSet, i) return nil } @@ -181,7 +183,7 @@ func (u *tikvUpgrader) upgradeTiKVPod(tc *v1alpha1.TidbCluster, ordinal int32, n } if u.readyToUpgrade(upgradePod, tc) { - setUpgradePartition(newSet, ordinal) + mngerutils.SetUpgradePartition(newSet, ordinal) return nil } diff --git a/pkg/manager/member/tikv_upgrader_test.go b/pkg/manager/member/tikv_upgrader_test.go index 1c44acdb228..e7cb22c4f1d 100644 --- a/pkg/manager/member/tikv_upgrader_test.go +++ b/pkg/manager/member/tikv_upgrader_test.go @@ -19,12 +19,15 @@ import ( "testing" "time" - . "github.com/onsi/gomega" + mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" + "github.com/pingcap/tidb-operator/pkg/apis/label" "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" "github.com/pingcap/tidb-operator/pkg/controller" "github.com/pingcap/tidb-operator/pkg/pdapi" "github.com/pingcap/tidb-operator/pkg/tikvapi" + + . "github.com/onsi/gomega" apps "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -135,7 +138,7 @@ func TestTiKVUpgraderUpgrade(t *testing.T) { name: "modify oldSet update strategy to OnDelete", changeFn: nil, changeOldSet: func(oldSet *apps.StatefulSet) { - SetStatefulSetLastAppliedConfigAnnotation(oldSet) + mngerutils.SetStatefulSetLastAppliedConfigAnnotation(oldSet) oldSet.Spec.UpdateStrategy = apps.StatefulSetUpdateStrategy{ Type: apps.OnDeleteStatefulSetStrategyType, } @@ -156,7 +159,7 @@ func TestTiKVUpgraderUpgrade(t *testing.T) { name: "set oldSet's RollingUpdate strategy to nil", changeFn: nil, changeOldSet: func(oldSet *apps.StatefulSet) { - SetStatefulSetLastAppliedConfigAnnotation(oldSet) + mngerutils.SetStatefulSetLastAppliedConfigAnnotation(oldSet) oldSet.Spec.UpdateStrategy = apps.StatefulSetUpdateStrategy{ Type: apps.RollingUpdateStatefulSetStrategyType, } @@ -185,7 +188,7 @@ func TestTiKVUpgraderUpgrade(t *testing.T) { tc.Status.TiKV.Stores["3"] = store }, changeOldSet: func(oldSet *apps.StatefulSet) { - SetStatefulSetLastAppliedConfigAnnotation(oldSet) + mngerutils.SetStatefulSetLastAppliedConfigAnnotation(oldSet) }, changePods: func(pods []*corev1.Pod) { for _, pod := range pods { @@ -219,7 +222,7 @@ func TestTiKVUpgraderUpgrade(t *testing.T) { tc.Status.TiKV.Stores["2"] = store }, changeOldSet: func(oldSet *apps.StatefulSet) { - SetStatefulSetLastAppliedConfigAnnotation(oldSet) + mngerutils.SetStatefulSetLastAppliedConfigAnnotation(oldSet) oldSet.Status.CurrentReplicas = 2 oldSet.Status.UpdatedReplicas = 1 oldSet.Spec.UpdateStrategy.RollingUpdate.Partition = pointer.Int32Ptr(2) @@ -251,7 +254,7 @@ func TestTiKVUpgraderUpgrade(t *testing.T) { }, changeOldSet: func(oldSet *apps.StatefulSet) { oldSet.Spec.Template.Spec.Containers[0].Image = "old-image" - SetStatefulSetLastAppliedConfigAnnotation(oldSet) + mngerutils.SetStatefulSetLastAppliedConfigAnnotation(oldSet) }, changePods: nil, beginEvictLeaderErr: false, @@ -293,7 +296,7 @@ func TestTiKVUpgraderUpgrade(t *testing.T) { tc.Status.TiKV.Synced = true }, changeOldSet: func(oldSet *apps.StatefulSet) { - SetStatefulSetLastAppliedConfigAnnotation(oldSet) + mngerutils.SetStatefulSetLastAppliedConfigAnnotation(oldSet) }, changePods: nil, beginEvictLeaderErr: false, @@ -315,7 +318,7 @@ func TestTiKVUpgraderUpgrade(t *testing.T) { tc.Status.TiKV.Synced = true }, changeOldSet: func(oldSet *apps.StatefulSet) { - SetStatefulSetLastAppliedConfigAnnotation(oldSet) + mngerutils.SetStatefulSetLastAppliedConfigAnnotation(oldSet) }, changePods: nil, beginEvictLeaderErr: false, @@ -337,7 +340,7 @@ func TestTiKVUpgraderUpgrade(t *testing.T) { tc.Status.TiKV.Synced = true }, changeOldSet: func(oldSet *apps.StatefulSet) { - SetStatefulSetLastAppliedConfigAnnotation(oldSet) + mngerutils.SetStatefulSetLastAppliedConfigAnnotation(oldSet) }, changePods: nil, beginEvictLeaderErr: false, @@ -383,7 +386,7 @@ func TestTiKVUpgraderUpgrade(t *testing.T) { tc.Status.TiKV.StatefulSet.UpdatedReplicas = 1 }, changeOldSet: func(oldSet *apps.StatefulSet) { - SetStatefulSetLastAppliedConfigAnnotation(oldSet) + mngerutils.SetStatefulSetLastAppliedConfigAnnotation(oldSet) oldSet.Status.CurrentReplicas = 2 oldSet.Status.UpdatedReplicas = 1 oldSet.Spec.UpdateStrategy.RollingUpdate.Partition = pointer.Int32Ptr(2) @@ -411,7 +414,7 @@ func TestTiKVUpgraderUpgrade(t *testing.T) { tc.Status.TiKV.StatefulSet.UpdatedReplicas = 1 }, changeOldSet: func(oldSet *apps.StatefulSet) { - SetStatefulSetLastAppliedConfigAnnotation(oldSet) + mngerutils.SetStatefulSetLastAppliedConfigAnnotation(oldSet) oldSet.Status.CurrentReplicas = 2 oldSet.Status.UpdatedReplicas = 1 oldSet.Spec.UpdateStrategy.RollingUpdate.Partition = pointer.Int32Ptr(2) @@ -447,7 +450,7 @@ func TestTiKVUpgraderUpgrade(t *testing.T) { tc.Status.TiKV.StatefulSet.UpdatedReplicas = 1 }, changeOldSet: func(oldSet *apps.StatefulSet) { - SetStatefulSetLastAppliedConfigAnnotation(oldSet) + mngerutils.SetStatefulSetLastAppliedConfigAnnotation(oldSet) oldSet.Status.CurrentReplicas = 2 oldSet.Status.UpdatedReplicas = 1 oldSet.Spec.UpdateStrategy.RollingUpdate.Partition = pointer.Int32Ptr(2) @@ -483,7 +486,7 @@ func TestTiKVUpgraderUpgrade(t *testing.T) { tc.Status.TiKV.StatefulSet.UpdatedReplicas = 1 }, changeOldSet: func(oldSet *apps.StatefulSet) { - SetStatefulSetLastAppliedConfigAnnotation(oldSet) + mngerutils.SetStatefulSetLastAppliedConfigAnnotation(oldSet) oldSet.Status.CurrentReplicas = 2 oldSet.Status.UpdatedReplicas = 1 oldSet.Spec.UpdateStrategy.RollingUpdate.Partition = pointer.Int32Ptr(2) @@ -511,7 +514,7 @@ func TestTiKVUpgraderUpgrade(t *testing.T) { tc.Status.TiKV.StatefulSet.UpdatedReplicas = 1 }, changeOldSet: func(oldSet *apps.StatefulSet) { - SetStatefulSetLastAppliedConfigAnnotation(oldSet) + mngerutils.SetStatefulSetLastAppliedConfigAnnotation(oldSet) oldSet.Status.CurrentReplicas = 2 oldSet.Status.UpdatedReplicas = 1 oldSet.Spec.UpdateStrategy.RollingUpdate.Partition = pointer.Int32Ptr(2) @@ -546,7 +549,7 @@ func TestTiKVUpgraderUpgrade(t *testing.T) { tc.Status.TiKV.StatefulSet.UpdatedReplicas = 1 }, changeOldSet: func(oldSet *apps.StatefulSet) { - SetStatefulSetLastAppliedConfigAnnotation(oldSet) + mngerutils.SetStatefulSetLastAppliedConfigAnnotation(oldSet) oldSet.Status.CurrentReplicas = 1 oldSet.Status.UpdatedReplicas = 1 oldSet.Spec.Replicas = pointer.Int32Ptr(1) @@ -581,7 +584,7 @@ func TestTiKVUpgraderUpgrade(t *testing.T) { tc.Status.TiKV.StatefulSet.UpdatedReplicas = 1 }, changeOldSet: func(oldSet *apps.StatefulSet) { - SetStatefulSetLastAppliedConfigAnnotation(oldSet) + mngerutils.SetStatefulSetLastAppliedConfigAnnotation(oldSet) oldSet.Status.CurrentReplicas = 2 oldSet.Status.UpdatedReplicas = 1 oldSet.Spec.UpdateStrategy.RollingUpdate.Partition = pointer.Int32Ptr(2) @@ -613,7 +616,7 @@ func TestTiKVUpgraderUpgrade(t *testing.T) { tc.Status.TiKV.StatefulSet.UpdatedReplicas = 1 }, changeOldSet: func(oldSet *apps.StatefulSet) { - SetStatefulSetLastAppliedConfigAnnotation(oldSet) + mngerutils.SetStatefulSetLastAppliedConfigAnnotation(oldSet) oldSet.Status.CurrentReplicas = 2 oldSet.Status.UpdatedReplicas = 1 oldSet.Spec.UpdateStrategy.RollingUpdate.Partition = pointer.Int32Ptr(2) @@ -639,7 +642,7 @@ func TestTiKVUpgraderUpgrade(t *testing.T) { tc.Status.TiKV.StatefulSet.UpdatedReplicas = 1 }, changeOldSet: func(oldSet *apps.StatefulSet) { - SetStatefulSetLastAppliedConfigAnnotation(oldSet) + mngerutils.SetStatefulSetLastAppliedConfigAnnotation(oldSet) oldSet.Status.CurrentReplicas = 2 oldSet.Status.UpdatedReplicas = 1 oldSet.Spec.UpdateStrategy.RollingUpdate.Partition = pointer.Int32Ptr(2) diff --git a/pkg/manager/member/utils.go b/pkg/manager/member/utils.go index ac2cfc4931c..ba8e3f39a9c 100644 --- a/pkg/manager/member/utils.go +++ b/pkg/manager/member/utils.go @@ -14,7 +14,6 @@ package member import ( - "crypto/sha256" "encoding/json" "fmt" "path" @@ -74,30 +73,6 @@ func annotationsMountVolume() (corev1.VolumeMount, corev1.Volume) { return m, v } -// statefulSetIsUpgrading confirms whether the statefulSet is upgrading phase -func statefulSetIsUpgrading(set *apps.StatefulSet) bool { - if set.Status.CurrentRevision != set.Status.UpdateRevision { - return true - } - if set.Generation > set.Status.ObservedGeneration && *set.Spec.Replicas == set.Status.Replicas { - return true - } - return false -} - -// SetStatefulSetLastAppliedConfigAnnotation set last applied config to Statefulset's annotation -func SetStatefulSetLastAppliedConfigAnnotation(set *apps.StatefulSet) error { - setApply, err := util.Encode(set.Spec) - if err != nil { - return err - } - if set.Annotations == nil { - set.Annotations = map[string]string{} - } - set.Annotations[LastAppliedConfigAnnotation] = setApply - return nil -} - // GetLastAppliedConfig get last applied config info from Statefulset's annotation and the podTemplate's annotation func GetLastAppliedConfig(set *apps.StatefulSet) (*apps.StatefulSetSpec, *corev1.PodSpec, error) { specAppliedConfig, ok := set.Annotations[LastAppliedConfigAnnotation] @@ -128,12 +103,6 @@ func templateEqual(new *apps.StatefulSet, old *apps.StatefulSet) bool { return false } -// setUpgradePartition set statefulSet's rolling update partition -func setUpgradePartition(set *apps.StatefulSet, upgradeOrdinal int32) { - set.Spec.UpdateStrategy.RollingUpdate = &apps.RollingUpdateStatefulSetStrategy{Partition: &upgradeOrdinal} - klog.Infof("set %s/%s partition to %d", set.GetNamespace(), set.GetName(), upgradeOrdinal) -} - func MemberPodName(controllerName, controllerKind string, ordinal int32, memberType v1alpha1.MemberType) (string, error) { switch controllerKind { case v1alpha1.TiDBClusterKind: @@ -186,16 +155,6 @@ func NeedForceUpgrade(ann map[string]string) bool { return false } -// FindConfigMapVolume returns the configmap which's name matches the predicate in a PodSpec, empty indicates not found -func FindConfigMapVolume(podSpec *corev1.PodSpec, pred func(string) bool) string { - for _, vol := range podSpec.Volumes { - if vol.ConfigMap != nil && pred(vol.ConfigMap.LocalObjectReference.Name) { - return vol.ConfigMap.LocalObjectReference.Name - } - } - return "" -} - // MarshalTOML is a template function that try to marshal a go value to toml func MarshalTOML(v interface{}) ([]byte, error) { return toml.Marshal(v) @@ -205,25 +164,6 @@ func UnmarshalTOML(b []byte, obj interface{}) error { return toml.Unmarshal(b, obj) } -func Sha256Sum(v interface{}) (string, error) { - data, err := json.Marshal(v) - if err != nil { - return "", err - } - sum := sha256.Sum256(data) - return fmt.Sprintf("%x", sum), nil -} - -func AddConfigMapDigestSuffix(cm *corev1.ConfigMap) error { - sum, err := Sha256Sum(cm.Data) - if err != nil { - return err - } - suffix := fmt.Sprintf("%x", sum)[0:7] - cm.Name = fmt.Sprintf("%s-%s", cm.Name, suffix) - return nil -} - // getStsAnnotations gets annotations for statefulset of given component. func getStsAnnotations(tcAnns map[string]string, component string) map[string]string { anns := map[string]string{} @@ -265,60 +205,6 @@ func MapContainers(podSpec *corev1.PodSpec) map[string]corev1.Container { return m } -// UpdateStatefulSet is a template function to update the statefulset of components -func UpdateStatefulSet(setCtl controller.StatefulSetControlInterface, object runtime.Object, newSet, oldSet *apps.StatefulSet) error { - isOrphan := metav1.GetControllerOf(oldSet) == nil - if newSet.Annotations == nil { - newSet.Annotations = map[string]string{} - } - if oldSet.Annotations == nil { - oldSet.Annotations = map[string]string{} - } - - // Check if an upgrade is needed. - // If not, early return. - if util.StatefulSetEqual(*newSet, *oldSet) && !isOrphan { - return nil - } - - set := *oldSet - - // update specs for sts - *set.Spec.Replicas = *newSet.Spec.Replicas - set.Spec.UpdateStrategy = newSet.Spec.UpdateStrategy - set.Labels = newSet.Labels - set.Annotations = newSet.Annotations - set.Spec.Template = newSet.Spec.Template - if isOrphan { - set.OwnerReferences = newSet.OwnerReferences - } - - var podConfig string - var hasPodConfig bool - if oldSet.Spec.Template.Annotations != nil { - podConfig, hasPodConfig = oldSet.Spec.Template.Annotations[LastAppliedConfigAnnotation] - } - if hasPodConfig { - if set.Spec.Template.Annotations == nil { - set.Spec.Template.Annotations = map[string]string{} - } - set.Spec.Template.Annotations[LastAppliedConfigAnnotation] = podConfig - } - v, ok := oldSet.Annotations[label.AnnStsLastSyncTimestamp] - if ok { - set.Annotations[label.AnnStsLastSyncTimestamp] = v - } - - err := SetStatefulSetLastAppliedConfigAnnotation(&set) - if err != nil { - return err - } - - // commit to k8s - _, err = setCtl.UpdateStatefulSet(object, &set) - return err -} - // findContainerByName finds targetContainer by containerName, If not find, then return nil func findContainerByName(sts *apps.StatefulSet, containerName string) *corev1.Container { for _, c := range sts.Spec.Template.Spec.Containers { diff --git a/pkg/manager/member/utils_test.go b/pkg/manager/member/utils_test.go index 0127bf10a77..e6793f04f28 100644 --- a/pkg/manager/member/utils_test.go +++ b/pkg/manager/member/utils_test.go @@ -26,7 +26,6 @@ import ( "github.com/pingcap/advanced-statefulset/client/apis/apps/v1/helper" "github.com/pingcap/tidb-operator/pkg/apis/label" "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" - apps "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -34,80 +33,6 @@ import ( kubefake "k8s.io/client-go/kubernetes/fake" ) -func TestStatefulSetIsUpgrading(t *testing.T) { - g := NewGomegaWithT(t) - - type testcase struct { - name string - update func(*apps.StatefulSet) - expectUpgrading bool - } - - testFn := func(test *testcase, t *testing.T) { - t.Log(test.name) - - set := &apps.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test", - Namespace: metav1.NamespaceDefault, - }, - } - if test.update != nil { - test.update(set) - } - b := statefulSetIsUpgrading(set) - if test.expectUpgrading { - g.Expect(b).To(BeTrue()) - } else { - g.Expect(b).To(BeFalse()) - } - } - tests := []*testcase{ - { - name: "ObservedGeneration is nil", - update: nil, - expectUpgrading: false, - }, - { - name: "CurrentRevision not equal UpdateRevision", - update: func(set *apps.StatefulSet) { - set.Status.ObservedGeneration = 1000 - set.Status.CurrentRevision = "v1" - set.Status.UpdateRevision = "v2" - }, - expectUpgrading: true, - }, - { - name: "set.Generation > *set.Status.ObservedGeneration && *set.Spec.Replicas == set.Status.Replicas", - update: func(set *apps.StatefulSet) { - set.Generation = 1001 - set.Status.ObservedGeneration = 1000 - set.Status.CurrentRevision = "v1" - set.Status.UpdateRevision = "v1" - set.Status.Replicas = 3 - set.Spec.Replicas = func() *int32 { var i int32 = 3; return &i }() - }, - expectUpgrading: true, - }, - { - name: "replicas not equal", - update: func(set *apps.StatefulSet) { - set.Generation = 1001 - set.Status.ObservedGeneration = 1000 - set.Status.CurrentRevision = "v1" - set.Status.UpdateRevision = "v1" - set.Status.Replicas = 3 - set.Spec.Replicas = func() *int32 { var i int32 = 2; return &i }() - }, - expectUpgrading: false, - }, - } - - for _, test := range tests { - testFn(test, t) - } -} - func TestGetStsAnnotations(t *testing.T) { tests := []struct { name string diff --git a/pkg/manager/utils/config.go b/pkg/manager/utils/config.go index 260932076f8..b7c705ccc82 100644 --- a/pkg/manager/utils/config.go +++ b/pkg/manager/utils/config.go @@ -14,14 +14,11 @@ package utils import ( - "crypto/sha256" - "encoding/json" "fmt" + perrors "github.com/pingcap/errors" "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" "github.com/pingcap/tidb-operator/pkg/apis/util/toml" - - perrors "github.com/pingcap/errors" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" corelisters "k8s.io/client-go/listers/core/v1" @@ -108,6 +105,7 @@ func UpdateConfigMapIfNeed( return nil default: return perrors.Errorf("unknown config update strategy: %v", configUpdateStrategy) + } } @@ -123,22 +121,3 @@ func confirmNameByData(existing, desired *corev1.ConfigMap, dataEqual bool) { desired.Name = fmt.Sprintf("%s-new", desired.Name) } } - -func AddConfigMapDigestSuffix(cm *corev1.ConfigMap) error { - sum, err := Sha256Sum(cm.Data) - if err != nil { - return err - } - suffix := fmt.Sprintf("%x", sum)[0:7] - cm.Name = fmt.Sprintf("%s-%s", cm.Name, suffix) - return nil -} - -func Sha256Sum(v interface{}) (string, error) { - data, err := json.Marshal(v) - if err != nil { - return "", err - } - sum := sha256.Sum256(data) - return fmt.Sprintf("%x", sum), nil -} diff --git a/pkg/manager/member/config_test.go b/pkg/manager/utils/config_test.go similarity index 99% rename from pkg/manager/member/config_test.go rename to pkg/manager/utils/config_test.go index 062bfdba01e..92469efd840 100644 --- a/pkg/manager/member/config_test.go +++ b/pkg/manager/utils/config_test.go @@ -11,7 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package member +package utils import ( "testing" diff --git a/pkg/manager/utils/configmap.go b/pkg/manager/utils/configmap.go new file mode 100644 index 00000000000..690157c77c8 --- /dev/null +++ b/pkg/manager/utils/configmap.go @@ -0,0 +1,51 @@ +// Copyright 2020 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package utils + +import ( + "crypto/sha256" + "encoding/json" + "fmt" + + corev1 "k8s.io/api/core/v1" +) + +func AddConfigMapDigestSuffix(cm *corev1.ConfigMap) error { + sum, err := Sha256Sum(cm.Data) + if err != nil { + return err + } + suffix := fmt.Sprintf("%x", sum)[0:7] + cm.Name = fmt.Sprintf("%s-%s", cm.Name, suffix) + return nil +} + +func Sha256Sum(v interface{}) (string, error) { + data, err := json.Marshal(v) + if err != nil { + return "", err + } + sum := sha256.Sum256(data) + return fmt.Sprintf("%x", sum), nil +} + +// FindConfigMapVolume returns the configmap which's name matches the predicate in a PodSpec, empty indicates not found +func FindConfigMapVolume(podSpec *corev1.PodSpec, pred func(string) bool) string { + for _, vol := range podSpec.Volumes { + if vol.ConfigMap != nil && pred(vol.ConfigMap.LocalObjectReference.Name) { + return vol.ConfigMap.LocalObjectReference.Name + } + } + return "" +} diff --git a/pkg/manager/utils/statefulset/statefulset.go b/pkg/manager/utils/statefulset.go similarity index 88% rename from pkg/manager/utils/statefulset/statefulset.go rename to pkg/manager/utils/statefulset.go index 4209396607a..cc7571b208f 100644 --- a/pkg/manager/utils/statefulset/statefulset.go +++ b/pkg/manager/utils/statefulset.go @@ -11,7 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package statefulset +package utils import ( "github.com/pingcap/tidb-operator/pkg/apis/label" @@ -19,9 +19,9 @@ import ( "github.com/pingcap/tidb-operator/pkg/util" apps "k8s.io/api/apps/v1" - corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/klog" ) const ( @@ -107,12 +107,8 @@ func UpdateStatefulSet(setCtl controller.StatefulSetControlInterface, object run return err } -// FindConfigMapVolume returns the configmap which's name matches the predicate in a PodSpec, empty indicates not found -func FindConfigMapVolume(podSpec *corev1.PodSpec, pred func(string) bool) string { - for _, vol := range podSpec.Volumes { - if vol.ConfigMap != nil && pred(vol.ConfigMap.LocalObjectReference.Name) { - return vol.ConfigMap.LocalObjectReference.Name - } - } - return "" +// SetUpgradePartition set statefulSet's rolling update partition +func SetUpgradePartition(set *apps.StatefulSet, upgradeOrdinal int32) { + set.Spec.UpdateStrategy.RollingUpdate = &apps.RollingUpdateStatefulSetStrategy{Partition: &upgradeOrdinal} + klog.Infof("set %s/%s partition to %d", set.GetNamespace(), set.GetName(), upgradeOrdinal) } diff --git a/pkg/manager/utils/statefulset/builder.go b/pkg/manager/utils/statefulset_builder.go similarity index 99% rename from pkg/manager/utils/statefulset/builder.go rename to pkg/manager/utils/statefulset_builder.go index e23625d2745..0ffb671e3ca 100644 --- a/pkg/manager/utils/statefulset/builder.go +++ b/pkg/manager/utils/statefulset_builder.go @@ -11,7 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package statefulset +package utils import ( "github.com/pingcap/tidb-operator/pkg/util" diff --git a/pkg/manager/utils/statefulset_test.go b/pkg/manager/utils/statefulset_test.go new file mode 100644 index 00000000000..2a5bc614664 --- /dev/null +++ b/pkg/manager/utils/statefulset_test.go @@ -0,0 +1,96 @@ +// Copyright 2018 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package utils + +import ( + "testing" + + . "github.com/onsi/gomega" + apps "k8s.io/api/apps/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +func TestStatefulSetIsUpgrading(t *testing.T) { + g := NewGomegaWithT(t) + + type testcase struct { + name string + update func(*apps.StatefulSet) + expectUpgrading bool + } + + testFn := func(test *testcase, t *testing.T) { + t.Log(test.name) + + set := &apps.StatefulSet{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test", + Namespace: metav1.NamespaceDefault, + }, + } + if test.update != nil { + test.update(set) + } + b := StatefulSetIsUpgrading(set) + if test.expectUpgrading { + g.Expect(b).To(BeTrue()) + } else { + g.Expect(b).To(BeFalse()) + } + } + tests := []*testcase{ + { + name: "ObservedGeneration is nil", + update: nil, + expectUpgrading: false, + }, + { + name: "CurrentRevision not equal UpdateRevision", + update: func(set *apps.StatefulSet) { + set.Status.ObservedGeneration = 1000 + set.Status.CurrentRevision = "v1" + set.Status.UpdateRevision = "v2" + }, + expectUpgrading: true, + }, + { + name: "set.Generation > *set.Status.ObservedGeneration && *set.Spec.Replicas == set.Status.Replicas", + update: func(set *apps.StatefulSet) { + set.Generation = 1001 + set.Status.ObservedGeneration = 1000 + set.Status.CurrentRevision = "v1" + set.Status.UpdateRevision = "v1" + set.Status.Replicas = 3 + set.Spec.Replicas = func() *int32 { var i int32 = 3; return &i }() + }, + expectUpgrading: true, + }, + { + name: "replicas not equal", + update: func(set *apps.StatefulSet) { + set.Generation = 1001 + set.Status.ObservedGeneration = 1000 + set.Status.CurrentRevision = "v1" + set.Status.UpdateRevision = "v1" + set.Status.Replicas = 3 + set.Spec.Replicas = func() *int32 { var i int32 = 2; return &i }() + }, + expectUpgrading: false, + }, + } + + for _, test := range tests { + testFn(test, t) + } +} diff --git a/pkg/monitor/monitor/monitor_manager.go b/pkg/monitor/monitor/monitor_manager.go index 672a36306ba..30fd40774a7 100644 --- a/pkg/monitor/monitor/monitor_manager.go +++ b/pkg/monitor/monitor/monitor_manager.go @@ -29,6 +29,7 @@ import ( "github.com/pingcap/tidb-operator/pkg/monitor" "github.com/pingcap/tidb-operator/pkg/pdapi" "github.com/pingcap/tidb-operator/pkg/util" + mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" utildiscovery "github.com/pingcap/tidb-operator/pkg/util/discovery" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" @@ -248,7 +249,7 @@ func (m *MonitorManager) syncTidbMonitorStatefulset(tc *v1alpha1.TidbCluster, dc } setNotExist := errors.IsNotFound(err) if setNotExist { - err = member.SetStatefulSetLastAppliedConfigAnnotation(newMonitorSts) + err = mngerutils.SetStatefulSetLastAppliedConfigAnnotation(newMonitorSts) if err != nil { return err } @@ -258,7 +259,7 @@ func (m *MonitorManager) syncTidbMonitorStatefulset(tc *v1alpha1.TidbCluster, dc isAllCreated = false continue } - err = member.UpdateStatefulSet(m.deps.StatefulSetControl, monitor, newMonitorSts, oldMonitorSetTmp) + err = mngerutils.UpdateStatefulSet(m.deps.StatefulSetControl, monitor, newMonitorSts, oldMonitorSetTmp) if err != nil { klog.Errorf("Fail to update statefulset[%s/%s] for tm [%s/%s], err: %v", ns, stsName, ns, name, err) return err From 6763527cadd0e74f9a345c204d4595378381addd Mon Sep 17 00:00:00 2001 From: Shiori Date: Fri, 3 Dec 2021 18:59:18 +0800 Subject: [PATCH 08/28] fix --- .../tidbngmonitoring/ng_monitor_control.go | 2 +- ...or_manager.go => ng_monitoring_manager.go} | 34 ++++++++++++++----- pkg/manager/tidbngmonitoring/start_script.go | 16 +++++++-- pkg/manager/utils/config.go | 8 ++++- pkg/manager/utils/statefulset_builder.go | 5 ++- 5 files changed, 49 insertions(+), 16 deletions(-) rename pkg/manager/tidbngmonitoring/{monitor_manager.go => ng_monitoring_manager.go} (93%) diff --git a/pkg/controller/tidbngmonitoring/ng_monitor_control.go b/pkg/controller/tidbngmonitoring/ng_monitor_control.go index 916bf2716d7..df6ce553bd0 100644 --- a/pkg/controller/tidbngmonitoring/ng_monitor_control.go +++ b/pkg/controller/tidbngmonitoring/ng_monitor_control.go @@ -141,7 +141,7 @@ func (c *defaultTiDBNGMonitoringControl) Update(tngm *v1alpha1.TiDBNGMonitoring) return updateErr }) if err != nil { - klog.Errorf("failed to update TidbMonTiDBNGMonitoringitor: [%s/%s], error: %v", ns, tngm, err) + klog.Errorf("failed to update TidbMonTiDBNGMonitoringitor: [%s/%s], error: %v", ns, name, err) } return update, err } diff --git a/pkg/manager/tidbngmonitoring/monitor_manager.go b/pkg/manager/tidbngmonitoring/ng_monitoring_manager.go similarity index 93% rename from pkg/manager/tidbngmonitoring/monitor_manager.go rename to pkg/manager/tidbngmonitoring/ng_monitoring_manager.go index 5a3245de473..6541b55e832 100644 --- a/pkg/manager/tidbngmonitoring/monitor_manager.go +++ b/pkg/manager/tidbngmonitoring/ng_monitoring_manager.go @@ -21,8 +21,7 @@ import ( "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" "github.com/pingcap/tidb-operator/pkg/controller" "github.com/pingcap/tidb-operator/pkg/manager" - "github.com/pingcap/tidb-operator/pkg/manager/utils" - stsutils "github.com/pingcap/tidb-operator/pkg/manager/utils/statefulset" + mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" "github.com/pingcap/tidb-operator/pkg/util" apps "k8s.io/api/apps/v1" @@ -163,7 +162,7 @@ func (m *ngMonitoringManager) syncCore(tngm *v1alpha1.TiDBNGMonitoring) error { // first creation if stsNotFound { - err = stsutils.SetStatefulSetLastAppliedConfigAnnotation(newSts) + err = mngerutils.SetStatefulSetLastAppliedConfigAnnotation(newSts) if err != nil { return err } @@ -171,7 +170,7 @@ func (m *ngMonitoringManager) syncCore(tngm *v1alpha1.TiDBNGMonitoring) error { } // update existing statefulset if needed - return stsutils.UpdateStatefulSet(m.deps.StatefulSetControl, tngm, oldSts, newSts) + return mngerutils.UpdateStatefulSet(m.deps.StatefulSetControl, tngm, newSts, oldSts) } func (m *ngMonitoringManager) syncConfigMap(tngm *v1alpha1.TiDBNGMonitoring, sts *apps.StatefulSet) (*corev1.ConfigMap, error) { @@ -184,12 +183,12 @@ func (m *ngMonitoringManager) syncConfigMap(tngm *v1alpha1.TiDBNGMonitoring, sts var inUseName string if sts != nil { - inUseName = stsutils.FindConfigMapVolume(&sts.Spec.Template.Spec, func(name string) bool { + inUseName = mngerutils.FindConfigMapVolume(&sts.Spec.Template.Spec, func(name string) bool { return strings.HasPrefix(name, controller.NGMonitoringName(tngm.Name)) }) } - err = utils.UpdateConfigMapIfNeed(m.deps.ConfigMapLister, spec.ConfigUpdateStrategy(), inUseName, newCM) + err = mngerutils.UpdateConfigMapIfNeed(m.deps.ConfigMapLister, spec.ConfigUpdateStrategy(), inUseName, newCM) if err != nil { return nil, err } @@ -221,7 +220,7 @@ func (m *ngMonitoringManager) populateStatus(tngm *v1alpha1.TiDBNGMonitoring, st } func (m *ngMonitoringManager) confirmStatefulSetIsUpgrading(tngm *v1alpha1.TiDBNGMonitoring, oldSts *apps.StatefulSet) (bool, error) { - if stsutils.StatefulSetIsUpgrading(oldSts) { + if mngerutils.StatefulSetIsUpgrading(oldSts) { return true, nil } @@ -370,7 +369,7 @@ func GenerateNGMonitoringStatefulSet(tngm *v1alpha1.TiDBNGMonitoring, cm *corev1 }, } - builder := stsutils.NewStatefulSetBuilder(baseSts) + builder := mngerutils.NewStatefulSetBuilder(baseSts) // features @@ -458,5 +457,22 @@ func GenerateNGMonitoringHeadlessService(tngm *v1alpha1.TiDBNGMonitoring) *corev } func GenerateNGMonitoringStartScript(tngm *v1alpha1.TiDBNGMonitoring) (string, error) { - return "sleep 3600", nil + if len(tngm.Spec.Clusters) < 1 { + return "", fmt.Errorf("tidb cluster ref is empty") + } + + tcRef := tngm.Spec.Clusters[0] + + model := &NGMonitoringStartScriptModel{ + TCName: tcRef.Name, + TCNamespace: tcRef.Namespace, + TCClusterDomain: tcRef.ClusterDomain, + } + + script, err := model.RenderStartScript() + if err != nil { + return "", err + } + + return script, nil } diff --git a/pkg/manager/tidbngmonitoring/start_script.go b/pkg/manager/tidbngmonitoring/start_script.go index d5115c2c8e2..c25207aa3d3 100644 --- a/pkg/manager/tidbngmonitoring/start_script.go +++ b/pkg/manager/tidbngmonitoring/start_script.go @@ -14,6 +14,7 @@ package tidbngmonitoring import ( + "bytes" "fmt" "html/template" @@ -21,8 +22,6 @@ import ( ) type NGMonitoringStartScriptModel struct { - Scheme string - TCName string // name of tidb cluster TCNamespace string // namespace of tidb cluster's namespace TCClusterDomain string // cluster domain of tidb cluster @@ -43,6 +42,10 @@ func (m *NGMonitoringStartScriptModel) PDAddress() string { return fmt.Sprintf("%s.%s:2379", controller.PDMemberName(m.TCName), m.TCNamespace) } +func (m *NGMonitoringStartScriptModel) RenderStartScript() (string, error) { + return renderTemplateFunc(ngMonitoringStartScriptTpl, m) +} + // TODO: Find a better method to start var ngMonitoringStartScriptTpl = template.Must(template.New("ng-monitoring-start-script").Parse(`/ng-monitoring-server \ --pd.endpoints {{ .PDAddress }} \ @@ -50,3 +53,12 @@ var ngMonitoringStartScriptTpl = template.Must(template.New("ng-monitoring-start --config /etc/ng-monitoring/ng-monitoring.toml \ --storage.path /var/lib/ng-monitoring `)) + +func renderTemplateFunc(tpl *template.Template, model interface{}) (string, error) { + buff := new(bytes.Buffer) + err := tpl.Execute(buff, model) + if err != nil { + return "", err + } + return buff.String(), nil +} diff --git a/pkg/manager/utils/config.go b/pkg/manager/utils/config.go index b7c705ccc82..43a5690d994 100644 --- a/pkg/manager/utils/config.go +++ b/pkg/manager/utils/config.go @@ -28,7 +28,13 @@ func updateConfigMap(old, new *corev1.ConfigMap) (bool, error) { dataEqual := true // check config - tomlField := []string{"config-file" /*pd,tikv,tidb */, "pump-config", "config_templ.toml" /*tiflash*/, "proxy_templ.toml" /*tiflash*/} + tomlField := []string{ + "config-file", // pd,tikv,tidb + "pump-config", // pump + "config_templ.toml", // tiflash + "proxy_templ.toml", // tiflash + "ng-monitoring-config", // ng-monitoring + } for _, k := range tomlField { oldData, oldOK := old.Data[k] newData, newOK := new.Data[k] diff --git a/pkg/manager/utils/statefulset_builder.go b/pkg/manager/utils/statefulset_builder.go index 0ffb671e3ca..83adfdbeb01 100644 --- a/pkg/manager/utils/statefulset_builder.go +++ b/pkg/manager/utils/statefulset_builder.go @@ -66,9 +66,8 @@ func (pb *PodTemplateSpecBuilder) Clone() *corev1.PodTemplateSpec { func (pb *PodTemplateSpecBuilder) ContainerBuilder(name string) *ContainerBuilder { for i := range pb.prototype.Spec.Containers { - container := pb.prototype.Spec.Containers[i] - if container.Name == name { - return NewContainerBuilder(&container) + if pb.prototype.Spec.Containers[i].Name == name { + return NewContainerBuilder(&pb.prototype.Spec.Containers[i]) } } return nil From bc060b906d11d0edb496aec67250a3a314e20edb Mon Sep 17 00:00:00 2001 From: Shiori Date: Fri, 3 Dec 2021 19:47:26 +0800 Subject: [PATCH 09/28] update all --- docs/api-references/docs.md | 269 +- manifests/crd.yaml | 4518 +++--- .../crd/v1/pingcap.com_tidbngmonitorings.yaml | 2 - .../pingcap.com_tidbngmonitorings.yaml | 2 - manifests/crd_v1beta1.yaml | 13348 +++++++--------- .../pingcap/v1alpha1/openapi_generated.go | 1 - .../v1alpha1/fake/fake_tidbngmonitoring.go | 12 - .../pingcap/v1alpha1/tidbngmonitoring.go | 17 - pkg/monitor/monitor/monitor_manager.go | 2 +- 9 files changed, 7881 insertions(+), 10290 deletions(-) diff --git a/docs/api-references/docs.md b/docs/api-references/docs.md index 3f8a32ac92b..2c23ba6e367 100644 --- a/docs/api-references/docs.md +++ b/docs/api-references/docs.md @@ -18,8 +18,6 @@ Resource Types:
  • Restore
  • -TiDBNGMonitoring -
  • TidbCluster
  • TidbClusterAutoScaler @@ -1249,148 +1247,6 @@ RestoreStatus -

    TiDBNGMonitoring

    -

    -

    TiDBNGMonitoring contains the spec and status of tidb ng monitor

    -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FieldDescription
    -apiVersion
    -string
    - -pingcap.com/v1alpha1 - -
    -kind
    -string -
    TiDBNGMonitoring
    -metadata
    - - -Kubernetes meta/v1.ObjectMeta - - -
    -Refer to the Kubernetes API documentation for the fields of the -metadata field. -
    -spec
    - - -TiDBNGMonitoringSpec - - -
    -

    Spec contains all spec about tidb ng monitor

    -
    -
    - - - - - - - - - - - - - - - - - - - - - -
    -ComponentSpec
    - - -ComponentSpec - - -
    -

    -(Members of ComponentSpec are embedded into this type.) -

    -

    ComponentSpec is common spec. -NOTE: the same field will be overridden by component’s spec.

    -
    -clusters
    - - -[]TidbClusterRef - - -
    -

    Clusters reference TiDB cluster

    -
    -paused
    - -bool - -
    -

    Paused pause controller if it is true

    -
    -pvReclaimPolicy
    - - -Kubernetes core/v1.PersistentVolumeReclaimPolicy - - -
    -

    Persistent volume reclaim policy applied to the PVs that consumed by TiDB cluster

    -
    -ngMonitoring
    - - -NGMonitoringSpec - - -
    -

    NGMonitoring is spec of ng monitoring

    -
    -
    -status
    - - -TiDBNGMonitoringStatus - - -
    -

    Status is most recently observed status of tidb ng monitor

    -

    TidbCluster

    TidbCluster is the control script’s spec

    @@ -14533,6 +14389,131 @@ string +

    TiDBNGMonitoring

    +

    +

    TiDBNGMonitoring contains the spec and status of tidb ng monitor

    +

    + + + + + + + + + + + + + + + + + + + + + +
    FieldDescription
    +metadata
    + + +Kubernetes meta/v1.ObjectMeta + + +
    +Refer to the Kubernetes API documentation for the fields of the +metadata field. +
    +spec
    + + +TiDBNGMonitoringSpec + + +
    +

    Spec contains all spec about tidb ng monitor

    +
    +
    + + + + + + + + + + + + + + + + + + + + + +
    +ComponentSpec
    + + +ComponentSpec + + +
    +

    +(Members of ComponentSpec are embedded into this type.) +

    +

    ComponentSpec is common spec. +NOTE: the same field will be overridden by component’s spec.

    +
    +clusters
    + + +[]TidbClusterRef + + +
    +

    Clusters reference TiDB cluster

    +
    +paused
    + +bool + +
    +

    Paused pause controller if it is true

    +
    +pvReclaimPolicy
    + + +Kubernetes core/v1.PersistentVolumeReclaimPolicy + + +
    +

    Persistent volume reclaim policy applied to the PVs that consumed by TiDB cluster

    +
    +ngMonitoring
    + + +NGMonitoringSpec + + +
    +

    NGMonitoring is spec of ng monitoring

    +
    +
    +status
    + + +TiDBNGMonitoringStatus + + +
    +

    Status is most recently observed status of tidb ng monitor

    +

    TiDBNGMonitoringSpec

    (Appears on: diff --git a/manifests/crd.yaml b/manifests/crd.yaml index 6758ec3a445..8e330154822 100644 --- a/manifests/crd.yaml +++ b/manifests/crd.yaml @@ -6,35 +6,43 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.6.2 creationTimestamp: null - name: backupschedules.pingcap.com + name: backups.pingcap.com spec: group: pingcap.com names: - kind: BackupSchedule - listKind: BackupScheduleList - plural: backupschedules + kind: Backup + listKind: BackupList + plural: backups shortNames: - - bks - singular: backupschedule + - bk + singular: backup scope: Namespaced versions: - additionalPrinterColumns: - - description: The cron format string used for backup scheduling - jsonPath: .spec.schedule - name: Schedule + - description: The current status of the backup + jsonPath: .status.phase + name: Status type: string - - description: The max number of backups we want to keep - jsonPath: .spec.maxBackups - name: MaxBackups - type: integer - - description: The last backup CR name - jsonPath: .status.lastBackup - name: LastBackup - priority: 1 + - description: The full path of backup data + jsonPath: .status.backupPath + name: BackupPath type: string - - description: The last time the backup was successfully created - jsonPath: .status.lastBackupTime - name: LastBackupTime + - description: The data size of the backup + jsonPath: .status.backupSizeReadable + name: BackupSize + type: string + - description: The commit ts of tidb cluster dump + jsonPath: .status.commitTs + name: CommitTS + type: string + - description: The time at which the backup was started + jsonPath: .status.timeStarted + name: Started + priority: 1 + type: date + - description: The time at which the backup was completed + jsonPath: .status.timeCompleted + name: Completed priority: 1 type: date - jsonPath: .metadata.creationTimestamp @@ -52,150 +60,105 @@ spec: type: object spec: properties: - backupTemplate: + affinity: properties: - affinity: + nodeAffinity: properties: - nodeAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + preference: properties: - preference: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - weight: - format: int32 - type: integer - required: - - preference - - weight + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - properties: - nodeSelectorTerms: - items: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - type: array - required: - - nodeSelectorTerms - type: object - type: object - podAffinity: + weight: + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: properties: - preferredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: items: properties: - podAffinityTerm: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: + matchExpressions: + items: + properties: + key: type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - weight: - format: int32 - type: integer - required: - - podAffinityTerm - - weight + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array type: object type: array - requiredDuringSchedulingIgnoredDuringExecution: - items: + required: + - nodeSelectorTerms + type: object + type: object + podAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: properties: labelSelector: properties: @@ -229,57 +192,57 @@ spec: required: - topologyKey type: object - type: array - type: object - podAntiAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: properties: - podAffinityTerm: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: + matchExpressions: + items: + properties: + key: type: string - type: array - topologyKey: - type: string - required: - - topologyKey + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string type: object - weight: - format: int32 - type: integer - required: - - podAffinityTerm - - weight type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - items: + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + type: object + podAntiAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: properties: labelSelector: properties: @@ -313,1053 +276,1104 @@ spec: required: - topologyKey type: object - type: array - type: object - type: object - backupType: - type: string - br: - properties: - checksum: - type: boolean - cluster: - type: string - clusterNamespace: - type: string - concurrency: - format: int32 - type: integer - db: - type: string - logLevel: - type: string - onLine: - type: boolean - options: - items: - type: string - type: array - rateLimit: - type: integer - sendCredToTikv: - type: boolean - statusAddr: - type: string - table: - type: string - timeAgo: - type: string - required: - - cluster - type: object - cleanOption: - properties: - batchConcurrency: - format: int32 - type: integer - disableBatchConcurrency: - type: boolean - pageSize: - format: int64 - type: integer - routineConcurrency: - format: int32 - type: integer - type: object - cleanPolicy: - type: string - dumpling: - properties: - options: - items: - type: string + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object type: array - tableFilter: + requiredDuringSchedulingIgnoredDuringExecution: items: - type: string - type: array - type: object - env: - items: - properties: - name: - type: string - value: - type: string - valueFrom: properties: - configMapKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - resourceFieldRef: - properties: - containerName: - type: string - divisor: - 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 - resource: - type: string - required: - - resource - type: object - secretKeyRef: + labelSelector: properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object type: object - type: object - required: - - name - type: object - type: array - from: - properties: - host: - type: string - port: - format: int32 - type: integer - secretName: - type: string - tlsClientSecretName: - type: string - user: - type: string - required: - - host - - secretName - type: object - gcs: - properties: - bucket: - type: string - bucketAcl: - type: string - location: - type: string - objectAcl: - type: string - path: - type: string - prefix: - type: string - projectId: - type: string - secretName: - type: string - storageClass: - type: string - required: - - projectId + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array type: object - imagePullSecrets: + type: object + backupType: + type: string + br: + properties: + checksum: + type: boolean + cluster: + type: string + clusterNamespace: + type: string + concurrency: + format: int32 + type: integer + db: + type: string + logLevel: + type: string + onLine: + type: boolean + options: + items: + type: string + type: array + rateLimit: + type: integer + sendCredToTikv: + type: boolean + statusAddr: + type: string + table: + type: string + timeAgo: + type: string + required: + - cluster + type: object + cleanOption: + properties: + batchConcurrency: + format: int32 + type: integer + disableBatchConcurrency: + type: boolean + pageSize: + format: int64 + type: integer + routineConcurrency: + format: int32 + type: integer + type: object + cleanPolicy: + type: string + dumpling: + properties: + options: + items: + type: string + type: array + tableFilter: items: + type: string + type: array + type: object + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: properties: - name: - type: string + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object type: object - type: array - local: + required: + - name + type: object + type: array + from: + properties: + host: + type: string + port: + format: int32 + type: integer + secretName: + type: string + tlsClientSecretName: + type: string + user: + type: string + required: + - host + - secretName + type: object + gcs: + properties: + bucket: + type: string + bucketAcl: + type: string + location: + type: string + objectAcl: + type: string + path: + type: string + prefix: + type: string + projectId: + type: string + secretName: + type: string + storageClass: + type: string + required: + - projectId + type: object + imagePullSecrets: + items: + properties: + name: + type: string + type: object + type: array + local: + properties: + prefix: + type: string + volume: properties: - prefix: - type: string - volume: + awsElasticBlockStore: properties: - awsElasticBlockStore: - properties: - fsType: - type: string - partition: - format: int32 - type: integer - readOnly: - type: boolean - volumeID: - type: string - required: - - volumeID - type: object - azureDisk: + fsType: + type: string + partition: + format: int32 + type: integer + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + azureDisk: + properties: + cachingMode: + type: string + diskName: + type: string + diskURI: + type: string + fsType: + type: string + kind: + type: string + readOnly: + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + properties: + readOnly: + type: boolean + secretName: + type: string + shareName: + type: string + required: + - secretName + - shareName + type: object + cephfs: + properties: + monitors: + items: + type: string + type: array + path: + type: string + readOnly: + type: boolean + secretFile: + type: string + secretRef: properties: - cachingMode: - type: string - diskName: - type: string - diskURI: - type: string - fsType: - type: string - kind: + name: type: string - readOnly: - type: boolean - required: - - diskName - - diskURI type: object - azureFile: + user: + type: string + required: + - monitors + type: object + cinder: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: properties: - readOnly: - type: boolean - secretName: - type: string - shareName: + name: type: string - required: - - secretName - - shareName type: object - cephfs: - properties: - monitors: - items: + volumeID: + type: string + required: + - volumeID + type: object + configMap: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: type: string - type: array - path: - type: string - readOnly: - type: boolean - secretFile: - type: string - secretRef: - properties: - name: - type: string - type: object - user: - type: string - required: - - monitors - type: object - cinder: + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + csi: + properties: + driver: + type: string + fsType: + type: string + nodePublishSecretRef: properties: - fsType: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - volumeID: + name: type: string - required: - - volumeID type: object - configMap: - properties: - defaultMode: - format: int32 - type: integer - items: - items: + readOnly: + type: boolean + volumeAttributes: + additionalProperties: + type: string + type: object + required: + - driver + type: object + downwardAPI: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + fieldRef: properties: - key: + apiVersion: type: string - mode: - format: int32 - type: integer - path: + fieldPath: type: string required: - - key - - path + - fieldPath type: object - type: array - name: - type: string - optional: - type: boolean - type: object - csi: - properties: - driver: - type: string - fsType: - type: string - nodePublishSecretRef: - properties: - name: - type: string - type: object - readOnly: - type: boolean - volumeAttributes: - additionalProperties: + mode: + format: int32 + type: integer + path: type: string - type: object - required: - - driver - type: object - downwardAPI: - properties: - defaultMode: - format: int32 - type: integer - items: - items: + resourceFieldRef: properties: - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - mode: - format: int32 - type: integer - path: + containerName: + type: string + divisor: + 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 + resource: type: string - resourceFieldRef: - properties: - containerName: - type: string - divisor: - 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 - resource: - type: string - required: - - resource - type: object required: - - path + - resource type: object - type: array - type: object - emptyDir: - properties: - medium: - type: string - sizeLimit: - 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: object - ephemeral: + required: + - path + type: object + type: array + type: object + emptyDir: + properties: + medium: + type: string + sizeLimit: + 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: object + ephemeral: + properties: + readOnly: + type: boolean + volumeClaimTemplate: properties: - readOnly: - type: boolean - volumeClaimTemplate: + metadata: + type: object + spec: properties: - metadata: + accessModes: + items: + type: string + type: array + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name type: object - spec: + resources: properties: - accessModes: - items: - type: string - type: array - dataSource: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name + 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 type: object - resources: - 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 - 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 - 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 type: object - selector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: type: string - type: object + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string type: object - storageClassName: - type: string - volumeMode: - type: string - volumeName: - type: string type: object - required: - - spec - type: object - type: object - fc: - properties: - fsType: - type: string - lun: - format: int32 - type: integer - readOnly: - type: boolean - targetWWNs: - items: - type: string - type: array - wwids: - items: - type: string - type: array - type: object - flexVolume: - properties: - driver: - type: string - fsType: - type: string - options: - additionalProperties: - type: string - type: object - readOnly: - type: boolean - secretRef: - properties: - name: + storageClassName: type: string - type: object - required: - - driver - type: object - flocker: - properties: - datasetName: - type: string - datasetUUID: - type: string - type: object - gcePersistentDisk: - properties: - fsType: - type: string - partition: - format: int32 - type: integer - pdName: - type: string - readOnly: - type: boolean - required: - - pdName - type: object - gitRepo: - properties: - directory: - type: string - repository: - type: string - revision: - type: string - required: - - repository - type: object - glusterfs: - properties: - endpoints: - type: string - path: - type: string - readOnly: - type: boolean - required: - - endpoints - - path - type: object - hostPath: - properties: - path: - type: string - type: - type: string - required: - - path - type: object - iscsi: - properties: - chapAuthDiscovery: - type: boolean - chapAuthSession: - type: boolean - fsType: - type: string - initiatorName: - type: string - iqn: - type: string - iscsiInterface: - type: string - lun: - format: int32 - type: integer - portals: - items: - type: string - type: array - readOnly: - type: boolean - secretRef: - properties: - name: + volumeMode: + type: string + volumeName: type: string type: object - targetPortal: - type: string required: - - iqn - - lun - - targetPortal + - spec type: object - name: + type: object + fc: + properties: + fsType: type: string - nfs: - properties: - path: - type: string - readOnly: - type: boolean - server: - type: string - required: - - path - - server - type: object - persistentVolumeClaim: - properties: - claimName: - type: string - readOnly: - type: boolean - required: - - claimName + lun: + format: int32 + type: integer + readOnly: + type: boolean + targetWWNs: + items: + type: string + type: array + wwids: + items: + type: string + type: array + type: object + flexVolume: + properties: + driver: + type: string + fsType: + type: string + options: + additionalProperties: + type: string type: object - photonPersistentDisk: + readOnly: + type: boolean + secretRef: properties: - fsType: - type: string - pdID: + name: type: string - required: - - pdID type: object - portworxVolume: + required: + - driver + type: object + flocker: + properties: + datasetName: + type: string + datasetUUID: + type: string + type: object + gcePersistentDisk: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + pdName: + type: string + readOnly: + type: boolean + required: + - pdName + type: object + gitRepo: + properties: + directory: + type: string + repository: + type: string + revision: + type: string + required: + - repository + type: object + glusterfs: + properties: + endpoints: + type: string + path: + type: string + readOnly: + type: boolean + required: + - endpoints + - path + type: object + hostPath: + properties: + path: + type: string + type: + type: string + required: + - path + type: object + iscsi: + properties: + chapAuthDiscovery: + type: boolean + chapAuthSession: + type: boolean + fsType: + type: string + initiatorName: + type: string + iqn: + type: string + iscsiInterface: + type: string + lun: + format: int32 + type: integer + portals: + items: + type: string + type: array + readOnly: + type: boolean + secretRef: properties: - fsType: - type: string - readOnly: - type: boolean - volumeID: + name: type: string - required: - - volumeID type: object - projected: - properties: - defaultMode: - format: int32 - type: integer - sources: - items: + targetPortal: + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + type: string + nfs: + properties: + path: + type: string + readOnly: + type: boolean + server: + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + properties: + claimName: + type: string + readOnly: + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + properties: + fsType: + type: string + pdID: + type: string + required: + - pdID + type: object + portworxVolume: + properties: + fsType: + type: string + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + projected: + properties: + defaultMode: + format: int32 + type: integer + sources: + items: + properties: + configMap: properties: - configMap: - properties: - items: - items: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + downwardAPI: + properties: + items: + items: + properties: + fieldRef: properties: - key: - type: string - mode: - format: int32 - type: integer - path: + apiVersion: type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - downwardAPI: - properties: - items: - items: - properties: - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - mode: - format: int32 - type: integer - path: + fieldPath: type: string - resourceFieldRef: - properties: - containerName: - type: string - divisor: - 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 - resource: - type: string - required: - - resource - type: object required: - - path + - fieldPath type: object - type: array - type: object - secret: - properties: - items: - items: + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: properties: - key: + containerName: type: string - mode: - format: int32 - type: integer - path: + divisor: + 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 + resource: type: string required: - - key - - path + - resource type: object - type: array - name: - type: string - optional: - type: boolean - type: object - serviceAccountToken: - properties: - audience: - type: string - expirationSeconds: - format: int64 - type: integer - path: - type: string - required: - - path - type: object + required: + - path + type: object + type: array type: object - type: array - required: - - sources - type: object - quobyte: - properties: - group: - type: string - readOnly: - type: boolean - registry: - type: string - tenant: - type: string - user: - type: string - volume: - type: string - required: - - registry - - volume - type: object - rbd: - properties: - fsType: - type: string - image: - type: string - keyring: - type: string - monitors: - items: - type: string - type: array - pool: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - user: - type: string - required: - - image - - monitors - type: object - scaleIO: - properties: - fsType: - type: string - gateway: - type: string - protectionDomain: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - sslEnabled: - type: boolean - storageMode: - type: string - storagePool: - type: string - system: - type: string - volumeName: - type: string - required: - - gateway - - secretRef - - system - type: object - secret: - properties: - defaultMode: - format: int32 - type: integer - items: - items: + secret: properties: - key: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: type: string - mode: - format: int32 + optional: + type: boolean + type: object + serviceAccountToken: + properties: + audience: + type: string + expirationSeconds: + format: int64 type: integer path: type: string required: - - key - path type: object - type: array - optional: - type: boolean - secretName: - type: string - type: object - storageos: - properties: - fsType: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - volumeName: - type: string - volumeNamespace: - type: string - type: object - vsphereVolume: - properties: - fsType: - type: string - storagePolicyID: - type: string - storagePolicyName: - type: string - volumePath: - type: string - required: - - volumePath - type: object + type: object + type: array required: - - name + - sources type: object - volumeMount: + quobyte: properties: - mountPath: - type: string - mountPropagation: - type: string - name: + group: type: string readOnly: type: boolean - subPath: + registry: type: string - subPathExpr: + tenant: + type: string + user: + type: string + volume: type: string required: - - mountPath - - name + - registry + - volume type: object - required: - - volume - - volumeMount - type: object - podSecurityContext: - properties: - fsGroup: - format: int64 - type: integer - fsGroupChangePolicy: - type: string - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: + rbd: properties: - level: + fsType: type: string - role: + image: type: string - type: + keyring: + type: string + monitors: + items: + type: string + type: array + pool: type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object user: type: string + required: + - image + - monitors type: object - seccompProfile: + scaleIO: properties: - localhostProfile: + fsType: type: string - type: + gateway: + type: string + protectionDomain: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + sslEnabled: + type: boolean + storageMode: + type: string + storagePool: + type: string + system: + type: string + volumeName: type: string required: - - type + - gateway + - secretRef + - system type: object - supplementalGroups: - items: - format: int64 - type: integer - type: array - sysctls: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - windowsOptions: + secret: properties: - gmsaCredentialSpec: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + optional: + type: boolean + secretName: type: string - gmsaCredentialSpecName: + type: object + storageos: + properties: + fsType: type: string - runAsUserName: + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + volumeName: + type: string + volumeNamespace: type: string type: object - type: object - priorityClassName: - type: string - resources: - 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 - 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 + vsphereVolume: + properties: + fsType: + type: string + storagePolicyID: + type: string + storagePolicyName: + type: string + volumePath: + type: string + required: + - volumePath type: object + required: + - name type: object - s3: + volumeMount: properties: - acl: - type: string - bucket: - type: string - endpoint: - type: string - options: - items: - type: string - type: array - path: - type: string - prefix: - type: string - provider: + mountPath: type: string - region: + mountPropagation: type: string - secretName: + name: type: string - sse: + readOnly: + type: boolean + subPath: type: string - storageClass: + subPathExpr: type: string required: - - provider + - mountPath + - name type: object - serviceAccount: - type: string - storageClassName: + required: + - volume + - volumeMount + type: object + podSecurityContext: + properties: + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: type: string - storageSize: - type: string - tableFilter: + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + supplementalGroups: items: - type: string + format: int64 + type: integer type: array - tikvGCLifeTime: - type: string - tolerations: + sysctls: items: properties: - effect: - type: string - key: - type: string - operator: + name: type: string - tolerationSeconds: - format: int64 - type: integer value: type: string + required: + - name + - value type: object type: array - toolImage: + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + priorityClassName: + type: string + resources: + 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 + 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 + type: object + type: object + s3: + properties: + acl: type: string - useKMS: - type: boolean + bucket: + type: string + endpoint: + type: string + options: + items: + type: string + type: array + path: + type: string + prefix: + type: string + provider: + type: string + region: + type: string + secretName: + type: string + sse: + type: string + storageClass: + type: string + required: + - provider type: object - imagePullSecrets: + serviceAccount: + type: string + storageClassName: + type: string + storageSize: + type: string + tableFilter: + items: + type: string + type: array + tikvGCLifeTime: + type: string + tolerations: items: properties: - name: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: type: string type: object type: array - maxBackups: - format: int32 - type: integer - maxReservedTime: + toolImage: type: string - pause: + useKMS: type: boolean - schedule: - type: string - storageClassName: - type: string - storageSize: - type: string - required: - - backupTemplate - - schedule type: object status: properties: - allBackupCleanTime: - format: date-time + backupPath: type: string - lastBackup: + backupSize: + format: int64 + type: integer + backupSizeReadable: type: string - lastBackupTime: + commitTs: + type: string + conditions: + items: + properties: + lastTransitionTime: + format: date-time + nullable: true + type: string + message: + type: string + reason: + type: string + status: + type: string + type: + type: string + required: + - status + - type + type: object + nullable: true + type: array + phase: + type: string + timeCompleted: + format: date-time + nullable: true + type: string + timeStarted: format: date-time + nullable: true type: string type: object required: @@ -1383,43 +1397,35 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.6.2 creationTimestamp: null - name: backups.pingcap.com + name: backupschedules.pingcap.com spec: group: pingcap.com names: - kind: Backup - listKind: BackupList - plural: backups + kind: BackupSchedule + listKind: BackupScheduleList + plural: backupschedules shortNames: - - bk - singular: backup + - bks + singular: backupschedule scope: Namespaced versions: - additionalPrinterColumns: - - description: The current status of the backup - jsonPath: .status.phase - name: Status - type: string - - description: The full path of backup data - jsonPath: .status.backupPath - name: BackupPath - type: string - - description: The data size of the backup - jsonPath: .status.backupSizeReadable - name: BackupSize - type: string - - description: The commit ts of tidb cluster dump - jsonPath: .status.commitTs - name: CommitTS + - description: The cron format string used for backup scheduling + jsonPath: .spec.schedule + name: Schedule type: string - - description: The time at which the backup was started - jsonPath: .status.timeStarted - name: Started + - description: The max number of backups we want to keep + jsonPath: .spec.maxBackups + name: MaxBackups + type: integer + - description: The last backup CR name + jsonPath: .status.lastBackup + name: LastBackup priority: 1 - type: date - - description: The time at which the backup was completed - jsonPath: .status.timeCompleted - name: Completed + type: string + - description: The last time the backup was successfully created + jsonPath: .status.lastBackupTime + name: LastBackupTime priority: 1 type: date - jsonPath: .metadata.creationTimestamp @@ -1437,107 +1443,16 @@ spec: type: object spec: properties: - affinity: + backupTemplate: properties: - nodeAffinity: + affinity: properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - preference: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - weight: - format: int32 - type: integer - required: - - preference - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: + nodeAffinity: properties: - nodeSelectorTerms: + preferredDuringSchedulingIgnoredDuringExecution: items: properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - type: array - required: - - nodeSelectorTerms - type: object - type: object - podAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - podAffinityTerm: - properties: - labelSelector: + preference: properties: matchExpressions: items: @@ -1555,71 +1470,123 @@ spec: - operator type: object type: array - matchLabels: - additionalProperties: - type: string - type: object + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string + weight: + format: int32 + type: integer required: - - topologyKey + - preference + - weight type: object - weight: - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - items: - properties: - labelSelector: + type: array + requiredDuringSchedulingIgnoredDuringExecution: + properties: + nodeSelectorTerms: + items: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + type: array + required: + - nodeSelectorTerms + type: object + type: object + podAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: properties: - matchExpressions: - items: - properties: - key: - type: string - operator: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string + type: array + topologyKey: + type: string + required: + - topologyKey type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - type: array - type: object - podAntiAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - podAffinityTerm: + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: properties: labelSelector: properties: @@ -1653,1104 +1620,1137 @@ spec: required: - topologyKey type: object - weight: - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - items: - properties: - labelSelector: + type: array + type: object + podAntiAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: properties: - matchExpressions: - items: - properties: - key: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: type: string - operator: + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string + type: object type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - type: array + type: array + type: object type: object - type: object - backupType: - type: string - br: - properties: - checksum: - type: boolean - cluster: - type: string - clusterNamespace: - type: string - concurrency: - format: int32 - type: integer - db: - type: string - logLevel: - type: string - onLine: - type: boolean - options: - items: - type: string - type: array - rateLimit: - type: integer - sendCredToTikv: - type: boolean - statusAddr: - type: string - table: + backupType: type: string - timeAgo: + br: + properties: + checksum: + type: boolean + cluster: + type: string + clusterNamespace: + type: string + concurrency: + format: int32 + type: integer + db: + type: string + logLevel: + type: string + onLine: + type: boolean + options: + items: + type: string + type: array + rateLimit: + type: integer + sendCredToTikv: + type: boolean + statusAddr: + type: string + table: + type: string + timeAgo: + type: string + required: + - cluster + type: object + cleanOption: + properties: + batchConcurrency: + format: int32 + type: integer + disableBatchConcurrency: + type: boolean + pageSize: + format: int64 + type: integer + routineConcurrency: + format: int32 + type: integer + type: object + cleanPolicy: type: string - required: - - cluster - type: object - cleanOption: - properties: - batchConcurrency: - format: int32 - type: integer - disableBatchConcurrency: - type: boolean - pageSize: - format: int64 - type: integer - routineConcurrency: - format: int32 - type: integer - type: object - cleanPolicy: - type: string - dumpling: - properties: - options: - items: - type: string - type: array - tableFilter: + dumpling: + properties: + options: + items: + type: string + type: array + tableFilter: + items: + type: string + type: array + type: object + env: items: - type: string - type: array - type: object - env: - items: - properties: - name: - type: string - value: - type: string - valueFrom: properties: - configMapKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - resourceFieldRef: - properties: - containerName: - type: string - divisor: - 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 - resource: - type: string - required: - - resource - type: object - secretKeyRef: + name: + type: string + value: + type: string + valueFrom: properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object type: object + required: + - name type: object - required: - - name - type: object - type: array - from: - properties: - host: - type: string - port: - format: int32 - type: integer - secretName: - type: string - tlsClientSecretName: - type: string - user: - type: string - required: - - host - - secretName - type: object - gcs: - properties: - bucket: - type: string - bucketAcl: - type: string - location: - type: string - objectAcl: - type: string - path: - type: string - prefix: - type: string - projectId: - type: string - secretName: - type: string - storageClass: - type: string - required: - - projectId - type: object - imagePullSecrets: - items: - properties: - name: - type: string - type: object - type: array - local: - properties: - prefix: - type: string - volume: + type: array + from: properties: - awsElasticBlockStore: - properties: - fsType: - type: string - partition: - format: int32 - type: integer - readOnly: - type: boolean - volumeID: - type: string - required: - - volumeID - type: object - azureDisk: - properties: - cachingMode: - type: string - diskName: - type: string - diskURI: - type: string - fsType: - type: string - kind: - type: string - readOnly: - type: boolean - required: - - diskName - - diskURI - type: object - azureFile: - properties: - readOnly: - type: boolean - secretName: - type: string - shareName: - type: string - required: - - secretName - - shareName - type: object - cephfs: + host: + type: string + port: + format: int32 + type: integer + secretName: + type: string + tlsClientSecretName: + type: string + user: + type: string + required: + - host + - secretName + type: object + gcs: + properties: + bucket: + type: string + bucketAcl: + type: string + location: + type: string + objectAcl: + type: string + path: + type: string + prefix: + type: string + projectId: + type: string + secretName: + type: string + storageClass: + type: string + required: + - projectId + type: object + imagePullSecrets: + items: + properties: + name: + type: string + type: object + type: array + local: + properties: + prefix: + type: string + volume: properties: - monitors: - items: - type: string - type: array - path: - type: string - readOnly: - type: boolean - secretFile: - type: string - secretRef: + awsElasticBlockStore: properties: - name: + fsType: type: string + partition: + format: int32 + type: integer + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID type: object - user: - type: string - required: - - monitors - type: object - cinder: - properties: - fsType: - type: string - readOnly: - type: boolean - secretRef: + azureDisk: properties: - name: + cachingMode: + type: string + diskName: type: string + diskURI: + type: string + fsType: + type: string + kind: + type: string + readOnly: + type: boolean + required: + - diskName + - diskURI type: object - volumeID: - type: string - required: - - volumeID - type: object - configMap: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - csi: - properties: - driver: - type: string - fsType: - type: string - nodePublishSecretRef: + azureFile: properties: - name: + readOnly: + type: boolean + secretName: type: string + shareName: + type: string + required: + - secretName + - shareName type: object - readOnly: - type: boolean - volumeAttributes: - additionalProperties: - type: string + cephfs: + properties: + monitors: + items: + type: string + type: array + path: + type: string + readOnly: + type: boolean + secretFile: + type: string + secretRef: + properties: + name: + type: string + type: object + user: + type: string + required: + - monitors type: object - required: - - driver - type: object - downwardAPI: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - fieldRef: + cinder: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + volumeID: + type: string + required: + - volumeID + type: object + configMap: + properties: + defaultMode: + format: int32 + type: integer + items: + items: properties: - apiVersion: + key: type: string - fieldPath: + mode: + format: int32 + type: integer + path: type: string required: - - fieldPath + - key + - path type: object - mode: - format: int32 - type: integer - path: + type: array + name: + type: string + optional: + type: boolean + type: object + csi: + properties: + driver: + type: string + fsType: + type: string + nodePublishSecretRef: + properties: + name: + type: string + type: object + readOnly: + type: boolean + volumeAttributes: + additionalProperties: type: string - resourceFieldRef: + type: object + required: + - driver + type: object + downwardAPI: + properties: + defaultMode: + format: int32 + type: integer + items: + items: properties: - containerName: - type: string - divisor: - 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 - resource: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + mode: + format: int32 + type: integer + path: type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object required: - - resource + - path type: object - required: - - path - type: object - type: array - type: object - emptyDir: - properties: - medium: - type: string - sizeLimit: - 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: object - ephemeral: - properties: - readOnly: - type: boolean - volumeClaimTemplate: + type: array + type: object + emptyDir: + properties: + medium: + type: string + sizeLimit: + 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: object + ephemeral: + properties: + readOnly: + type: boolean + volumeClaimTemplate: + properties: + metadata: + type: object + spec: + properties: + accessModes: + items: + type: string + type: array + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + resources: + 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 + 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 + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + storageClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object + required: + - spec + type: object + type: object + fc: + properties: + fsType: + type: string + lun: + format: int32 + type: integer + readOnly: + type: boolean + targetWWNs: + items: + type: string + type: array + wwids: + items: + type: string + type: array + type: object + flexVolume: + properties: + driver: + type: string + fsType: + type: string + options: + additionalProperties: + type: string + type: object + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + required: + - driver + type: object + flocker: + properties: + datasetName: + type: string + datasetUUID: + type: string + type: object + gcePersistentDisk: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + pdName: + type: string + readOnly: + type: boolean + required: + - pdName + type: object + gitRepo: + properties: + directory: + type: string + repository: + type: string + revision: + type: string + required: + - repository + type: object + glusterfs: + properties: + endpoints: + type: string + path: + type: string + readOnly: + type: boolean + required: + - endpoints + - path + type: object + hostPath: properties: - metadata: - type: object - spec: + path: + type: string + type: + type: string + required: + - path + type: object + iscsi: + properties: + chapAuthDiscovery: + type: boolean + chapAuthSession: + type: boolean + fsType: + type: string + initiatorName: + type: string + iqn: + type: string + iscsiInterface: + type: string + lun: + format: int32 + type: integer + portals: + items: + type: string + type: array + readOnly: + type: boolean + secretRef: properties: - accessModes: - items: - type: string - type: array - dataSource: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - resources: - 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 - 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 - type: object - type: object - selector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - storageClassName: - type: string - volumeMode: - type: string - volumeName: + name: type: string type: object + targetPortal: + type: string required: - - spec + - iqn + - lun + - targetPortal type: object - type: object - fc: - properties: - fsType: - type: string - lun: - format: int32 - type: integer - readOnly: - type: boolean - targetWWNs: - items: - type: string - type: array - wwids: - items: - type: string - type: array - type: object - flexVolume: - properties: - driver: - type: string - fsType: + name: type: string - options: - additionalProperties: - type: string + nfs: + properties: + path: + type: string + readOnly: + type: boolean + server: + type: string + required: + - path + - server type: object - readOnly: - type: boolean - secretRef: + persistentVolumeClaim: properties: - name: + claimName: type: string + readOnly: + type: boolean + required: + - claimName type: object - required: - - driver - type: object - flocker: - properties: - datasetName: - type: string - datasetUUID: - type: string - type: object - gcePersistentDisk: - properties: - fsType: - type: string - partition: - format: int32 - type: integer - pdName: - type: string - readOnly: - type: boolean - required: - - pdName - type: object - gitRepo: - properties: - directory: - type: string - repository: - type: string - revision: - type: string - required: - - repository - type: object - glusterfs: - properties: - endpoints: - type: string - path: - type: string - readOnly: - type: boolean - required: - - endpoints - - path - type: object - hostPath: - properties: - path: - type: string - type: - type: string - required: - - path - type: object - iscsi: - properties: - chapAuthDiscovery: - type: boolean - chapAuthSession: - type: boolean - fsType: - type: string - initiatorName: - type: string - iqn: - type: string - iscsiInterface: - type: string - lun: - format: int32 - type: integer - portals: - items: - type: string - type: array - readOnly: - type: boolean - secretRef: + photonPersistentDisk: properties: - name: + fsType: + type: string + pdID: type: string + required: + - pdID type: object - targetPortal: - type: string - required: - - iqn - - lun - - targetPortal - type: object - name: - type: string - nfs: - properties: - path: - type: string - readOnly: - type: boolean - server: - type: string - required: - - path - - server - type: object - persistentVolumeClaim: - properties: - claimName: - type: string - readOnly: - type: boolean - required: - - claimName - type: object - photonPersistentDisk: - properties: - fsType: - type: string - pdID: - type: string - required: - - pdID - type: object - portworxVolume: - properties: - fsType: - type: string - readOnly: - type: boolean - volumeID: - type: string - required: - - volumeID - type: object - projected: - properties: - defaultMode: - format: int32 - type: integer - sources: - items: - properties: - configMap: - properties: - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - downwardAPI: + portworxVolume: + properties: + fsType: + type: string + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + projected: + properties: + defaultMode: + format: int32 + type: integer + sources: + items: properties: - items: - items: - properties: - fieldRef: + configMap: + properties: + items: + items: properties: - apiVersion: + key: type: string - fieldPath: + mode: + format: int32 + type: integer + path: type: string required: - - fieldPath + - key + - path type: object - mode: - format: int32 - type: integer - path: - type: string - resourceFieldRef: + type: array + name: + type: string + optional: + type: boolean + type: object + downwardAPI: + properties: + items: + items: properties: - containerName: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + mode: + format: int32 + type: integer + path: type: string - divisor: - 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 - resource: + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + secret: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: type: string required: - - resource + - key + - path type: object - required: - - path - type: object - type: array - type: object - secret: - properties: - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean + type: array + name: + type: string + optional: + type: boolean + type: object + serviceAccountToken: + properties: + audience: + type: string + expirationSeconds: + format: int64 + type: integer + path: + type: string + required: + - path + type: object type: object - serviceAccountToken: + type: array + required: + - sources + type: object + quobyte: + properties: + group: + type: string + readOnly: + type: boolean + registry: + type: string + tenant: + type: string + user: + type: string + volume: + type: string + required: + - registry + - volume + type: object + rbd: + properties: + fsType: + type: string + image: + type: string + keyring: + type: string + monitors: + items: + type: string + type: array + pool: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + user: + type: string + required: + - image + - monitors + type: object + scaleIO: + properties: + fsType: + type: string + gateway: + type: string + protectionDomain: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + sslEnabled: + type: boolean + storageMode: + type: string + storagePool: + type: string + system: + type: string + volumeName: + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + properties: + defaultMode: + format: int32 + type: integer + items: + items: properties: - audience: + key: type: string - expirationSeconds: - format: int64 + mode: + format: int32 type: integer path: type: string required: + - key - path type: object - type: object - type: array + type: array + optional: + type: boolean + secretName: + type: string + type: object + storageos: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + volumeName: + type: string + volumeNamespace: + type: string + type: object + vsphereVolume: + properties: + fsType: + type: string + storagePolicyID: + type: string + storagePolicyName: + type: string + volumePath: + type: string + required: + - volumePath + type: object required: - - sources + - name type: object - quobyte: + volumeMount: properties: - group: + mountPath: type: string - readOnly: - type: boolean - registry: + mountPropagation: type: string - tenant: + name: type: string - user: + readOnly: + type: boolean + subPath: type: string - volume: + subPathExpr: type: string required: - - registry - - volume + - mountPath + - name type: object - rbd: + required: + - volume + - volumeMount + type: object + podSecurityContext: + properties: + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: properties: - fsType: - type: string - image: + level: type: string - keyring: + role: type: string - monitors: - items: - type: string - type: array - pool: + type: type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object user: type: string - required: - - image - - monitors type: object - scaleIO: + seccompProfile: properties: - fsType: - type: string - gateway: - type: string - protectionDomain: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - sslEnabled: - type: boolean - storageMode: - type: string - storagePool: - type: string - system: + localhostProfile: type: string - volumeName: + type: type: string required: - - gateway - - secretRef - - system - type: object - secret: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - optional: - type: boolean - secretName: - type: string + - type type: object - storageos: + supplementalGroups: + items: + format: int64 + type: integer + type: array + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + windowsOptions: properties: - fsType: + gmsaCredentialSpec: type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - volumeName: + gmsaCredentialSpecName: type: string - volumeNamespace: + runAsUserName: type: string type: object - vsphereVolume: - properties: - fsType: - type: string - storagePolicyID: - type: string - storagePolicyName: - type: string - volumePath: - type: string - required: - - volumePath + type: object + priorityClassName: + type: string + resources: + 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 + 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 type: object - required: - - name type: object - volumeMount: + s3: properties: - mountPath: - type: string - mountPropagation: + acl: type: string - name: + bucket: type: string - readOnly: - type: boolean - subPath: + endpoint: type: string - subPathExpr: + options: + items: + type: string + type: array + path: type: string - required: - - mountPath - - name - type: object - required: - - volume - - volumeMount - type: object - podSecurityContext: - properties: - fsGroup: - format: int64 - type: integer - fsGroupChangePolicy: - type: string - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: + prefix: type: string - role: + provider: type: string - type: + region: type: string - user: + secretName: type: string - type: object - seccompProfile: - properties: - localhostProfile: + sse: type: string - type: + storageClass: type: string required: - - type + - provider type: object - supplementalGroups: + serviceAccount: + type: string + storageClassName: + type: string + storageSize: + type: string + tableFilter: items: - format: int64 - type: integer + type: string type: array - sysctls: + tikvGCLifeTime: + type: string + tolerations: items: properties: - name: + effect: + type: string + key: + type: string + operator: type: string + tolerationSeconds: + format: int64 + type: integer value: type: string - required: - - name - - value type: object type: array - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - runAsUserName: - type: string - type: object - type: object - priorityClassName: - type: string - resources: - 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 - 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 - type: object - type: object - s3: - properties: - acl: - type: string - bucket: - type: string - endpoint: - type: string - options: - items: - type: string - type: array - path: - type: string - prefix: - type: string - provider: - type: string - region: - type: string - secretName: - type: string - sse: - type: string - storageClass: + toolImage: type: string - required: - - provider + useKMS: + type: boolean type: object - serviceAccount: - type: string - storageClassName: - type: string - storageSize: - type: string - tableFilter: - items: - type: string - type: array - tikvGCLifeTime: - type: string - tolerations: + imagePullSecrets: items: properties: - effect: - type: string - key: - type: string - operator: - type: string - tolerationSeconds: - format: int64 - type: integer - value: + name: type: string type: object type: array - toolImage: + maxBackups: + format: int32 + type: integer + maxReservedTime: type: string - useKMS: + pause: type: boolean - type: object - status: - properties: - backupPath: - type: string - backupSize: - format: int64 - type: integer - backupSizeReadable: + schedule: type: string - commitTs: + storageClassName: type: string - conditions: - items: - properties: - lastTransitionTime: - format: date-time - nullable: true - type: string - message: - type: string - reason: - type: string - status: - type: string - type: - type: string - required: - - status - - type - type: object - nullable: true - type: array - phase: + storageSize: type: string - timeCompleted: + required: + - backupTemplate + - schedule + type: object + status: + properties: + allBackupCleanTime: format: date-time - nullable: true type: string - timeStarted: + lastBackup: + type: string + lastBackupTime: format: date-time - nullable: true type: string type: object required: @@ -36356,8 +36356,6 @@ spec: x-kubernetes-list-type: map version: type: string - required: - - baseImage type: object nodeSelector: additionalProperties: diff --git a/manifests/crd/v1/pingcap.com_tidbngmonitorings.yaml b/manifests/crd/v1/pingcap.com_tidbngmonitorings.yaml index 96cb9f1830f..e9f48c3c252 100644 --- a/manifests/crd/v1/pingcap.com_tidbngmonitorings.yaml +++ b/manifests/crd/v1/pingcap.com_tidbngmonitorings.yaml @@ -4451,8 +4451,6 @@ spec: x-kubernetes-list-type: map version: type: string - required: - - baseImage type: object nodeSelector: additionalProperties: diff --git a/manifests/crd/v1beta1/pingcap.com_tidbngmonitorings.yaml b/manifests/crd/v1beta1/pingcap.com_tidbngmonitorings.yaml index 04a9343f7dd..91dc864a3c8 100644 --- a/manifests/crd/v1beta1/pingcap.com_tidbngmonitorings.yaml +++ b/manifests/crd/v1beta1/pingcap.com_tidbngmonitorings.yaml @@ -4445,8 +4445,6 @@ spec: x-kubernetes-list-type: map version: type: string - required: - - baseImage type: object nodeSelector: additionalProperties: diff --git a/manifests/crd_v1beta1.yaml b/manifests/crd_v1beta1.yaml index bf0bb4b3d70..2f13f01f2e3 100644 --- a/manifests/crd_v1beta1.yaml +++ b/manifests/crd_v1beta1.yaml @@ -6,25 +6,33 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.6.2 creationTimestamp: null - name: backupschedules.pingcap.com + name: backups.pingcap.com spec: additionalPrinterColumns: - - JSONPath: .spec.schedule - description: The cron format string used for backup scheduling - name: Schedule + - JSONPath: .status.phase + description: The current status of the backup + name: Status type: string - - JSONPath: .spec.maxBackups - description: The max number of backups we want to keep - name: MaxBackups - type: integer - - JSONPath: .status.lastBackup - description: The last backup CR name - name: LastBackup - priority: 1 + - JSONPath: .status.backupPath + description: The full path of backup data + name: BackupPath type: string - - JSONPath: .status.lastBackupTime - description: The last time the backup was successfully created - name: LastBackupTime + - JSONPath: .status.backupSizeReadable + description: The data size of the backup + name: BackupSize + type: string + - JSONPath: .status.commitTs + description: The commit ts of tidb cluster dump + name: CommitTS + type: string + - JSONPath: .status.timeStarted + description: The time at which the backup was started + name: Started + priority: 1 + type: date + - JSONPath: .status.timeCompleted + description: The time at which the backup was completed + name: Completed priority: 1 type: date - JSONPath: .metadata.creationTimestamp @@ -32,12 +40,12 @@ spec: type: date group: pingcap.com names: - kind: BackupSchedule - listKind: BackupScheduleList - plural: backupschedules + kind: Backup + listKind: BackupList + plural: backups shortNames: - - bks - singular: backupschedule + - bk + singular: backup preserveUnknownFields: false scope: Namespaced subresources: {} @@ -52,150 +60,105 @@ spec: type: object spec: properties: - backupTemplate: + affinity: properties: - affinity: + nodeAffinity: properties: - nodeAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + preference: properties: - preference: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - weight: - format: int32 - type: integer - required: - - preference - - weight + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - properties: - nodeSelectorTerms: - items: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - type: array - required: - - nodeSelectorTerms - type: object - type: object - podAffinity: + weight: + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: properties: - preferredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: items: properties: - podAffinityTerm: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: + matchExpressions: + items: + properties: + key: type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - weight: - format: int32 - type: integer - required: - - podAffinityTerm - - weight + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array type: object type: array - requiredDuringSchedulingIgnoredDuringExecution: - items: + required: + - nodeSelectorTerms + type: object + type: object + podAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: properties: labelSelector: properties: @@ -229,57 +192,57 @@ spec: required: - topologyKey type: object - type: array - type: object - podAntiAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: properties: - podAffinityTerm: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: + matchExpressions: + items: + properties: + key: type: string - type: array - topologyKey: - type: string - required: - - topologyKey + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string type: object - weight: - format: int32 - type: integer - required: - - podAffinityTerm - - weight type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - items: + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + type: object + podAntiAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: properties: labelSelector: properties: @@ -313,1053 +276,1104 @@ spec: required: - topologyKey type: object - type: array - type: object - type: object - backupType: - type: string - br: - properties: - checksum: - type: boolean - cluster: - type: string - clusterNamespace: - type: string - concurrency: - format: int32 - type: integer - db: - type: string - logLevel: - type: string - onLine: - type: boolean - options: - items: - type: string - type: array - rateLimit: - type: integer - sendCredToTikv: - type: boolean - statusAddr: - type: string - table: - type: string - timeAgo: - type: string - required: - - cluster - type: object - cleanOption: - properties: - batchConcurrency: - format: int32 - type: integer - disableBatchConcurrency: - type: boolean - pageSize: - format: int64 - type: integer - routineConcurrency: - format: int32 - type: integer - type: object - cleanPolicy: - type: string - dumpling: - properties: - options: - items: - type: string + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object type: array - tableFilter: + requiredDuringSchedulingIgnoredDuringExecution: items: - type: string - type: array - type: object - env: - items: - properties: - name: - type: string - value: - type: string - valueFrom: properties: - configMapKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - resourceFieldRef: - properties: - containerName: - type: string - divisor: - 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 - resource: - type: string - required: - - resource - type: object - secretKeyRef: + labelSelector: properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object type: object - type: object - required: - - name - type: object - type: array - from: - properties: - host: - type: string - port: - format: int32 - type: integer - secretName: - type: string - tlsClientSecretName: - type: string - user: - type: string - required: - - host - - secretName - type: object - gcs: - properties: - bucket: - type: string - bucketAcl: - type: string - location: - type: string - objectAcl: - type: string - path: - type: string - prefix: - type: string - projectId: - type: string - secretName: - type: string - storageClass: - type: string - required: - - projectId + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array type: object - imagePullSecrets: + type: object + backupType: + type: string + br: + properties: + checksum: + type: boolean + cluster: + type: string + clusterNamespace: + type: string + concurrency: + format: int32 + type: integer + db: + type: string + logLevel: + type: string + onLine: + type: boolean + options: + items: + type: string + type: array + rateLimit: + type: integer + sendCredToTikv: + type: boolean + statusAddr: + type: string + table: + type: string + timeAgo: + type: string + required: + - cluster + type: object + cleanOption: + properties: + batchConcurrency: + format: int32 + type: integer + disableBatchConcurrency: + type: boolean + pageSize: + format: int64 + type: integer + routineConcurrency: + format: int32 + type: integer + type: object + cleanPolicy: + type: string + dumpling: + properties: + options: + items: + type: string + type: array + tableFilter: items: + type: string + type: array + type: object + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: properties: - name: - type: string + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object type: object - type: array - local: + required: + - name + type: object + type: array + from: + properties: + host: + type: string + port: + format: int32 + type: integer + secretName: + type: string + tlsClientSecretName: + type: string + user: + type: string + required: + - host + - secretName + type: object + gcs: + properties: + bucket: + type: string + bucketAcl: + type: string + location: + type: string + objectAcl: + type: string + path: + type: string + prefix: + type: string + projectId: + type: string + secretName: + type: string + storageClass: + type: string + required: + - projectId + type: object + imagePullSecrets: + items: + properties: + name: + type: string + type: object + type: array + local: + properties: + prefix: + type: string + volume: properties: - prefix: - type: string - volume: + awsElasticBlockStore: properties: - awsElasticBlockStore: - properties: - fsType: - type: string - partition: - format: int32 - type: integer - readOnly: - type: boolean - volumeID: - type: string - required: - - volumeID - type: object - azureDisk: + fsType: + type: string + partition: + format: int32 + type: integer + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + azureDisk: + properties: + cachingMode: + type: string + diskName: + type: string + diskURI: + type: string + fsType: + type: string + kind: + type: string + readOnly: + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + properties: + readOnly: + type: boolean + secretName: + type: string + shareName: + type: string + required: + - secretName + - shareName + type: object + cephfs: + properties: + monitors: + items: + type: string + type: array + path: + type: string + readOnly: + type: boolean + secretFile: + type: string + secretRef: properties: - cachingMode: - type: string - diskName: - type: string - diskURI: - type: string - fsType: - type: string - kind: + name: type: string - readOnly: - type: boolean - required: - - diskName - - diskURI type: object - azureFile: + user: + type: string + required: + - monitors + type: object + cinder: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: properties: - readOnly: - type: boolean - secretName: - type: string - shareName: + name: type: string - required: - - secretName - - shareName type: object - cephfs: - properties: - monitors: - items: + volumeID: + type: string + required: + - volumeID + type: object + configMap: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: type: string - type: array - path: - type: string - readOnly: - type: boolean - secretFile: - type: string - secretRef: - properties: - name: - type: string - type: object - user: - type: string - required: - - monitors - type: object - cinder: + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + csi: + properties: + driver: + type: string + fsType: + type: string + nodePublishSecretRef: properties: - fsType: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - volumeID: + name: type: string - required: - - volumeID type: object - configMap: - properties: - defaultMode: - format: int32 - type: integer - items: - items: + readOnly: + type: boolean + volumeAttributes: + additionalProperties: + type: string + type: object + required: + - driver + type: object + downwardAPI: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + fieldRef: properties: - key: + apiVersion: type: string - mode: - format: int32 - type: integer - path: + fieldPath: type: string required: - - key - - path + - fieldPath type: object - type: array - name: - type: string - optional: - type: boolean - type: object - csi: - properties: - driver: - type: string - fsType: - type: string - nodePublishSecretRef: - properties: - name: - type: string - type: object - readOnly: - type: boolean - volumeAttributes: - additionalProperties: + mode: + format: int32 + type: integer + path: type: string - type: object - required: - - driver - type: object - downwardAPI: - properties: - defaultMode: - format: int32 - type: integer - items: - items: + resourceFieldRef: properties: - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - mode: - format: int32 - type: integer - path: + containerName: + type: string + divisor: + 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 + resource: type: string - resourceFieldRef: - properties: - containerName: - type: string - divisor: - 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 - resource: - type: string - required: - - resource - type: object required: - - path + - resource type: object - type: array - type: object - emptyDir: - properties: - medium: - type: string - sizeLimit: - 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: object - ephemeral: + required: + - path + type: object + type: array + type: object + emptyDir: + properties: + medium: + type: string + sizeLimit: + 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: object + ephemeral: + properties: + readOnly: + type: boolean + volumeClaimTemplate: properties: - readOnly: - type: boolean - volumeClaimTemplate: + metadata: + type: object + spec: properties: - metadata: + accessModes: + items: + type: string + type: array + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name type: object - spec: + resources: properties: - accessModes: - items: - type: string - type: array - dataSource: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name + 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 type: object - resources: - 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 - 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 - 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 type: object - selector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: type: string - type: object + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string type: object - storageClassName: - type: string - volumeMode: - type: string - volumeName: - type: string type: object - required: - - spec - type: object - type: object - fc: - properties: - fsType: - type: string - lun: - format: int32 - type: integer - readOnly: - type: boolean - targetWWNs: - items: - type: string - type: array - wwids: - items: - type: string - type: array - type: object - flexVolume: - properties: - driver: - type: string - fsType: - type: string - options: - additionalProperties: - type: string - type: object - readOnly: - type: boolean - secretRef: - properties: - name: + storageClassName: type: string - type: object - required: - - driver - type: object - flocker: - properties: - datasetName: - type: string - datasetUUID: - type: string - type: object - gcePersistentDisk: - properties: - fsType: - type: string - partition: - format: int32 - type: integer - pdName: - type: string - readOnly: - type: boolean - required: - - pdName - type: object - gitRepo: - properties: - directory: - type: string - repository: - type: string - revision: - type: string - required: - - repository - type: object - glusterfs: - properties: - endpoints: - type: string - path: - type: string - readOnly: - type: boolean - required: - - endpoints - - path - type: object - hostPath: - properties: - path: - type: string - type: - type: string - required: - - path - type: object - iscsi: - properties: - chapAuthDiscovery: - type: boolean - chapAuthSession: - type: boolean - fsType: - type: string - initiatorName: - type: string - iqn: - type: string - iscsiInterface: - type: string - lun: - format: int32 - type: integer - portals: - items: - type: string - type: array - readOnly: - type: boolean - secretRef: - properties: - name: + volumeMode: + type: string + volumeName: type: string type: object - targetPortal: - type: string required: - - iqn - - lun - - targetPortal + - spec type: object - name: + type: object + fc: + properties: + fsType: type: string - nfs: - properties: - path: - type: string - readOnly: - type: boolean - server: - type: string - required: - - path - - server - type: object - persistentVolumeClaim: - properties: - claimName: - type: string - readOnly: - type: boolean - required: - - claimName + lun: + format: int32 + type: integer + readOnly: + type: boolean + targetWWNs: + items: + type: string + type: array + wwids: + items: + type: string + type: array + type: object + flexVolume: + properties: + driver: + type: string + fsType: + type: string + options: + additionalProperties: + type: string type: object - photonPersistentDisk: + readOnly: + type: boolean + secretRef: properties: - fsType: - type: string - pdID: + name: type: string - required: - - pdID type: object - portworxVolume: + required: + - driver + type: object + flocker: + properties: + datasetName: + type: string + datasetUUID: + type: string + type: object + gcePersistentDisk: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + pdName: + type: string + readOnly: + type: boolean + required: + - pdName + type: object + gitRepo: + properties: + directory: + type: string + repository: + type: string + revision: + type: string + required: + - repository + type: object + glusterfs: + properties: + endpoints: + type: string + path: + type: string + readOnly: + type: boolean + required: + - endpoints + - path + type: object + hostPath: + properties: + path: + type: string + type: + type: string + required: + - path + type: object + iscsi: + properties: + chapAuthDiscovery: + type: boolean + chapAuthSession: + type: boolean + fsType: + type: string + initiatorName: + type: string + iqn: + type: string + iscsiInterface: + type: string + lun: + format: int32 + type: integer + portals: + items: + type: string + type: array + readOnly: + type: boolean + secretRef: properties: - fsType: - type: string - readOnly: - type: boolean - volumeID: + name: type: string - required: - - volumeID type: object - projected: - properties: - defaultMode: - format: int32 - type: integer - sources: - items: + targetPortal: + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + type: string + nfs: + properties: + path: + type: string + readOnly: + type: boolean + server: + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + properties: + claimName: + type: string + readOnly: + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + properties: + fsType: + type: string + pdID: + type: string + required: + - pdID + type: object + portworxVolume: + properties: + fsType: + type: string + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + projected: + properties: + defaultMode: + format: int32 + type: integer + sources: + items: + properties: + configMap: properties: - configMap: - properties: - items: - items: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + downwardAPI: + properties: + items: + items: + properties: + fieldRef: properties: - key: - type: string - mode: - format: int32 - type: integer - path: + apiVersion: type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - downwardAPI: - properties: - items: - items: - properties: - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - mode: - format: int32 - type: integer - path: + fieldPath: type: string - resourceFieldRef: - properties: - containerName: - type: string - divisor: - 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 - resource: - type: string - required: - - resource - type: object required: - - path + - fieldPath type: object - type: array - type: object - secret: - properties: - items: - items: + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: properties: - key: + containerName: type: string - mode: - format: int32 - type: integer - path: + divisor: + 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 + resource: type: string required: - - key - - path + - resource type: object - type: array - name: - type: string - optional: - type: boolean - type: object - serviceAccountToken: - properties: - audience: - type: string - expirationSeconds: - format: int64 - type: integer - path: - type: string - required: - - path - type: object + required: + - path + type: object + type: array type: object - type: array - required: - - sources - type: object - quobyte: - properties: - group: - type: string - readOnly: - type: boolean - registry: - type: string - tenant: - type: string - user: - type: string - volume: - type: string - required: - - registry - - volume - type: object - rbd: - properties: - fsType: - type: string - image: - type: string - keyring: - type: string - monitors: - items: - type: string - type: array - pool: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - user: - type: string - required: - - image - - monitors - type: object - scaleIO: - properties: - fsType: - type: string - gateway: - type: string - protectionDomain: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - sslEnabled: - type: boolean - storageMode: - type: string - storagePool: - type: string - system: - type: string - volumeName: - type: string - required: - - gateway - - secretRef - - system - type: object - secret: - properties: - defaultMode: - format: int32 - type: integer - items: - items: + secret: properties: - key: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: type: string - mode: - format: int32 + optional: + type: boolean + type: object + serviceAccountToken: + properties: + audience: + type: string + expirationSeconds: + format: int64 type: integer path: type: string required: - - key - path type: object - type: array - optional: - type: boolean - secretName: - type: string - type: object - storageos: - properties: - fsType: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - volumeName: - type: string - volumeNamespace: - type: string - type: object - vsphereVolume: - properties: - fsType: - type: string - storagePolicyID: - type: string - storagePolicyName: - type: string - volumePath: - type: string - required: - - volumePath - type: object + type: object + type: array required: - - name + - sources type: object - volumeMount: + quobyte: properties: - mountPath: - type: string - mountPropagation: - type: string - name: + group: type: string readOnly: type: boolean - subPath: + registry: type: string - subPathExpr: + tenant: + type: string + user: + type: string + volume: type: string required: - - mountPath - - name + - registry + - volume type: object - required: - - volume - - volumeMount - type: object - podSecurityContext: - properties: - fsGroup: - format: int64 - type: integer - fsGroupChangePolicy: - type: string - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: + rbd: properties: - level: + fsType: type: string - role: + image: type: string - type: + keyring: + type: string + monitors: + items: + type: string + type: array + pool: type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object user: type: string + required: + - image + - monitors type: object - seccompProfile: + scaleIO: properties: - localhostProfile: + fsType: type: string - type: + gateway: + type: string + protectionDomain: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + sslEnabled: + type: boolean + storageMode: + type: string + storagePool: + type: string + system: + type: string + volumeName: type: string required: - - type + - gateway + - secretRef + - system type: object - supplementalGroups: - items: - format: int64 - type: integer - type: array - sysctls: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - windowsOptions: + secret: properties: - gmsaCredentialSpec: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + optional: + type: boolean + secretName: type: string - gmsaCredentialSpecName: + type: object + storageos: + properties: + fsType: type: string - runAsUserName: + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + volumeName: + type: string + volumeNamespace: type: string type: object - type: object - priorityClassName: - type: string - resources: - 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 - 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 + vsphereVolume: + properties: + fsType: + type: string + storagePolicyID: + type: string + storagePolicyName: + type: string + volumePath: + type: string + required: + - volumePath type: object + required: + - name type: object - s3: + volumeMount: properties: - acl: - type: string - bucket: - type: string - endpoint: - type: string - options: - items: - type: string - type: array - path: - type: string - prefix: - type: string - provider: + mountPath: type: string - region: + mountPropagation: type: string - secretName: + name: type: string - sse: + readOnly: + type: boolean + subPath: type: string - storageClass: + subPathExpr: type: string required: - - provider + - mountPath + - name type: object - serviceAccount: - type: string - storageClassName: + required: + - volume + - volumeMount + type: object + podSecurityContext: + properties: + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: type: string - storageSize: - type: string - tableFilter: + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + supplementalGroups: items: - type: string + format: int64 + type: integer type: array - tikvGCLifeTime: - type: string - tolerations: + sysctls: items: properties: - effect: - type: string - key: - type: string - operator: + name: type: string - tolerationSeconds: - format: int64 - type: integer value: type: string + required: + - name + - value type: object type: array - toolImage: + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + priorityClassName: + type: string + resources: + 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 + 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 + type: object + type: object + s3: + properties: + acl: type: string - useKMS: - type: boolean + bucket: + type: string + endpoint: + type: string + options: + items: + type: string + type: array + path: + type: string + prefix: + type: string + provider: + type: string + region: + type: string + secretName: + type: string + sse: + type: string + storageClass: + type: string + required: + - provider type: object - imagePullSecrets: + serviceAccount: + type: string + storageClassName: + type: string + storageSize: + type: string + tableFilter: + items: + type: string + type: array + tikvGCLifeTime: + type: string + tolerations: items: properties: - name: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: type: string type: object type: array - maxBackups: - format: int32 - type: integer - maxReservedTime: + toolImage: type: string - pause: + useKMS: type: boolean - schedule: - type: string - storageClassName: - type: string - storageSize: - type: string - required: - - backupTemplate - - schedule type: object status: properties: - allBackupCleanTime: - format: date-time + backupPath: type: string - lastBackup: + backupSize: + format: int64 + type: integer + backupSizeReadable: type: string - lastBackupTime: + commitTs: + type: string + conditions: + items: + properties: + lastTransitionTime: + format: date-time + nullable: true + type: string + message: + type: string + reason: + type: string + status: + type: string + type: + type: string + required: + - status + - type + type: object + nullable: true + type: array + phase: + type: string + timeCompleted: + format: date-time + nullable: true + type: string + timeStarted: format: date-time + nullable: true type: string type: object required: @@ -1385,33 +1399,25 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.6.2 creationTimestamp: null - name: backups.pingcap.com + name: backupschedules.pingcap.com spec: additionalPrinterColumns: - - JSONPath: .status.phase - description: The current status of the backup - name: Status - type: string - - JSONPath: .status.backupPath - description: The full path of backup data - name: BackupPath - type: string - - JSONPath: .status.backupSizeReadable - description: The data size of the backup - name: BackupSize - type: string - - JSONPath: .status.commitTs - description: The commit ts of tidb cluster dump - name: CommitTS + - JSONPath: .spec.schedule + description: The cron format string used for backup scheduling + name: Schedule type: string - - JSONPath: .status.timeStarted - description: The time at which the backup was started - name: Started + - JSONPath: .spec.maxBackups + description: The max number of backups we want to keep + name: MaxBackups + type: integer + - JSONPath: .status.lastBackup + description: The last backup CR name + name: LastBackup priority: 1 - type: date - - JSONPath: .status.timeCompleted - description: The time at which the backup was completed - name: Completed + type: string + - JSONPath: .status.lastBackupTime + description: The last time the backup was successfully created + name: LastBackupTime priority: 1 type: date - JSONPath: .metadata.creationTimestamp @@ -1419,12 +1425,12 @@ spec: type: date group: pingcap.com names: - kind: Backup - listKind: BackupList - plural: backups + kind: BackupSchedule + listKind: BackupScheduleList + plural: backupschedules shortNames: - - bk - singular: backup + - bks + singular: backupschedule preserveUnknownFields: false scope: Namespaced subresources: {} @@ -1439,107 +1445,16 @@ spec: type: object spec: properties: - affinity: + backupTemplate: properties: - nodeAffinity: + affinity: properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - preference: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - weight: - format: int32 - type: integer - required: - - preference - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: + nodeAffinity: properties: - nodeSelectorTerms: + preferredDuringSchedulingIgnoredDuringExecution: items: properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - type: array - required: - - nodeSelectorTerms - type: object - type: object - podAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - podAffinityTerm: - properties: - labelSelector: + preference: properties: matchExpressions: items: @@ -1557,71 +1472,123 @@ spec: - operator type: object type: array - matchLabels: - additionalProperties: - type: string - type: object + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string + weight: + format: int32 + type: integer required: - - topologyKey + - preference + - weight type: object - weight: - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - items: - properties: - labelSelector: + type: array + requiredDuringSchedulingIgnoredDuringExecution: + properties: + nodeSelectorTerms: + items: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + type: array + required: + - nodeSelectorTerms + type: object + type: object + podAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: properties: - matchExpressions: - items: - properties: - key: - type: string - operator: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string + type: array + topologyKey: + type: string + required: + - topologyKey type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - type: array - type: object - podAntiAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - podAffinityTerm: + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: properties: labelSelector: properties: @@ -1655,1104 +1622,1137 @@ spec: required: - topologyKey type: object - weight: - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - items: - properties: - labelSelector: + type: array + type: object + podAntiAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: properties: - matchExpressions: - items: - properties: - key: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: type: string - operator: + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string + type: object type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - type: array + type: array + type: object type: object - type: object - backupType: - type: string - br: - properties: - checksum: - type: boolean - cluster: - type: string - clusterNamespace: - type: string - concurrency: - format: int32 - type: integer - db: - type: string - logLevel: - type: string - onLine: - type: boolean - options: - items: - type: string - type: array - rateLimit: - type: integer - sendCredToTikv: - type: boolean - statusAddr: - type: string - table: + backupType: type: string - timeAgo: + br: + properties: + checksum: + type: boolean + cluster: + type: string + clusterNamespace: + type: string + concurrency: + format: int32 + type: integer + db: + type: string + logLevel: + type: string + onLine: + type: boolean + options: + items: + type: string + type: array + rateLimit: + type: integer + sendCredToTikv: + type: boolean + statusAddr: + type: string + table: + type: string + timeAgo: + type: string + required: + - cluster + type: object + cleanOption: + properties: + batchConcurrency: + format: int32 + type: integer + disableBatchConcurrency: + type: boolean + pageSize: + format: int64 + type: integer + routineConcurrency: + format: int32 + type: integer + type: object + cleanPolicy: type: string - required: - - cluster - type: object - cleanOption: - properties: - batchConcurrency: - format: int32 - type: integer - disableBatchConcurrency: - type: boolean - pageSize: - format: int64 - type: integer - routineConcurrency: - format: int32 - type: integer - type: object - cleanPolicy: - type: string - dumpling: - properties: - options: - items: - type: string - type: array - tableFilter: + dumpling: + properties: + options: + items: + type: string + type: array + tableFilter: + items: + type: string + type: array + type: object + env: items: - type: string - type: array - type: object - env: - items: - properties: - name: - type: string - value: - type: string - valueFrom: properties: - configMapKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - resourceFieldRef: - properties: - containerName: - type: string - divisor: - 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 - resource: - type: string - required: - - resource - type: object - secretKeyRef: + name: + type: string + value: + type: string + valueFrom: properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - type: object - required: - - name - type: object - type: array - from: - properties: - host: - type: string - port: - format: int32 - type: integer - secretName: - type: string - tlsClientSecretName: - type: string - user: - type: string - required: - - host - - secretName - type: object - gcs: - properties: - bucket: - type: string - bucketAcl: - type: string - location: - type: string - objectAcl: - type: string - path: - type: string - prefix: - type: string - projectId: - type: string - secretName: - type: string - storageClass: - type: string - required: - - projectId - type: object - imagePullSecrets: - items: - properties: - name: - type: string - type: object - type: array - local: - properties: - prefix: - type: string - volume: - properties: - awsElasticBlockStore: - properties: - fsType: - type: string - partition: - format: int32 - type: integer - readOnly: - type: boolean - volumeID: - type: string - required: - - volumeID - type: object - azureDisk: - properties: - cachingMode: - type: string - diskName: - type: string - diskURI: - type: string - fsType: - type: string - kind: - type: string - readOnly: - type: boolean - required: - - diskName - - diskURI - type: object - azureFile: - properties: - readOnly: - type: boolean - secretName: - type: string - shareName: - type: string - required: - - secretName - - shareName - type: object - cephfs: - properties: - monitors: - items: - type: string - type: array - path: - type: string - readOnly: - type: boolean - secretFile: - type: string - secretRef: - properties: - name: - type: string - type: object - user: - type: string - required: - - monitors - type: object - cinder: - properties: - fsType: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - volumeID: - type: string - required: - - volumeID - type: object - configMap: - properties: - defaultMode: - format: int32 - type: integer - items: - items: + configMapKeyRef: properties: key: type: string - mode: - format: int32 - type: integer - path: + name: type: string + optional: + type: boolean required: - key - - path type: object - type: array - name: - type: string - optional: - type: boolean - type: object - csi: - properties: - driver: - type: string - fsType: - type: string - nodePublishSecretRef: - properties: - name: - type: string - type: object - readOnly: - type: boolean - volumeAttributes: - additionalProperties: - type: string - type: object - required: - - driver - type: object - downwardAPI: - properties: - defaultMode: - format: int32 - type: integer - items: - items: + fieldRef: properties: - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - mode: - format: int32 - type: integer - path: + apiVersion: + type: string + fieldPath: type: string - resourceFieldRef: - properties: - containerName: - type: string - divisor: - 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 - resource: - type: string - required: - - resource - type: object required: - - path + - fieldPath type: object - type: array - type: object - emptyDir: - properties: - medium: - type: string - sizeLimit: - 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: object - ephemeral: + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + from: + properties: + host: + type: string + port: + format: int32 + type: integer + secretName: + type: string + tlsClientSecretName: + type: string + user: + type: string + required: + - host + - secretName + type: object + gcs: + properties: + bucket: + type: string + bucketAcl: + type: string + location: + type: string + objectAcl: + type: string + path: + type: string + prefix: + type: string + projectId: + type: string + secretName: + type: string + storageClass: + type: string + required: + - projectId + type: object + imagePullSecrets: + items: + properties: + name: + type: string + type: object + type: array + local: + properties: + prefix: + type: string + volume: properties: - readOnly: - type: boolean - volumeClaimTemplate: + awsElasticBlockStore: properties: - metadata: + fsType: + type: string + partition: + format: int32 + type: integer + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + azureDisk: + properties: + cachingMode: + type: string + diskName: + type: string + diskURI: + type: string + fsType: + type: string + kind: + type: string + readOnly: + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + properties: + readOnly: + type: boolean + secretName: + type: string + shareName: + type: string + required: + - secretName + - shareName + type: object + cephfs: + properties: + monitors: + items: + type: string + type: array + path: + type: string + readOnly: + type: boolean + secretFile: + type: string + secretRef: + properties: + name: + type: string type: object - spec: + user: + type: string + required: + - monitors + type: object + cinder: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: properties: - accessModes: - items: + name: + type: string + type: object + volumeID: + type: string + required: + - volumeID + type: object + configMap: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: type: string - type: array - dataSource: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - resources: - 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 - type: object - requests: - additionalProperties: + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + csi: + properties: + driver: + type: string + fsType: + type: string + nodePublishSecretRef: + properties: + name: + type: string + type: object + readOnly: + type: boolean + volumeAttributes: + additionalProperties: + type: string + type: object + required: + - driver + type: object + downwardAPI: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: 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: object + resource: + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + emptyDir: + properties: + medium: + type: string + sizeLimit: + 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: object + ephemeral: + properties: + readOnly: + type: boolean + volumeClaimTemplate: + properties: + metadata: type: object - selector: + spec: properties: - matchExpressions: + accessModes: items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: type: string + type: array + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + resources: + 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 + 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 + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object type: object + storageClassName: + type: string + volumeMode: + type: string + volumeName: + type: string type: object - storageClassName: - type: string - volumeMode: - type: string - volumeName: + required: + - spec + type: object + type: object + fc: + properties: + fsType: + type: string + lun: + format: int32 + type: integer + readOnly: + type: boolean + targetWWNs: + items: + type: string + type: array + wwids: + items: + type: string + type: array + type: object + flexVolume: + properties: + driver: + type: string + fsType: + type: string + options: + additionalProperties: + type: string + type: object + readOnly: + type: boolean + secretRef: + properties: + name: type: string type: object required: - - spec + - driver type: object - type: object - fc: - properties: - fsType: - type: string - lun: - format: int32 - type: integer - readOnly: - type: boolean - targetWWNs: - items: - type: string - type: array - wwids: - items: - type: string - type: array - type: object - flexVolume: - properties: - driver: - type: string - fsType: - type: string - options: - additionalProperties: - type: string + flocker: + properties: + datasetName: + type: string + datasetUUID: + type: string type: object - readOnly: - type: boolean - secretRef: + gcePersistentDisk: properties: - name: + fsType: + type: string + partition: + format: int32 + type: integer + pdName: type: string + readOnly: + type: boolean + required: + - pdName type: object - required: - - driver - type: object - flocker: - properties: - datasetName: - type: string - datasetUUID: - type: string - type: object - gcePersistentDisk: - properties: - fsType: - type: string - partition: - format: int32 - type: integer - pdName: - type: string - readOnly: - type: boolean - required: - - pdName - type: object - gitRepo: - properties: - directory: - type: string - repository: - type: string - revision: + gitRepo: + properties: + directory: + type: string + repository: + type: string + revision: + type: string + required: + - repository + type: object + glusterfs: + properties: + endpoints: + type: string + path: + type: string + readOnly: + type: boolean + required: + - endpoints + - path + type: object + hostPath: + properties: + path: + type: string + type: + type: string + required: + - path + type: object + iscsi: + properties: + chapAuthDiscovery: + type: boolean + chapAuthSession: + type: boolean + fsType: + type: string + initiatorName: + type: string + iqn: + type: string + iscsiInterface: + type: string + lun: + format: int32 + type: integer + portals: + items: + type: string + type: array + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + targetPortal: + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: type: string + nfs: + properties: + path: + type: string + readOnly: + type: boolean + server: + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + properties: + claimName: + type: string + readOnly: + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + properties: + fsType: + type: string + pdID: + type: string + required: + - pdID + type: object + portworxVolume: + properties: + fsType: + type: string + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + projected: + properties: + defaultMode: + format: int32 + type: integer + sources: + items: + properties: + configMap: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + downwardAPI: + properties: + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + secret: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + serviceAccountToken: + properties: + audience: + type: string + expirationSeconds: + format: int64 + type: integer + path: + type: string + required: + - path + type: object + type: object + type: array + required: + - sources + type: object + quobyte: + properties: + group: + type: string + readOnly: + type: boolean + registry: + type: string + tenant: + type: string + user: + type: string + volume: + type: string + required: + - registry + - volume + type: object + rbd: + properties: + fsType: + type: string + image: + type: string + keyring: + type: string + monitors: + items: + type: string + type: array + pool: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + user: + type: string + required: + - image + - monitors + type: object + scaleIO: + properties: + fsType: + type: string + gateway: + type: string + protectionDomain: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + sslEnabled: + type: boolean + storageMode: + type: string + storagePool: + type: string + system: + type: string + volumeName: + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + optional: + type: boolean + secretName: + type: string + type: object + storageos: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + volumeName: + type: string + volumeNamespace: + type: string + type: object + vsphereVolume: + properties: + fsType: + type: string + storagePolicyID: + type: string + storagePolicyName: + type: string + volumePath: + type: string + required: + - volumePath + type: object required: - - repository + - name type: object - glusterfs: + volumeMount: properties: - endpoints: + mountPath: type: string - path: + mountPropagation: + type: string + name: type: string readOnly: type: boolean - required: - - endpoints - - path - type: object - hostPath: - properties: - path: + subPath: type: string - type: + subPathExpr: type: string required: - - path + - mountPath + - name type: object - iscsi: + required: + - volume + - volumeMount + type: object + podSecurityContext: + properties: + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: properties: - chapAuthDiscovery: - type: boolean - chapAuthSession: - type: boolean - fsType: - type: string - initiatorName: + level: type: string - iqn: + role: type: string - iscsiInterface: + type: type: string - lun: - format: int32 - type: integer - portals: - items: - type: string - type: array - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - targetPortal: + user: type: string - required: - - iqn - - lun - - targetPortal type: object - name: - type: string - nfs: + seccompProfile: properties: - path: + localhostProfile: type: string - readOnly: - type: boolean - server: + type: type: string required: - - path - - server + - type type: object - persistentVolumeClaim: + supplementalGroups: + items: + format: int64 + type: integer + type: array + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + windowsOptions: properties: - claimName: + gmsaCredentialSpec: type: string - readOnly: - type: boolean - required: - - claimName - type: object - photonPersistentDisk: - properties: - fsType: + gmsaCredentialSpecName: type: string - pdID: + runAsUserName: type: string - required: - - pdID type: object - portworxVolume: - properties: - fsType: - type: string - readOnly: - type: boolean - volumeID: - type: string - required: - - volumeID + type: object + priorityClassName: + type: string + resources: + 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 type: object - projected: - properties: - defaultMode: - format: int32 - type: integer - sources: - items: - properties: - configMap: - properties: - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - downwardAPI: - properties: - items: - items: - properties: - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - mode: - format: int32 - type: integer - path: - type: string - resourceFieldRef: - properties: - containerName: - type: string - divisor: - 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 - resource: - type: string - required: - - resource - type: object - required: - - path - type: object - type: array - type: object - secret: - properties: - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - serviceAccountToken: - properties: - audience: - type: string - expirationSeconds: - format: int64 - type: integer - path: - type: string - required: - - path - type: object - type: object - type: array - required: - - sources - type: object - quobyte: - properties: - group: - type: string - readOnly: - type: boolean - registry: - type: string - tenant: - type: string - user: - type: string - volume: - type: string - required: - - registry - - volume - type: object - rbd: - properties: - fsType: - type: string - image: - type: string - keyring: - type: string - monitors: - items: - type: string - type: array - pool: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - user: - type: string - required: - - image - - monitors - type: object - scaleIO: - properties: - fsType: - type: string - gateway: - type: string - protectionDomain: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - sslEnabled: - type: boolean - storageMode: - type: string - storagePool: - type: string - system: - type: string - volumeName: - type: string - required: - - gateway - - secretRef - - system - type: object - secret: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - optional: - type: boolean - secretName: - type: string - type: object - storageos: - properties: - fsType: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - volumeName: - type: string - volumeNamespace: - type: string - type: object - vsphereVolume: - properties: - fsType: - type: string - storagePolicyID: - type: string - storagePolicyName: - type: string - volumePath: - type: string - required: - - volumePath + 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 type: object - required: - - name type: object - volumeMount: + s3: properties: - mountPath: - type: string - mountPropagation: + acl: type: string - name: + bucket: type: string - readOnly: - type: boolean - subPath: + endpoint: type: string - subPathExpr: + options: + items: + type: string + type: array + path: type: string - required: - - mountPath - - name - type: object - required: - - volume - - volumeMount - type: object - podSecurityContext: - properties: - fsGroup: - format: int64 - type: integer - fsGroupChangePolicy: - type: string - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: + prefix: type: string - role: + provider: type: string - type: + region: type: string - user: + secretName: type: string - type: object - seccompProfile: - properties: - localhostProfile: + sse: type: string - type: + storageClass: type: string required: - - type + - provider type: object - supplementalGroups: + serviceAccount: + type: string + storageClassName: + type: string + storageSize: + type: string + tableFilter: items: - format: int64 - type: integer + type: string type: array - sysctls: + tikvGCLifeTime: + type: string + tolerations: items: properties: - name: + effect: + type: string + key: type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer value: type: string - required: - - name - - value type: object type: array - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - runAsUserName: - type: string - type: object - type: object - priorityClassName: - type: string - resources: - 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 - 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 - type: object - type: object - s3: - properties: - acl: - type: string - bucket: - type: string - endpoint: - type: string - options: - items: - type: string - type: array - path: - type: string - prefix: - type: string - provider: - type: string - region: - type: string - secretName: - type: string - sse: - type: string - storageClass: + toolImage: type: string - required: - - provider + useKMS: + type: boolean type: object - serviceAccount: - type: string - storageClassName: - type: string - storageSize: - type: string - tableFilter: - items: - type: string - type: array - tikvGCLifeTime: - type: string - tolerations: + imagePullSecrets: items: properties: - effect: - type: string - key: - type: string - operator: - type: string - tolerationSeconds: - format: int64 - type: integer - value: + name: type: string type: object type: array - toolImage: + maxBackups: + format: int32 + type: integer + maxReservedTime: type: string - useKMS: + pause: type: boolean - type: object - status: - properties: - backupPath: - type: string - backupSize: - format: int64 - type: integer - backupSizeReadable: + schedule: type: string - commitTs: + storageClassName: type: string - conditions: - items: - properties: - lastTransitionTime: - format: date-time - nullable: true - type: string - message: - type: string - reason: - type: string - status: - type: string - type: - type: string - required: - - status - - type - type: object - nullable: true - type: array - phase: + storageSize: type: string - timeCompleted: + required: + - backupTemplate + - schedule + type: object + status: + properties: + allBackupCleanTime: format: date-time - nullable: true type: string - timeStarted: + lastBackup: + type: string + lastBackupTime: format: date-time - nullable: true type: string type: object required: @@ -31917,2345 +31917,100 @@ spec: properties: args: items: - type: string - type: array - command: - items: - type: string - type: array - env: - items: - properties: - name: - type: string - value: - type: string - valueFrom: - properties: - configMapKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - resourceFieldRef: - properties: - containerName: - type: string - divisor: - 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 - resource: - type: string - required: - - resource - type: object - secretKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - type: object - required: - - name - type: object - type: array - envFrom: - items: - properties: - configMapRef: - properties: - name: - type: string - optional: - type: boolean - type: object - prefix: - type: string - secretRef: - properties: - name: - type: string - optional: - type: boolean - type: object - type: object - type: array - image: - type: string - imagePullPolicy: - type: string - lifecycle: - properties: - postStart: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - preStop: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - type: object - livenessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - timeoutSeconds: - format: int32 - type: integer - type: object - name: - type: string - ports: - items: - properties: - containerPort: - format: int32 - type: integer - hostIP: - type: string - hostPort: - format: int32 - type: integer - name: - type: string - protocol: - type: string - required: - - containerPort - type: object - type: array - x-kubernetes-list-map-keys: - - containerPort - - protocol - x-kubernetes-list-type: map - readinessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - timeoutSeconds: - format: int32 - type: integer - type: object - resources: - 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 - 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 - type: object - type: object - securityContext: - properties: - allowPrivilegeEscalation: - type: boolean - capabilities: - properties: - add: - items: - type: string - type: array - drop: - items: - type: string - type: array - type: object - privileged: - type: boolean - procMount: - type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - runAsUserName: - type: string - type: object - type: object - startupProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - timeoutSeconds: - format: int32 - type: integer - type: object - stdin: - type: boolean - stdinOnce: - type: boolean - terminationMessagePath: - type: string - terminationMessagePolicy: - type: string - tty: - type: boolean - volumeDevices: - items: - properties: - devicePath: - type: string - name: - type: string - required: - - devicePath - - name - type: object - type: array - volumeMounts: - items: - properties: - mountPath: - type: string - mountPropagation: - type: string - name: - type: string - readOnly: - type: boolean - subPath: - type: string - subPathExpr: - type: string - required: - - mountPath - - name - type: object - type: array - workingDir: - type: string - required: - - name - type: object - type: array - additionalVolumeMounts: - items: - properties: - mountPath: - type: string - mountPropagation: - type: string - name: - type: string - readOnly: - type: boolean - subPath: - type: string - subPathExpr: - type: string - required: - - mountPath - - name - type: object - type: array - additionalVolumes: - items: - properties: - awsElasticBlockStore: - properties: - fsType: - type: string - partition: - format: int32 - type: integer - readOnly: - type: boolean - volumeID: - type: string - required: - - volumeID - type: object - azureDisk: - properties: - cachingMode: - type: string - diskName: - type: string - diskURI: - type: string - fsType: - type: string - kind: - type: string - readOnly: - type: boolean - required: - - diskName - - diskURI - type: object - azureFile: - properties: - readOnly: - type: boolean - secretName: - type: string - shareName: - type: string - required: - - secretName - - shareName - type: object - cephfs: - properties: - monitors: - items: - type: string - type: array - path: - type: string - readOnly: - type: boolean - secretFile: - type: string - secretRef: - properties: - name: - type: string - type: object - user: - type: string - required: - - monitors - type: object - cinder: - properties: - fsType: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - volumeID: - type: string - required: - - volumeID - type: object - configMap: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - csi: - properties: - driver: - type: string - fsType: - type: string - nodePublishSecretRef: - properties: - name: - type: string - type: object - readOnly: - type: boolean - volumeAttributes: - additionalProperties: - type: string - type: object - required: - - driver - type: object - downwardAPI: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - mode: - format: int32 - type: integer - path: - type: string - resourceFieldRef: - properties: - containerName: - type: string - divisor: - 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 - resource: - type: string - required: - - resource - type: object - required: - - path - type: object - type: array - type: object - emptyDir: - properties: - medium: - type: string - sizeLimit: - 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: object - ephemeral: - properties: - readOnly: - type: boolean - volumeClaimTemplate: - properties: - metadata: - type: object - spec: - properties: - accessModes: - items: - type: string - type: array - dataSource: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - resources: - 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 - 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 - type: object - type: object - selector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - storageClassName: - type: string - volumeMode: - type: string - volumeName: - type: string - type: object - required: - - spec - type: object - type: object - fc: - properties: - fsType: - type: string - lun: - format: int32 - type: integer - readOnly: - type: boolean - targetWWNs: - items: - type: string - type: array - wwids: - items: - type: string - type: array - type: object - flexVolume: - properties: - driver: - type: string - fsType: - type: string - options: - additionalProperties: - type: string - type: object - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - required: - - driver - type: object - flocker: - properties: - datasetName: - type: string - datasetUUID: - type: string - type: object - gcePersistentDisk: - properties: - fsType: - type: string - partition: - format: int32 - type: integer - pdName: - type: string - readOnly: - type: boolean - required: - - pdName - type: object - gitRepo: - properties: - directory: - type: string - repository: - type: string - revision: - type: string - required: - - repository - type: object - glusterfs: - properties: - endpoints: - type: string - path: - type: string - readOnly: - type: boolean - required: - - endpoints - - path - type: object - hostPath: - properties: - path: - type: string - type: - type: string - required: - - path - type: object - iscsi: - properties: - chapAuthDiscovery: - type: boolean - chapAuthSession: - type: boolean - fsType: - type: string - initiatorName: - type: string - iqn: - type: string - iscsiInterface: - type: string - lun: - format: int32 - type: integer - portals: - items: - type: string - type: array - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - targetPortal: - type: string - required: - - iqn - - lun - - targetPortal - type: object - name: - type: string - nfs: - properties: - path: - type: string - readOnly: - type: boolean - server: - type: string - required: - - path - - server - type: object - persistentVolumeClaim: - properties: - claimName: - type: string - readOnly: - type: boolean - required: - - claimName - type: object - photonPersistentDisk: - properties: - fsType: - type: string - pdID: - type: string - required: - - pdID - type: object - portworxVolume: - properties: - fsType: - type: string - readOnly: - type: boolean - volumeID: - type: string - required: - - volumeID - type: object - projected: - properties: - defaultMode: - format: int32 - type: integer - sources: - items: - properties: - configMap: - properties: - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - downwardAPI: - properties: - items: - items: - properties: - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - mode: - format: int32 - type: integer - path: - type: string - resourceFieldRef: - properties: - containerName: - type: string - divisor: - 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 - resource: - type: string - required: - - resource - type: object - required: - - path - type: object - type: array - type: object - secret: - properties: - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - serviceAccountToken: - properties: - audience: - type: string - expirationSeconds: - format: int64 - type: integer - path: - type: string - required: - - path - type: object - type: object - type: array - required: - - sources - type: object - quobyte: - properties: - group: - type: string - readOnly: - type: boolean - registry: - type: string - tenant: - type: string - user: - type: string - volume: - type: string - required: - - registry - - volume - type: object - rbd: - properties: - fsType: - type: string - image: - type: string - keyring: - type: string - monitors: - items: - type: string - type: array - pool: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - user: - type: string - required: - - image - - monitors - type: object - scaleIO: - properties: - fsType: - type: string - gateway: - type: string - protectionDomain: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - sslEnabled: - type: boolean - storageMode: - type: string - storagePool: - type: string - system: - type: string - volumeName: - type: string - required: - - gateway - - secretRef - - system - type: object - secret: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - optional: - type: boolean - secretName: - type: string - type: object - storageos: - properties: - fsType: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - volumeName: - type: string - volumeNamespace: - type: string - type: object - vsphereVolume: - properties: - fsType: - type: string - storagePolicyID: - type: string - storagePolicyName: - type: string - volumePath: - type: string - required: - - volumePath - type: object - required: - - name - type: object - type: array - affinity: - properties: - nodeAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - preference: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - weight: - format: int32 - type: integer - required: - - preference - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - properties: - nodeSelectorTerms: - items: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - type: array - required: - - nodeSelectorTerms - type: object - type: object - podAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - podAffinityTerm: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - weight: - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - items: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - type: array - type: object - podAntiAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - podAffinityTerm: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - weight: - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - items: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - type: array - type: object - type: object - annotations: - additionalProperties: - type: string - type: object - clusters: - items: - properties: - clusterDomain: - type: string - name: - type: string - namespace: - type: string - required: - - name - type: object - maxItems: 1 - minItems: 1 - type: array - configUpdateStrategy: - type: string - env: - items: - properties: - name: - type: string - value: - type: string - valueFrom: - properties: - configMapKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - resourceFieldRef: - properties: - containerName: - type: string - divisor: - 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 - resource: - type: string - required: - - resource - type: object - secretKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - type: object - required: - - name - type: object - type: array - hostNetwork: - type: boolean - image: - type: string - imagePullPolicy: - type: string - imagePullSecrets: - items: - properties: - name: - type: string - type: object - type: array - initContainers: - items: - properties: - args: - items: - type: string - type: array - command: - items: - type: string - type: array - env: - items: - properties: - name: - type: string - value: - type: string - valueFrom: - properties: - configMapKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - resourceFieldRef: - properties: - containerName: - type: string - divisor: - 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 - resource: - type: string - required: - - resource - type: object - secretKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - type: object - required: - - name - type: object - type: array - envFrom: - items: - properties: - configMapRef: - properties: - name: - type: string - optional: - type: boolean - type: object - prefix: - type: string - secretRef: - properties: - name: - type: string - optional: - type: boolean - type: object - type: object - type: array - image: - type: string - imagePullPolicy: - type: string - lifecycle: - properties: - postStart: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - preStop: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - type: object - livenessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - timeoutSeconds: - format: int32 - type: integer - type: object - name: - type: string - ports: - items: - properties: - containerPort: - format: int32 - type: integer - hostIP: - type: string - hostPort: - format: int32 - type: integer - name: - type: string - protocol: - type: string - required: - - containerPort - type: object - type: array - x-kubernetes-list-map-keys: - - containerPort - - protocol - x-kubernetes-list-type: map - readinessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - timeoutSeconds: - format: int32 - type: integer - type: object - resources: - 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 - 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 - type: object - type: object - securityContext: - properties: - allowPrivilegeEscalation: - type: boolean - capabilities: - properties: - add: - items: - type: string - type: array - drop: - items: - type: string - type: array - type: object - privileged: - type: boolean - procMount: - type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - runAsUserName: - type: string - type: object - type: object - startupProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - timeoutSeconds: - format: int32 - type: integer - type: object - stdin: - type: boolean - stdinOnce: - type: boolean - terminationMessagePath: - type: string - terminationMessagePolicy: - type: string - tty: - type: boolean - volumeDevices: - items: - properties: - devicePath: - type: string - name: - type: string - required: - - devicePath - - name - type: object - type: array - volumeMounts: - items: - properties: - mountPath: - type: string - mountPropagation: - type: string - name: - type: string - readOnly: - type: boolean - subPath: - type: string - subPathExpr: - type: string - required: - - mountPath - - name - type: object + type: string type: array - workingDir: - type: string - required: - - name - type: object - type: array - labels: - additionalProperties: - type: string - type: object - ngMonitoring: - properties: - additionalContainers: - items: - properties: - args: - items: + command: + items: + type: string + type: array + env: + items: + properties: + name: type: string - type: array - command: - items: + value: type: string - type: array - env: - items: - properties: - name: - type: string - value: - type: string - valueFrom: - properties: - configMapKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - resourceFieldRef: - properties: - containerName: - type: string - divisor: - 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 - resource: - type: string - required: - - resource - type: object - secretKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - type: object - required: - - name - type: object - type: array - envFrom: - items: + valueFrom: properties: - configMapRef: + configMapKeyRef: properties: + key: + type: string name: type: string optional: type: boolean + required: + - key type: object - prefix: - type: string - secretRef: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + secretKeyRef: properties: + key: + type: string name: type: string optional: type: boolean + required: + - key type: object type: object - type: array - image: - type: string - imagePullPolicy: - type: string - lifecycle: - properties: - postStart: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - preStop: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - type: object - livenessProbe: + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: properties: exec: properties: @@ -34264,9 +32019,6 @@ spec: type: string type: array type: object - failureThreshold: - format: int32 - type: integer httpGet: properties: host: @@ -34295,15 +32047,6 @@ spec: required: - port type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer tcpSocket: properties: host: @@ -34316,36 +32059,8 @@ spec: required: - port type: object - timeoutSeconds: - format: int32 - type: integer type: object - name: - type: string - ports: - items: - properties: - containerPort: - format: int32 - type: integer - hostIP: - type: string - hostPort: - format: int32 - type: integer - name: - type: string - protocol: - type: string - required: - - containerPort - type: object - type: array - x-kubernetes-list-map-keys: - - containerPort - - protocol - x-kubernetes-list-type: map - readinessProbe: + preStop: properties: exec: properties: @@ -34354,9 +32069,6 @@ spec: type: string type: array type: object - failureThreshold: - format: int32 - type: integer httpGet: properties: host: @@ -34385,15 +32097,6 @@ spec: required: - port type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer tcpSocket: properties: host: @@ -34406,947 +32109,1147 @@ spec: required: - port type: object - timeoutSeconds: - format: int32 - type: integer type: object - resources: + type: object + livenessProbe: + properties: + exec: 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 - 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 - type: object + command: + items: + type: string + type: array type: object - securityContext: + failureThreshold: + format: int32 + type: integer + httpGet: properties: - allowPrivilegeEscalation: - type: boolean - capabilities: - properties: - add: - items: + host: + type: string + httpHeaders: + items: + properties: + name: type: string - type: array - drop: - items: + value: type: string - type: array - type: object - privileged: - type: boolean - procMount: + required: + - name + - value + type: object + type: array + path: type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - runAsUserName: - type: string - type: object + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port type: object - startupProbe: + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - timeoutSeconds: - format: int32 - type: integer + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port type: object - stdin: - type: boolean - stdinOnce: - type: boolean - terminationMessagePath: - type: string - terminationMessagePolicy: - type: string - tty: - type: boolean - volumeDevices: - items: - properties: - devicePath: - type: string - name: - type: string - required: - - devicePath - - name - type: object - type: array - volumeMounts: - items: - properties: - mountPath: - type: string - mountPropagation: - type: string - name: - type: string - readOnly: - type: boolean - subPath: - type: string - subPathExpr: - type: string - required: - - mountPath - - name - type: object - type: array - workingDir: - type: string - required: - - name + timeoutSeconds: + format: int32 + type: integer type: object - type: array - additionalVolumeMounts: - items: + resources: properties: - mountPath: - type: string - mountPropagation: - type: string - name: - type: string - readOnly: - type: boolean - subPath: - type: string - subPathExpr: - type: string - required: - - mountPath - - name + 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 + 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 + type: object type: object - type: array - additionalVolumes: - items: + securityContext: properties: - awsElasticBlockStore: + allowPrivilegeEscalation: + type: boolean + capabilities: properties: - fsType: - type: string - partition: - format: int32 - type: integer - readOnly: - type: boolean - volumeID: - type: string - required: - - volumeID + add: + items: + type: string + type: array + drop: + items: + type: string + type: array type: object - azureDisk: + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: properties: - cachingMode: + level: type: string - diskName: + role: type: string - diskURI: + type: type: string - fsType: + user: type: string - kind: + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: type: string - readOnly: - type: boolean required: - - diskName - - diskURI + - type type: object - azureFile: + windowsOptions: properties: - readOnly: - type: boolean - secretName: + gmsaCredentialSpec: type: string - shareName: + gmsaCredentialSpecName: + type: string + runAsUserName: type: string - required: - - secretName - - shareName type: object - cephfs: + type: object + startupProbe: + properties: + exec: properties: - monitors: + command: items: type: string type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array path: type: string - readOnly: - type: boolean - secretFile: + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: type: string - secretRef: - properties: - name: - type: string - type: object - user: + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true required: - - monitors + - port type: object - cinder: + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + additionalVolumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + additionalVolumes: + items: + properties: + awsElasticBlockStore: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + azureDisk: + properties: + cachingMode: + type: string + diskName: + type: string + diskURI: + type: string + fsType: + type: string + kind: + type: string + readOnly: + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + properties: + readOnly: + type: boolean + secretName: + type: string + shareName: + type: string + required: + - secretName + - shareName + type: object + cephfs: + properties: + monitors: + items: + type: string + type: array + path: + type: string + readOnly: + type: boolean + secretFile: + type: string + secretRef: properties: - fsType: + name: type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - volumeID: + type: object + user: + type: string + required: + - monitors + type: object + cinder: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + volumeID: + type: string + required: + - volumeID + type: object + configMap: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + csi: + properties: + driver: + type: string + fsType: + type: string + nodePublishSecretRef: + properties: + name: type: string - required: - - volumeID type: object - configMap: - properties: - defaultMode: - format: int32 - type: integer - items: - items: + readOnly: + type: boolean + volumeAttributes: + additionalProperties: + type: string + type: object + required: + - driver + type: object + downwardAPI: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + fieldRef: properties: - key: + apiVersion: type: string - mode: - format: int32 - type: integer - path: + fieldPath: type: string required: - - key - - path + - fieldPath type: object - type: array - name: - type: string - optional: - type: boolean - type: object - csi: - properties: - driver: - type: string - fsType: - type: string - nodePublishSecretRef: - properties: - name: - type: string - type: object - readOnly: - type: boolean - volumeAttributes: - additionalProperties: + mode: + format: int32 + type: integer + path: type: string - type: object - required: - - driver - type: object - downwardAPI: - properties: - defaultMode: - format: int32 - type: integer - items: - items: + resourceFieldRef: properties: - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - mode: - format: int32 - type: integer - path: + containerName: + type: string + divisor: + 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 + resource: type: string - resourceFieldRef: - properties: - containerName: - type: string - divisor: - 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 - resource: - type: string - required: - - resource - type: object required: - - path + - resource type: object - type: array - type: object - emptyDir: - properties: - medium: - type: string - sizeLimit: - 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: object - ephemeral: + required: + - path + type: object + type: array + type: object + emptyDir: + properties: + medium: + type: string + sizeLimit: + 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: object + ephemeral: + properties: + readOnly: + type: boolean + volumeClaimTemplate: properties: - readOnly: - type: boolean - volumeClaimTemplate: + metadata: + type: object + spec: properties: - metadata: + accessModes: + items: + type: string + type: array + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name type: object - spec: + resources: properties: - accessModes: - items: - type: string - type: array - dataSource: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name + 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 type: object - resources: - 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 - 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 - 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 type: object - selector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: type: string - type: object + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string type: object - storageClassName: - type: string - volumeMode: - type: string - volumeName: - type: string type: object - required: - - spec - type: object - type: object - fc: - properties: - fsType: - type: string - lun: - format: int32 - type: integer - readOnly: - type: boolean - targetWWNs: - items: - type: string - type: array - wwids: - items: - type: string - type: array - type: object - flexVolume: - properties: - driver: - type: string - fsType: - type: string - options: - additionalProperties: - type: string - type: object - readOnly: - type: boolean - secretRef: - properties: - name: + storageClassName: type: string - type: object - required: - - driver - type: object - flocker: - properties: - datasetName: - type: string - datasetUUID: - type: string - type: object - gcePersistentDisk: - properties: - fsType: - type: string - partition: - format: int32 - type: integer - pdName: - type: string - readOnly: - type: boolean - required: - - pdName - type: object - gitRepo: - properties: - directory: - type: string - repository: - type: string - revision: - type: string - required: - - repository - type: object - glusterfs: - properties: - endpoints: - type: string - path: - type: string - readOnly: - type: boolean - required: - - endpoints - - path - type: object - hostPath: - properties: - path: - type: string - type: - type: string - required: - - path - type: object - iscsi: - properties: - chapAuthDiscovery: - type: boolean - chapAuthSession: - type: boolean - fsType: - type: string - initiatorName: - type: string - iqn: - type: string - iscsiInterface: - type: string - lun: - format: int32 - type: integer - portals: - items: - type: string - type: array - readOnly: - type: boolean - secretRef: - properties: - name: + volumeMode: + type: string + volumeName: type: string type: object - targetPortal: - type: string required: - - iqn - - lun - - targetPortal + - spec type: object - name: + type: object + fc: + properties: + fsType: type: string - nfs: - properties: - path: - type: string - readOnly: - type: boolean - server: - type: string - required: - - path - - server - type: object - persistentVolumeClaim: - properties: - claimName: - type: string - readOnly: - type: boolean - required: - - claimName + lun: + format: int32 + type: integer + readOnly: + type: boolean + targetWWNs: + items: + type: string + type: array + wwids: + items: + type: string + type: array + type: object + flexVolume: + properties: + driver: + type: string + fsType: + type: string + options: + additionalProperties: + type: string type: object - photonPersistentDisk: + readOnly: + type: boolean + secretRef: properties: - fsType: - type: string - pdID: + name: type: string - required: - - pdID type: object - portworxVolume: + required: + - driver + type: object + flocker: + properties: + datasetName: + type: string + datasetUUID: + type: string + type: object + gcePersistentDisk: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + pdName: + type: string + readOnly: + type: boolean + required: + - pdName + type: object + gitRepo: + properties: + directory: + type: string + repository: + type: string + revision: + type: string + required: + - repository + type: object + glusterfs: + properties: + endpoints: + type: string + path: + type: string + readOnly: + type: boolean + required: + - endpoints + - path + type: object + hostPath: + properties: + path: + type: string + type: + type: string + required: + - path + type: object + iscsi: + properties: + chapAuthDiscovery: + type: boolean + chapAuthSession: + type: boolean + fsType: + type: string + initiatorName: + type: string + iqn: + type: string + iscsiInterface: + type: string + lun: + format: int32 + type: integer + portals: + items: + type: string + type: array + readOnly: + type: boolean + secretRef: properties: - fsType: - type: string - readOnly: - type: boolean - volumeID: + name: type: string - required: - - volumeID type: object - projected: - properties: - defaultMode: - format: int32 - type: integer - sources: - items: + targetPortal: + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + type: string + nfs: + properties: + path: + type: string + readOnly: + type: boolean + server: + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + properties: + claimName: + type: string + readOnly: + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + properties: + fsType: + type: string + pdID: + type: string + required: + - pdID + type: object + portworxVolume: + properties: + fsType: + type: string + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + projected: + properties: + defaultMode: + format: int32 + type: integer + sources: + items: + properties: + configMap: properties: - configMap: - properties: - items: - items: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + downwardAPI: + properties: + items: + items: + properties: + fieldRef: properties: - key: - type: string - mode: - format: int32 - type: integer - path: + apiVersion: type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - downwardAPI: - properties: - items: - items: - properties: - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - mode: - format: int32 - type: integer - path: + fieldPath: type: string - resourceFieldRef: - properties: - containerName: - type: string - divisor: - 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 - resource: - type: string - required: - - resource - type: object required: - - path + - fieldPath type: object - type: array - type: object - secret: - properties: - items: - items: + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: properties: - key: + containerName: type: string - mode: - format: int32 - type: integer - path: + divisor: + 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 + resource: type: string required: - - key - - path + - resource type: object - type: array - name: - type: string - optional: - type: boolean - type: object - serviceAccountToken: - properties: - audience: - type: string - expirationSeconds: - format: int64 - type: integer - path: - type: string - required: - - path - type: object + required: + - path + type: object + type: array type: object - type: array - required: - - sources - type: object - quobyte: + secret: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + serviceAccountToken: + properties: + audience: + type: string + expirationSeconds: + format: int64 + type: integer + path: + type: string + required: + - path + type: object + type: object + type: array + required: + - sources + type: object + quobyte: + properties: + group: + type: string + readOnly: + type: boolean + registry: + type: string + tenant: + type: string + user: + type: string + volume: + type: string + required: + - registry + - volume + type: object + rbd: + properties: + fsType: + type: string + image: + type: string + keyring: + type: string + monitors: + items: + type: string + type: array + pool: + type: string + readOnly: + type: boolean + secretRef: properties: - group: - type: string - readOnly: - type: boolean - registry: - type: string - tenant: - type: string - user: - type: string - volume: + name: type: string - required: - - registry - - volume type: object - rbd: + user: + type: string + required: + - image + - monitors + type: object + scaleIO: + properties: + fsType: + type: string + gateway: + type: string + protectionDomain: + type: string + readOnly: + type: boolean + secretRef: properties: - fsType: - type: string - image: - type: string - keyring: + name: type: string - monitors: - items: + type: object + sslEnabled: + type: boolean + storageMode: + type: string + storagePool: + type: string + system: + type: string + volumeName: + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: type: string - type: array - pool: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - user: + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + optional: + type: boolean + secretName: + type: string + type: object + storageos: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: type: string - required: - - image - - monitors type: object - scaleIO: + volumeName: + type: string + volumeNamespace: + type: string + type: object + vsphereVolume: + properties: + fsType: + type: string + storagePolicyID: + type: string + storagePolicyName: + type: string + volumePath: + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + affinity: + properties: + nodeAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: properties: - fsType: - type: string - gateway: - type: string - protectionDomain: - type: string - readOnly: - type: boolean - secretRef: + preference: properties: - name: - type: string + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array type: object - sslEnabled: - type: boolean - storageMode: - type: string - storagePool: - type: string - system: - type: string - volumeName: - type: string - required: - - gateway - - secretRef - - system - type: object - secret: - properties: - defaultMode: + weight: format: int32 type: integer - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - optional: - type: boolean - secretName: - type: string - type: object - storageos: - properties: - fsType: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - volumeName: - type: string - volumeNamespace: - type: string - type: object - vsphereVolume: - properties: - fsType: - type: string - storagePolicyID: - type: string - storagePolicyName: - type: string - volumePath: - type: string required: - - volumePath + - preference + - weight type: object - required: - - name - type: object - type: array - affinity: - properties: - nodeAffinity: + type: array + requiredDuringSchedulingIgnoredDuringExecution: properties: - preferredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: items: properties: - preference: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - weight: - format: int32 - type: integer - required: - - preference - - weight + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array type: object type: array - requiredDuringSchedulingIgnoredDuringExecution: - properties: - nodeSelectorTerms: - items: + required: + - nodeSelectorTerms + type: object + type: object + podAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: properties: matchExpressions: items: @@ -35364,77 +33267,71 @@ spec: - operator type: object type: array - matchFields: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array + matchLabels: + additionalProperties: + type: string + type: object type: object - type: array - required: - - nodeSelectorTerms - type: object - type: object - podAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: properties: - podAffinityTerm: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: + matchExpressions: + items: + properties: + key: type: string - type: array - topologyKey: - type: string - required: - - topologyKey + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string type: object - weight: - format: int32 - type: integer - required: - - podAffinityTerm - - weight type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - items: + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + type: object + podAntiAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: properties: labelSelector: properties: @@ -35463,182 +33360,703 @@ spec: items: type: string type: array - topologyKey: - type: string - required: - - topologyKey + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + type: object + type: object + annotations: + additionalProperties: + type: string + type: object + clusters: + items: + properties: + clusterDomain: + type: string + name: + type: string + namespace: + type: string + required: + - name + type: object + maxItems: 1 + minItems: 1 + type: array + configUpdateStrategy: + type: string + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + hostNetwork: + type: boolean + image: + type: string + imagePullPolicy: + type: string + imagePullSecrets: + items: + properties: + name: + type: string + type: object + type: array + initContainers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array type: object - type: array - type: object - podAntiAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: + httpGet: properties: - podAffinityTerm: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: + host: + type: string + httpHeaders: + items: + properties: + name: type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - weight: - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - items: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: + value: type: string - type: object - type: object - namespaces: - items: - type: string + required: + - name + - value + type: object type: array - topologyKey: + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: type: string required: - - topologyKey + - port type: object - type: array - type: object - type: object - annotations: - additionalProperties: - type: string - type: object - baseImage: - type: string - config: - x-kubernetes-preserve-unknown-fields: true - configUpdateStrategy: - type: string - env: - items: - properties: - name: - type: string - value: - type: string - valueFrom: - properties: - configMapKeyRef: + tcpSocket: properties: - key: - type: string - name: + host: type: string - optional: - type: boolean + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true required: - - key + - port type: object - fieldRef: + type: object + preStop: + properties: + exec: properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath + command: + items: + type: string + type: array type: object - resourceFieldRef: + httpGet: properties: - containerName: + host: type: string - divisor: + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: 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 - resource: + scheme: type: string required: - - resource + - port type: object - secretKeyRef: + tcpSocket: properties: - key: - type: string - name: + host: type: string - optional: - type: boolean + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true required: - - key + - port type: object type: object - required: - - name type: object - type: array - hostNetwork: - type: boolean - image: - type: string - imagePullPolicy: - type: string - imagePullSecrets: - items: + livenessProbe: properties: - name: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + 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 + 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 + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer type: object - type: array - initContainers: + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + labels: + additionalProperties: + type: string + type: object + ngMonitoring: + properties: + additionalContainers: items: properties: args: @@ -36183,1165 +34601,842 @@ spec: - name type: object type: array - labels: - additionalProperties: - type: string - 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 - type: object - nodeSelector: - additionalProperties: - type: string - type: object - podManagementPolicy: - type: string - podSecurityContext: - properties: - fsGroup: - format: int64 - type: integer - fsGroupChangePolicy: - type: string - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - supplementalGroups: - items: - format: int64 - type: integer - type: array - sysctls: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - runAsUserName: - type: string - type: object - type: object - priorityClassName: - type: string - 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 - type: object - schedulerName: - type: string - statefulSetUpdateStrategy: - type: string - storageClassName: - type: string - storageVolumes: + additionalVolumeMounts: items: properties: mountPath: type: string + mountPropagation: + type: string name: type: string - storageClassName: + readOnly: + type: boolean + subPath: type: string - storageSize: + subPathExpr: type: string required: + - mountPath - name - - storageSize - type: object - type: array - terminationGracePeriodSeconds: - format: int64 - type: integer - tolerations: - items: - properties: - effect: - type: string - key: - type: string - operator: - type: string - tolerationSeconds: - format: int64 - type: integer - value: - type: string - type: object - type: array - topologySpreadConstraints: - items: - properties: - topologyKey: - type: string - required: - - topologyKey type: object type: array - x-kubernetes-list-map-keys: - - topologyKey - x-kubernetes-list-type: map - version: - type: string - required: - - baseImage - type: object - nodeSelector: - additionalProperties: - type: string - type: object - paused: - type: boolean - podManagementPolicy: - type: string - podSecurityContext: - properties: - fsGroup: - format: int64 - type: integer - fsGroupChangePolicy: - type: string - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - supplementalGroups: - items: - format: int64 - type: integer - type: array - sysctls: + additionalVolumes: items: properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - runAsUserName: - type: string - type: object - type: object - priorityClassName: - type: string - pvReclaimPolicy: - type: string - schedulerName: - type: string - statefulSetUpdateStrategy: - type: string - terminationGracePeriodSeconds: - format: int64 - type: integer - tolerations: - items: - properties: - effect: - type: string - key: - type: string - operator: - type: string - tolerationSeconds: - format: int64 - type: integer - value: - type: string - type: object - type: array - topologySpreadConstraints: - items: - properties: - topologyKey: - type: string - required: - - topologyKey - type: object - type: array - x-kubernetes-list-map-keys: - - topologyKey - x-kubernetes-list-type: map - version: - type: string - required: - - clusters - - ngMonitoring - type: object - status: - properties: - ngMonitoring: - properties: - phase: - type: string - statefulSet: - properties: - collisionCount: - format: int32 - type: integer - conditions: - items: + awsElasticBlockStore: properties: - lastTransitionTime: - format: date-time + fsType: type: string - message: + partition: + format: int32 + type: integer + readOnly: + type: boolean + volumeID: type: string - reason: + required: + - volumeID + type: object + azureDisk: + properties: + cachingMode: type: string - status: + diskName: type: string - type: + diskURI: type: string + fsType: + type: string + kind: + type: string + readOnly: + type: boolean required: - - status - - type + - diskName + - diskURI type: object - type: array - currentReplicas: - format: int32 - type: integer - currentRevision: - type: string - observedGeneration: - format: int64 - type: integer - readyReplicas: - format: int32 - type: integer - replicas: - format: int32 - type: integer - updateRevision: - type: string - updatedReplicas: - format: int32 - type: integer - required: - - replicas - type: object - synced: - type: boolean - type: object - type: object - required: - - metadata - - spec - type: object - version: v1alpha1 - versions: - - name: v1alpha1 - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] - ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.6.2 - creationTimestamp: null - name: tidbngmonitors.pingcap.com -spec: - group: pingcap.com - names: - kind: TiDBNGMonitor - listKind: TiDBNGMonitorList - plural: tidbngmonitors - shortNames: - - tnm - singular: tidbngmonitor - preserveUnknownFields: false - scope: Namespaced - validation: - openAPIV3Schema: - properties: - apiVersion: - type: string - kind: - type: string - metadata: - type: object - spec: - properties: - additionalContainers: - items: - properties: - args: - items: - type: string - type: array - command: - items: - type: string - type: array - env: - items: - properties: - name: - type: string - value: - type: string - valueFrom: - properties: - configMapKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - resourceFieldRef: - properties: - containerName: - type: string - divisor: - 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 - resource: - type: string - required: - - resource - type: object - secretKeyRef: + azureFile: + properties: + readOnly: + type: boolean + secretName: + type: string + shareName: + type: string + required: + - secretName + - shareName + type: object + cephfs: + properties: + monitors: + items: + type: string + type: array + path: + type: string + readOnly: + type: boolean + secretFile: + type: string + secretRef: + properties: + name: + type: string + type: object + user: + type: string + required: + - monitors + type: object + cinder: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + volumeID: + type: string + required: + - volumeID + type: object + configMap: + properties: + defaultMode: + format: int32 + type: integer + items: + items: properties: key: type: string - name: + mode: + format: int32 + type: integer + path: type: string - optional: - type: boolean required: - key + - path type: object - type: object - required: - - name - type: object - type: array - envFrom: - items: - properties: - configMapRef: - properties: - name: - type: string - optional: - type: boolean - type: object - prefix: - type: string - secretRef: - properties: - name: - type: string - optional: - type: boolean - type: object - type: object - type: array - image: - type: string - imagePullPolicy: - type: string - lifecycle: - properties: - postStart: + type: array + name: + type: string + optional: + type: boolean + type: object + csi: properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: + driver: + type: string + fsType: + type: string + nodePublishSecretRef: properties: - host: + name: type: string - httpHeaders: - items: + type: object + readOnly: + type: boolean + volumeAttributes: + additionalProperties: + type: string + type: object + required: + - driver + type: object + downwardAPI: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + fieldRef: properties: - name: + apiVersion: type: string - value: + fieldPath: type: string required: - - name - - value + - fieldPath type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - preStop: - properties: - exec: - properties: - command: - items: + mode: + format: int32 + type: integer + path: type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: + resourceFieldRef: properties: - name: + containerName: type: string - value: + divisor: + 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 + resource: type: string required: - - name - - value + - resource type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - tcpSocket: + required: + - path + type: object + type: array + type: object + emptyDir: + properties: + medium: + type: string + sizeLimit: + 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: object + ephemeral: + properties: + readOnly: + type: boolean + volumeClaimTemplate: properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true + metadata: + type: object + spec: + properties: + accessModes: + items: + type: string + type: array + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + resources: + 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 + 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 + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + storageClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object required: - - port + - spec type: object type: object - type: object - livenessProbe: - properties: - exec: + fc: properties: - command: + fsType: + type: string + lun: + format: int32 + type: integer + readOnly: + type: boolean + targetWWNs: items: type: string type: array - type: object - failureThreshold: - format: int32 - type: integer - httpGet: - properties: - host: - type: string - httpHeaders: + wwids: items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object + type: string type: array - path: + type: object + flexVolume: + properties: + driver: type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: + fsType: type: string + options: + additionalProperties: + type: string + type: object + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object required: - - port + - driver type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: + flocker: properties: - host: + datasetName: + type: string + datasetUUID: type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port type: object - timeoutSeconds: - format: int32 - type: integer - type: object - name: - type: string - ports: - items: - properties: - containerPort: - format: int32 - type: integer - hostIP: - type: string - hostPort: - format: int32 - type: integer - name: - type: string - protocol: - type: string - required: - - containerPort - type: object - type: array - x-kubernetes-list-map-keys: - - containerPort - - protocol - x-kubernetes-list-type: map - readinessProbe: - properties: - exec: + gcePersistentDisk: properties: - command: - items: - type: string - type: array + fsType: + type: string + partition: + format: int32 + type: integer + pdName: + type: string + readOnly: + type: boolean + required: + - pdName type: object - failureThreshold: - format: int32 - type: integer - httpGet: + gitRepo: properties: - host: + directory: type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: + repository: type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: + revision: type: string required: - - port + - repository type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: + glusterfs: properties: - host: + endpoints: type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true + path: + type: string + readOnly: + type: boolean required: - - port - type: object - timeoutSeconds: - format: int32 - type: integer - type: object - resources: - 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 - 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 + - endpoints + - path type: object - type: object - securityContext: - properties: - allowPrivilegeEscalation: - type: boolean - capabilities: + hostPath: + properties: + path: + type: string + type: + type: string + required: + - path + type: object + iscsi: properties: - add: - items: - type: string - type: array - drop: + chapAuthDiscovery: + type: boolean + chapAuthSession: + type: boolean + fsType: + type: string + initiatorName: + type: string + iqn: + type: string + iscsiInterface: + type: string + lun: + format: int32 + type: integer + portals: items: type: string type: array + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + targetPortal: + type: string + required: + - iqn + - lun + - targetPortal type: object - privileged: - type: boolean - procMount: + name: type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: + nfs: properties: - level: - type: string - role: + path: type: string - type: + readOnly: + type: boolean + server: type: string - user: + required: + - path + - server + type: object + persistentVolumeClaim: + properties: + claimName: type: string + readOnly: + type: boolean + required: + - claimName type: object - seccompProfile: + photonPersistentDisk: properties: - localhostProfile: + fsType: type: string - type: + pdID: type: string required: - - type + - pdID type: object - windowsOptions: + portworxVolume: properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: + fsType: type: string - runAsUserName: + readOnly: + type: boolean + volumeID: type: string + required: + - volumeID type: object - type: object - startupProbe: - properties: - exec: + projected: properties: - command: + defaultMode: + format: int32 + type: integer + sources: items: - type: string + properties: + configMap: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + downwardAPI: + properties: + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + secret: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + serviceAccountToken: + properties: + audience: + type: string + expirationSeconds: + format: int64 + type: integer + path: + type: string + required: + - path + type: object + type: object type: array + required: + - sources type: object - failureThreshold: - format: int32 - type: integer - httpGet: + quobyte: properties: - host: + group: type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: + readOnly: + type: boolean + registry: type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: + tenant: + type: string + user: + type: string + volume: type: string required: - - port + - registry + - volume type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: + rbd: properties: - host: + fsType: + type: string + image: + type: string + keyring: + type: string + monitors: + items: + type: string + type: array + pool: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + user: type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true required: - - port + - image + - monitors type: object - timeoutSeconds: - format: int32 - type: integer - type: object - stdin: - type: boolean - stdinOnce: - type: boolean - terminationMessagePath: - type: string - terminationMessagePolicy: - type: string - tty: - type: boolean - volumeDevices: - items: - properties: - devicePath: - type: string - name: - type: string - required: - - devicePath - - name - type: object - type: array - volumeMounts: - items: - properties: - mountPath: - type: string - mountPropagation: - type: string - name: - type: string - readOnly: - type: boolean - subPath: - type: string - subPathExpr: - type: string - required: - - mountPath - - name - type: object - type: array - workingDir: - type: string - required: - - name - type: object - type: array - additionalVolumeMounts: - items: - properties: - mountPath: - type: string - mountPropagation: - type: string - name: - type: string - readOnly: - type: boolean - subPath: - type: string - subPathExpr: - type: string - required: - - mountPath - - name - type: object - type: array - additionalVolumes: - items: - properties: - awsElasticBlockStore: - properties: - fsType: - type: string - partition: - format: int32 - type: integer - readOnly: - type: boolean - volumeID: - type: string - required: - - volumeID - type: object - azureDisk: - properties: - cachingMode: - type: string - diskName: - type: string - diskURI: - type: string - fsType: - type: string - kind: - type: string - readOnly: - type: boolean - required: - - diskName - - diskURI - type: object - azureFile: - properties: - readOnly: - type: boolean - secretName: - type: string - shareName: - type: string - required: - - secretName - - shareName - type: object - cephfs: - properties: - monitors: - items: - type: string - type: array - path: - type: string - readOnly: - type: boolean - secretFile: - type: string - secretRef: + scaleIO: properties: - name: + fsType: type: string - type: object - user: - type: string - required: - - monitors - type: object - cinder: - properties: - fsType: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: + gateway: + type: string + protectionDomain: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + sslEnabled: + type: boolean + storageMode: + type: string + storagePool: + type: string + system: + type: string + volumeName: type: string + required: + - gateway + - secretRef + - system type: object - volumeID: - type: string - required: - - volumeID - type: object - configMap: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - csi: - properties: - driver: - type: string - fsType: - type: string - nodePublishSecretRef: + secret: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + optional: + type: boolean + secretName: + type: string + type: object + storageos: properties: - name: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + volumeName: + type: string + volumeNamespace: type: string type: object - readOnly: - type: boolean - volumeAttributes: - additionalProperties: - type: string + vsphereVolume: + properties: + fsType: + type: string + storagePolicyID: + type: string + storagePolicyName: + type: string + volumePath: + type: string + required: + - volumePath type: object required: - - driver + - name type: object - downwardAPI: - properties: - defaultMode: - format: int32 - type: integer - items: - items: + type: array + affinity: + properties: + nodeAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + preference: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + weight: + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: properties: - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - mode: - format: int32 - type: integer - path: - type: string - resourceFieldRef: - properties: - containerName: - type: string - divisor: - 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 - resource: - type: string - required: - - resource - type: object + nodeSelectorTerms: + items: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + type: array required: - - path + - nodeSelectorTerms type: object - type: array - type: object - emptyDir: - properties: - medium: - type: string - sizeLimit: - 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: object - ephemeral: - properties: - readOnly: - type: boolean - volumeClaimTemplate: - properties: - metadata: - type: object - spec: + type: object + podAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: properties: - accessModes: - items: - type: string - type: array - dataSource: + podAffinityTerm: properties: - apiGroup: - type: string - kind: - type: string - name: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: type: string required: - - kind - - name - type: object - resources: - 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 - 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 - type: object + - topologyKey type: object - selector: + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: properties: matchExpressions: items: @@ -37364,880 +35459,475 @@ spec: type: string type: object type: object - storageClassName: - type: string - volumeMode: - type: string - volumeName: - type: string - type: object - required: - - spec - type: object - type: object - fc: - properties: - fsType: - type: string - lun: - format: int32 - type: integer - readOnly: - type: boolean - targetWWNs: - items: - type: string - type: array - wwids: - items: - type: string - type: array - type: object - flexVolume: - properties: - driver: - type: string - fsType: - type: string - options: - additionalProperties: - type: string - type: object - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - required: - - driver - type: object - flocker: - properties: - datasetName: - type: string - datasetUUID: - type: string - type: object - gcePersistentDisk: - properties: - fsType: - type: string - partition: - format: int32 - type: integer - pdName: - type: string - readOnly: - type: boolean - required: - - pdName - type: object - gitRepo: - properties: - directory: - type: string - repository: - type: string - revision: - type: string - required: - - repository - type: object - glusterfs: - properties: - endpoints: - type: string - path: - type: string - readOnly: - type: boolean - required: - - endpoints - - path - type: object - hostPath: - properties: - path: - type: string - type: - type: string - required: - - path - type: object - iscsi: - properties: - chapAuthDiscovery: - type: boolean - chapAuthSession: - type: boolean - fsType: - type: string - initiatorName: - type: string - iqn: - type: string - iscsiInterface: - type: string - lun: - format: int32 - type: integer - portals: - items: - type: string - type: array - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - targetPortal: - type: string - required: - - iqn - - lun - - targetPortal - type: object - name: - type: string - nfs: - properties: - path: - type: string - readOnly: - type: boolean - server: - type: string - required: - - path - - server - type: object - persistentVolumeClaim: - properties: - claimName: - type: string - readOnly: - type: boolean - required: - - claimName - type: object - photonPersistentDisk: - properties: - fsType: - type: string - pdID: - type: string - required: - - pdID - type: object - portworxVolume: - properties: - fsType: - type: string - readOnly: - type: boolean - volumeID: - type: string - required: - - volumeID - type: object - projected: - properties: - defaultMode: - format: int32 - type: integer - sources: - items: - properties: - configMap: - properties: + namespaces: items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: type: string - optional: - type: boolean - type: object - downwardAPI: - properties: - items: - items: + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + type: object + podAntiAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: properties: - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string type: object - mode: - format: int32 - type: integer - path: - type: string - resourceFieldRef: - properties: - containerName: - type: string - divisor: - 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 - resource: + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: type: string - required: - - resource - type: object - required: - - path + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string type: object - type: array - type: object - secret: - properties: + type: object + namespaces: items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - serviceAccountToken: - properties: - audience: - type: string - expirationSeconds: - format: int64 - type: integer - path: type: string - required: - - path - type: object - type: object - type: array - required: - - sources - type: object - quobyte: - properties: - group: - type: string - readOnly: - type: boolean - registry: - type: string - tenant: - type: string - user: - type: string - volume: - type: string - required: - - registry - - volume - type: object - rbd: + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + type: object + type: object + annotations: + additionalProperties: + type: string + type: object + baseImage: + type: string + config: + x-kubernetes-preserve-unknown-fields: true + configUpdateStrategy: + type: string + env: + items: properties: - fsType: - type: string - image: - type: string - keyring: + name: type: string - monitors: - items: - type: string - type: array - pool: + value: type: string - readOnly: - type: boolean - secretRef: + valueFrom: properties: - name: - type: string + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object type: object - user: - type: string required: - - image - - monitors + - name type: object - scaleIO: + type: array + hostNetwork: + type: boolean + image: + type: string + imagePullPolicy: + type: string + imagePullSecrets: + items: properties: - fsType: - type: string - gateway: - type: string - protectionDomain: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - sslEnabled: - type: boolean - storageMode: - type: string - storagePool: - type: string - system: - type: string - volumeName: + name: type: string - required: - - gateway - - secretRef - - system type: object - secret: + type: array + initContainers: + items: properties: - defaultMode: - format: int32 - type: integer - items: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: items: properties: - key: + name: type: string - mode: - format: int32 - type: integer - path: + value: type: string - required: - - key - - path - type: object - type: array - optional: - type: boolean - secretName: - type: string - type: object - storageos: - properties: - fsType: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - volumeName: - type: string - volumeNamespace: - type: string - type: object - vsphereVolume: - properties: - fsType: - type: string - storagePolicyID: - type: string - storagePolicyName: - type: string - volumePath: - type: string - required: - - volumePath - type: object - required: - - name - type: object - type: array - affinity: - properties: - nodeAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - preference: - properties: - matchExpressions: - items: + valueFrom: + properties: + configMapKeyRef: properties: key: type: string - operator: + name: type: string - values: - items: - type: string - type: array + optional: + type: boolean required: - key - - operator type: object - type: array - matchFields: - items: + fieldRef: properties: - key: + apiVersion: type: string - operator: + fieldPath: type: string - values: - items: - type: string - type: array required: - - key - - operator + - fieldPath type: object - type: array - type: object - weight: - format: int32 - type: integer - required: - - preference - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - properties: - nodeSelectorTerms: - items: - properties: - matchExpressions: - items: + resourceFieldRef: properties: - key: + containerName: type: string - operator: + divisor: + 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 + resource: type: string - values: - items: - type: string - type: array required: - - key - - operator + - resource type: object - type: array - matchFields: - items: + secretKeyRef: properties: key: type: string - operator: + name: type: string - values: - items: - type: string - type: array + optional: + type: boolean required: - key - - operator type: object - type: array - type: object - type: array - required: - - nodeSelectorTerms - type: object - type: object - podAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: properties: - podAffinityTerm: + postStart: properties: - labelSelector: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: properties: - matchExpressions: + host: + type: string + httpHeaders: items: properties: - key: + name: type: string - operator: + value: type: string - values: - items: - type: string - type: array required: - - key - - operator + - name + - value type: object type: array - matchLabels: - additionalProperties: - type: string - type: object + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port type: object - namespaces: + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: items: type: string type: array - topologyKey: - type: string - required: - - topologyKey type: object - weight: + failureThreshold: format: int32 type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - items: - properties: - labelSelector: + httpGet: properties: - matchExpressions: + host: + type: string + httpHeaders: items: properties: - key: + name: type: string - operator: + value: type: string - values: - items: - type: string - type: array required: - - key - - operator + - name + - value type: object type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - type: array - type: object - podAntiAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - podAffinityTerm: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: type: string required: - - topologyKey + - port type: object - weight: + initialDelaySeconds: format: int32 type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - items: - properties: - labelSelector: + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - type: array - type: object - type: object - annotations: - additionalProperties: - type: string - type: object - clusters: - items: - properties: - clusterDomain: - type: string - name: - type: string - namespace: - type: string - required: - - name - type: object - type: array - configUpdateStrategy: - type: string - env: - items: - properties: - name: - type: string - value: - type: string - valueFrom: - properties: - configMapKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - resourceFieldRef: - properties: - containerName: - type: string - divisor: - 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 - resource: - type: string - required: - - resource - type: object - secretKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key + timeoutSeconds: + format: int32 + type: integer type: object - type: object - required: - - name - type: object - type: array - hostNetwork: - type: boolean - image: - type: string - imagePullPolicy: - type: string - imagePullSecrets: - items: - properties: - name: - type: string - type: object - type: array - initContainers: - items: - properties: - args: - items: - type: string - type: array - command: - items: - type: string - type: array - env: - items: - properties: - name: - type: string - value: - type: string - valueFrom: - properties: - configMapKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - resourceFieldRef: - properties: - containerName: - type: string - divisor: - 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 - resource: - type: string - required: - - resource - type: object - secretKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - type: object - required: - - name - type: object - type: array - envFrom: - items: - properties: - configMapRef: + name: + type: string + ports: + items: properties: - name: + containerPort: + format: int32 + type: integer + hostIP: type: string - optional: - type: boolean - type: object - prefix: - type: string - secretRef: - properties: + hostPort: + format: int32 + type: integer name: type: string - optional: - type: boolean + protocol: + type: string + required: + - containerPort type: object - type: object - type: array - image: - type: string - imagePullPolicy: - type: string - lifecycle: - properties: - postStart: + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: properties: exec: properties: @@ -38246,6 +35936,9 @@ spec: type: string type: array type: object + failureThreshold: + format: int32 + type: integer httpGet: properties: host: @@ -38274,6 +35967,15 @@ spec: required: - port type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer tcpSocket: properties: host: @@ -38286,8 +35988,89 @@ spec: required: - port type: object + timeoutSeconds: + format: int32 + type: integer type: object - preStop: + resources: + 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 + 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 + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: properties: exec: properties: @@ -38296,6 +36079,9 @@ spec: type: string type: array type: object + failureThreshold: + format: int32 + type: integer httpGet: properties: host: @@ -38324,6 +36110,15 @@ spec: required: - port type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer tcpSocket: properties: host: @@ -38336,362 +36131,210 @@ spec: required: - port type: object + timeoutSeconds: + format: int32 + type: integer type: object - type: object - livenessProbe: - properties: - exec: - properties: - command: - items: + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - timeoutSeconds: - format: int32 - type: integer + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name type: object - name: + type: array + labels: + additionalProperties: type: string - ports: - items: + 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 + type: object + nodeSelector: + additionalProperties: + type: string + type: object + podManagementPolicy: + type: string + podSecurityContext: + properties: + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: properties: - containerPort: - format: int32 - type: integer - hostIP: + level: type: string - hostPort: - format: int32 - type: integer - name: + role: type: string - protocol: + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: type: string required: - - containerPort + - type type: object - type: array - x-kubernetes-list-map-keys: - - containerPort - - protocol - x-kubernetes-list-type: map - readinessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 + supplementalGroups: + items: + format: int64 type: integer - httpGet: + type: array + sysctls: + items: properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: + name: type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: + value: type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true required: - - port + - name + - value type: object - timeoutSeconds: - format: int32 - type: integer - type: object - resources: + type: array + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + priorityClassName: + type: string + 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 + type: object + schedulerName: + type: string + statefulSetUpdateStrategy: + type: string + storageClassName: + type: string + storageVolumes: + items: 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 - 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 - type: object + mountPath: + type: string + name: + type: string + storageClassName: + type: string + storageSize: + type: string + required: + - name + - storageSize type: object - securityContext: + type: array + terminationGracePeriodSeconds: + format: int64 + type: integer + tolerations: + items: properties: - allowPrivilegeEscalation: - type: boolean - capabilities: - properties: - add: - items: - type: string - type: array - drop: - items: - type: string - type: array - type: object - privileged: - type: boolean - procMount: + effect: type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: + key: + type: string + operator: + type: string + tolerationSeconds: format: int64 type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - runAsUserName: - type: string - type: object + value: + type: string type: object - startupProbe: + type: array + topologySpreadConstraints: + items: properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - timeoutSeconds: - format: int32 - type: integer + topologyKey: + type: string + required: + - topologyKey type: object - stdin: - type: boolean - stdinOnce: - type: boolean - terminationMessagePath: - type: string - terminationMessagePolicy: - type: string - tty: - type: boolean - volumeDevices: - items: - properties: - devicePath: - type: string - name: - type: string - required: - - devicePath - - name - type: object - type: array - volumeMounts: - items: - properties: - mountPath: - type: string - mountPropagation: - type: string - name: - type: string - readOnly: - type: boolean - subPath: - type: string - subPathExpr: - type: string - required: - - mountPath - - name - type: object - type: array - workingDir: - type: string - required: - - name - type: object - type: array - labels: - additionalProperties: - type: string + type: array + x-kubernetes-list-map-keys: + - topologyKey + x-kubernetes-list-type: map + version: + type: string type: object nodeSelector: additionalProperties: type: string type: object + paused: + type: boolean podManagementPolicy: type: string podSecurityContext: @@ -38758,6 +36401,8 @@ spec: type: object priorityClassName: type: string + pvReclaimPolicy: + type: string schedulerName: type: string statefulSetUpdateStrategy: @@ -38797,10 +36442,11 @@ spec: type: string required: - clusters + - ngMonitoring type: object status: properties: - monitor: + ngMonitoring: properties: phase: type: string diff --git a/pkg/apis/pingcap/v1alpha1/openapi_generated.go b/pkg/apis/pingcap/v1alpha1/openapi_generated.go index 22b58ec50b3..fcc50249b96 100644 --- a/pkg/apis/pingcap/v1alpha1/openapi_generated.go +++ b/pkg/apis/pingcap/v1alpha1/openapi_generated.go @@ -3846,7 +3846,6 @@ func schema_pkg_apis_pingcap_v1alpha1_NGMonitoringSpec(ref common.ReferenceCallb }, }, }, - Required: []string{"baseImage"}, }, }, Dependencies: []string{ diff --git a/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/fake/fake_tidbngmonitoring.go b/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/fake/fake_tidbngmonitoring.go index 0571a94d8d1..65ee2161fbf 100644 --- a/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/fake/fake_tidbngmonitoring.go +++ b/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/fake/fake_tidbngmonitoring.go @@ -99,18 +99,6 @@ func (c *FakeTiDBNGMonitorings) Update(ctx context.Context, tiDBNGMonitoring *v1 return obj.(*v1alpha1.TiDBNGMonitoring), err } -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeTiDBNGMonitorings) UpdateStatus(ctx context.Context, tiDBNGMonitoring *v1alpha1.TiDBNGMonitoring, opts v1.UpdateOptions) (*v1alpha1.TiDBNGMonitoring, error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(tidbngmonitoringsResource, "status", c.ns, tiDBNGMonitoring), &v1alpha1.TiDBNGMonitoring{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.TiDBNGMonitoring), err -} - // Delete takes name of the tiDBNGMonitoring and deletes it. Returns an error if one occurs. func (c *FakeTiDBNGMonitorings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. diff --git a/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/tidbngmonitoring.go b/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/tidbngmonitoring.go index 3442c6ff785..87b3385b998 100644 --- a/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/tidbngmonitoring.go +++ b/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/tidbngmonitoring.go @@ -37,7 +37,6 @@ type TiDBNGMonitoringsGetter interface { type TiDBNGMonitoringInterface interface { Create(ctx context.Context, tiDBNGMonitoring *v1alpha1.TiDBNGMonitoring, opts v1.CreateOptions) (*v1alpha1.TiDBNGMonitoring, error) Update(ctx context.Context, tiDBNGMonitoring *v1alpha1.TiDBNGMonitoring, opts v1.UpdateOptions) (*v1alpha1.TiDBNGMonitoring, error) - UpdateStatus(ctx context.Context, tiDBNGMonitoring *v1alpha1.TiDBNGMonitoring, opts v1.UpdateOptions) (*v1alpha1.TiDBNGMonitoring, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.TiDBNGMonitoring, error) @@ -133,22 +132,6 @@ func (c *tiDBNGMonitorings) Update(ctx context.Context, tiDBNGMonitoring *v1alph return } -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *tiDBNGMonitorings) UpdateStatus(ctx context.Context, tiDBNGMonitoring *v1alpha1.TiDBNGMonitoring, opts v1.UpdateOptions) (result *v1alpha1.TiDBNGMonitoring, err error) { - result = &v1alpha1.TiDBNGMonitoring{} - err = c.client.Put(). - Namespace(c.ns). - Resource("tidbngmonitorings"). - Name(tiDBNGMonitoring.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(tiDBNGMonitoring). - Do(ctx). - Into(result) - return -} - // Delete takes name of the tiDBNGMonitoring and deletes it. Returns an error if one occurs. func (c *tiDBNGMonitorings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). diff --git a/pkg/monitor/monitor/monitor_manager.go b/pkg/monitor/monitor/monitor_manager.go index 30fd40774a7..7725f836370 100644 --- a/pkg/monitor/monitor/monitor_manager.go +++ b/pkg/monitor/monitor/monitor_manager.go @@ -26,10 +26,10 @@ import ( "github.com/pingcap/tidb-operator/pkg/features" "github.com/pingcap/tidb-operator/pkg/manager/member" "github.com/pingcap/tidb-operator/pkg/manager/meta" + mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" "github.com/pingcap/tidb-operator/pkg/monitor" "github.com/pingcap/tidb-operator/pkg/pdapi" "github.com/pingcap/tidb-operator/pkg/util" - mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" utildiscovery "github.com/pingcap/tidb-operator/pkg/util/discovery" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" From a030ea748859efb9265ad9e11bb099d5bb1d3c5b Mon Sep 17 00:00:00 2001 From: Shiori Date: Fri, 3 Dec 2021 20:12:52 +0800 Subject: [PATCH 10/28] fix e2e --- .../tidbngmonitoring/ng_monitor_control.go | 5 +++++ tests/e2e/tidbcluster/tidbcluster.go | 13 +++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/pkg/controller/tidbngmonitoring/ng_monitor_control.go b/pkg/controller/tidbngmonitoring/ng_monitor_control.go index df6ce553bd0..c2417d01cc5 100644 --- a/pkg/controller/tidbngmonitoring/ng_monitor_control.go +++ b/pkg/controller/tidbngmonitoring/ng_monitor_control.go @@ -1,3 +1,8 @@ +// Copyright 2021 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // diff --git a/tests/e2e/tidbcluster/tidbcluster.go b/tests/e2e/tidbcluster/tidbcluster.go index 40859fedde5..6b1f7a3ce13 100644 --- a/tests/e2e/tidbcluster/tidbcluster.go +++ b/tests/e2e/tidbcluster/tidbcluster.go @@ -26,6 +26,7 @@ import ( astsHelper "github.com/pingcap/advanced-statefulset/client/apis/apps/v1/helper" asclientset "github.com/pingcap/advanced-statefulset/client/client/clientset/versioned" corev1 "k8s.io/api/core/v1" + mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" apiextensionsclientset "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset" "k8s.io/apimachinery/pkg/api/errors" apierrors "k8s.io/apimachinery/pkg/api/errors" @@ -639,7 +640,7 @@ var _ = ginkgo.Describe("TiDBCluster", func() { return false, nil } - cmName := member.FindConfigMapVolume(&pumpSet.Spec.Template.Spec, func(name string) bool { + cmName := mngerutils.FindConfigMapVolume(&pumpSet.Spec.Template.Spec, func(name string) bool { return strings.HasPrefix(name, controller.PumpMemberName(tc.Name)) }) if cmName == "" { @@ -768,7 +769,7 @@ var _ = ginkgo.Describe("TiDBCluster", func() { if err != nil { return false, err } - cmName := member.FindConfigMapVolume(&newSet.Spec.Template.Spec, func(name string) bool { + cmName := mngerutils.FindConfigMapVolume(&newSet.Spec.Template.Spec, func(name string) bool { return strings.HasPrefix(name, setName) }) if cmName == "" { @@ -1644,7 +1645,7 @@ var _ = ginkgo.Describe("TiDBCluster", func() { return false, err } - cdcCmName = member.FindConfigMapVolume(&cdcSts.Spec.Template.Spec, func(name string) bool { + cdcCmName = mngerutils.FindConfigMapVolume(&cdcSts.Spec.Template.Spec, func(name string) bool { return strings.HasPrefix(name, controller.TiCDCMemberName(fromTc.Name)) }) @@ -2004,7 +2005,7 @@ var _ = ginkgo.Describe("TiDBCluster", func() { pdMemberName := controller.PDMemberName(tc.Name) pdSts, err := stsGetter.StatefulSets(ns).Get(context.TODO(), pdMemberName, metav1.GetOptions{}) framework.ExpectNoError(err, "failed to get StatefulSet %s/%s", ns, pdMemberName) - pdCmName := member.FindConfigMapVolume(&pdSts.Spec.Template.Spec, func(name string) bool { + pdCmName := mngerutils.FindConfigMapVolume(&pdSts.Spec.Template.Spec, func(name string) bool { return strings.HasPrefix(name, controller.PDMemberName(tc.Name)) }) pdCm, err := c.CoreV1().ConfigMaps(ns).Get(context.TODO(), pdCmName, metav1.GetOptions{}) @@ -2024,7 +2025,7 @@ var _ = ginkgo.Describe("TiDBCluster", func() { tikvMemberName := controller.TiKVMemberName(tc.Name) tikvSts, err := stsGetter.StatefulSets(ns).Get(context.TODO(), tikvMemberName, metav1.GetOptions{}) framework.ExpectNoError(err, "failed to get StatefulSet %s/%s", ns, tikvMemberName) - tikvCmName := member.FindConfigMapVolume(&tikvSts.Spec.Template.Spec, func(name string) bool { + tikvCmName := mngerutils.FindConfigMapVolume(&tikvSts.Spec.Template.Spec, func(name string) bool { return strings.HasPrefix(name, controller.TiKVMemberName(tc.Name)) }) tikvCm, err := c.CoreV1().ConfigMaps(ns).Get(context.TODO(), tikvCmName, metav1.GetOptions{}) @@ -2044,7 +2045,7 @@ var _ = ginkgo.Describe("TiDBCluster", func() { tidbMemberName := controller.TiDBMemberName(tc.Name) tidbSts, err := stsGetter.StatefulSets(ns).Get(context.TODO(), tidbMemberName, metav1.GetOptions{}) framework.ExpectNoError(err, "failed to get StatefulSet %s/%s", ns, tidbMemberName) - tidbCmName := member.FindConfigMapVolume(&tidbSts.Spec.Template.Spec, func(name string) bool { + tidbCmName := mngerutils.FindConfigMapVolume(&tidbSts.Spec.Template.Spec, func(name string) bool { return strings.HasPrefix(name, controller.TiDBMemberName(tc.Name)) }) tidbCm, err := c.CoreV1().ConfigMaps(ns).Get(context.TODO(), tidbCmName, metav1.GetOptions{}) From fae9062be9d2ed9a018f81ae57e3f893c91ebb49 Mon Sep 17 00:00:00 2001 From: Shiori Date: Fri, 3 Dec 2021 20:34:53 +0800 Subject: [PATCH 11/28] fix lint --- pkg/controller/tidbngmonitoring/ng_monitor_control.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/controller/tidbngmonitoring/ng_monitor_control.go b/pkg/controller/tidbngmonitoring/ng_monitor_control.go index c2417d01cc5..a37f05273fe 100644 --- a/pkg/controller/tidbngmonitoring/ng_monitor_control.go +++ b/pkg/controller/tidbngmonitoring/ng_monitor_control.go @@ -100,7 +100,7 @@ func (c *defaultTiDBNGMonitoringControl) reconcile(tngm *v1alpha1.TiDBNGMonitori return nil } - // reoncile recliam policy of pvc + // reoncile reclaim policy of pvc err := c.reclaimPolicyManager.SyncTiDBNGMonitoring(tngm) if err != nil { return err From 3f2231933ef8154bd4d1967582a0b59f3622c478 Mon Sep 17 00:00:00 2001 From: Shiori Date: Fri, 3 Dec 2021 20:50:03 +0800 Subject: [PATCH 12/28] fix lint --- pkg/manager/tidbngmonitoring/ng_monitoring_manager.go | 4 ---- tests/e2e/tidbcluster/tidbcluster.go | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/pkg/manager/tidbngmonitoring/ng_monitoring_manager.go b/pkg/manager/tidbngmonitoring/ng_monitoring_manager.go index 6541b55e832..b4b45fd143e 100644 --- a/pkg/manager/tidbngmonitoring/ng_monitoring_manager.go +++ b/pkg/manager/tidbngmonitoring/ng_monitoring_manager.go @@ -39,10 +39,6 @@ const ( ngmConfigMapConfigKey = "ng-monitoring-config" // the key for config data in config map - // pdClusterCertPath is where the cert for inter-cluster communication stored (if any) - pdClusterCertPath = "/var/lib/pd-tls" - tidbClientCertPath = "/var/lib/tidb-client-tls" - ngmServicePort = 12020 ) diff --git a/tests/e2e/tidbcluster/tidbcluster.go b/tests/e2e/tidbcluster/tidbcluster.go index 6b1f7a3ce13..9713e5eb507 100644 --- a/tests/e2e/tidbcluster/tidbcluster.go +++ b/tests/e2e/tidbcluster/tidbcluster.go @@ -26,7 +26,6 @@ import ( astsHelper "github.com/pingcap/advanced-statefulset/client/apis/apps/v1/helper" asclientset "github.com/pingcap/advanced-statefulset/client/client/clientset/versioned" corev1 "k8s.io/api/core/v1" - mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" apiextensionsclientset "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset" "k8s.io/apimachinery/pkg/api/errors" apierrors "k8s.io/apimachinery/pkg/api/errors" @@ -57,6 +56,7 @@ import ( "github.com/pingcap/tidb-operator/pkg/monitor/monitor" "github.com/pingcap/tidb-operator/pkg/scheme" "github.com/pingcap/tidb-operator/tests" + mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" e2econfig "github.com/pingcap/tidb-operator/tests/e2e/config" e2eframework "github.com/pingcap/tidb-operator/tests/e2e/framework" utilginkgo "github.com/pingcap/tidb-operator/tests/e2e/util/ginkgo" From 76821333d445b31ebb0aace393577bb7cc047cc3 Mon Sep 17 00:00:00 2001 From: Shiori Date: Fri, 3 Dec 2021 21:50:47 +0800 Subject: [PATCH 13/28] fix lint --- tests/e2e/tidbcluster/tidbcluster.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/tidbcluster/tidbcluster.go b/tests/e2e/tidbcluster/tidbcluster.go index 9713e5eb507..98d18ad466d 100644 --- a/tests/e2e/tidbcluster/tidbcluster.go +++ b/tests/e2e/tidbcluster/tidbcluster.go @@ -53,10 +53,10 @@ import ( "github.com/pingcap/tidb-operator/pkg/controller" "github.com/pingcap/tidb-operator/pkg/features" "github.com/pingcap/tidb-operator/pkg/manager/member" + mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" "github.com/pingcap/tidb-operator/pkg/monitor/monitor" "github.com/pingcap/tidb-operator/pkg/scheme" "github.com/pingcap/tidb-operator/tests" - mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" e2econfig "github.com/pingcap/tidb-operator/tests/e2e/config" e2eframework "github.com/pingcap/tidb-operator/tests/e2e/framework" utilginkgo "github.com/pingcap/tidb-operator/tests/e2e/util/ginkgo" From 66aed7db692e23c9fffefad0e4f78c7cd973eadf Mon Sep 17 00:00:00 2001 From: Shiori Date: Mon, 6 Dec 2021 15:47:08 +0800 Subject: [PATCH 14/28] add Pod Name ENV --- pkg/apis/pingcap/v1alpha1/tidbngmonitoring_types.go | 2 +- pkg/manager/tidbngmonitoring/ng_monitoring_manager.go | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/pkg/apis/pingcap/v1alpha1/tidbngmonitoring_types.go b/pkg/apis/pingcap/v1alpha1/tidbngmonitoring_types.go index 6205f3f80af..5c59fcded41 100644 --- a/pkg/apis/pingcap/v1alpha1/tidbngmonitoring_types.go +++ b/pkg/apis/pingcap/v1alpha1/tidbngmonitoring_types.go @@ -103,7 +103,7 @@ type NGMonitoringSpec struct { // Defaults to Kubernetes default storage class. StorageClassName *string `json:"storageClassName,omitempty"` - // StorageVolumes configure additional storage for NG Monitoring pods. + // StorageVolumes configures additional storage for NG Monitoring pods. StorageVolumes []StorageVolume `json:"storageVolumes,omitempty"` // Config is the configuration of ng monitoring diff --git a/pkg/manager/tidbngmonitoring/ng_monitoring_manager.go b/pkg/manager/tidbngmonitoring/ng_monitoring_manager.go index b4b45fd143e..0d737be92f7 100644 --- a/pkg/manager/tidbngmonitoring/ng_monitoring_manager.go +++ b/pkg/manager/tidbngmonitoring/ng_monitoring_manager.go @@ -297,6 +297,14 @@ func GenerateNGMonitoringStatefulSet(tngm *v1alpha1.TiDBNGMonitoring, cm *corev1 Name: "HEADLESS_SERVICE_NAME", Value: headlessServiceName, }, + { + Name: "POD_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, }, }) baseVolumes := []corev1.Volume{ From 593044449f93d92bcce0153ecb5334d410885d10 Mon Sep 17 00:00:00 2001 From: Shiori Date: Tue, 7 Dec 2021 10:36:39 +0800 Subject: [PATCH 15/28] optimize code --- pkg/apis/pingcap/v1alpha1/tidbngmonitoring_types.go | 2 +- pkg/manager/tidbngmonitoring/ng_monitoring_manager.go | 10 ++-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/pkg/apis/pingcap/v1alpha1/tidbngmonitoring_types.go b/pkg/apis/pingcap/v1alpha1/tidbngmonitoring_types.go index 5c59fcded41..db96d53d001 100644 --- a/pkg/apis/pingcap/v1alpha1/tidbngmonitoring_types.go +++ b/pkg/apis/pingcap/v1alpha1/tidbngmonitoring_types.go @@ -72,7 +72,7 @@ type TiDBNGMonitoringSpec struct { // Paused pause controller if it is true Paused bool `json:"paused,omitempty"` - // Persistent volume reclaim policy applied to the PVs that consumed by TiDB cluster + // Persistent volume reclaim policy applied to the PVs that consumed by tidb ng monitoring // // +kubebuilder:default=Retain PVReclaimPolicy *corev1.PersistentVolumeReclaimPolicy `json:"pvReclaimPolicy,omitempty"` diff --git a/pkg/manager/tidbngmonitoring/ng_monitoring_manager.go b/pkg/manager/tidbngmonitoring/ng_monitoring_manager.go index 0d737be92f7..afd64fb3f77 100644 --- a/pkg/manager/tidbngmonitoring/ng_monitoring_manager.go +++ b/pkg/manager/tidbngmonitoring/ng_monitoring_manager.go @@ -73,7 +73,7 @@ func (m *ngMonitoringManager) syncService(tngm *v1alpha1.TiDBNGMonitoring) error name := tngm.GetName() if tngm.Spec.Paused { - klog.V(4).Infof("tikv cluster %s/%s is paused, skip syncing for ng monitoring headless service", ns, name) + klog.V(4).Infof("tidb ng monitoring %s/%s is paused, skip syncing for ng monitoring headless service", ns, name) return nil } @@ -99,19 +99,13 @@ func (m *ngMonitoringManager) syncService(tngm *v1alpha1.TiDBNGMonitoring) error if err != nil { return err } - isOrphan := metav1.GetControllerOf(oldSvc) == nil - if !equal || isOrphan { + if !equal { svc := *oldSvc svc.Spec = newSvc.Spec err = controller.SetServiceLastAppliedConfigAnnotation(&svc) if err != nil { return err } - // Adopt headless-service created by helm - if isOrphan { - svc.OwnerReferences = newSvc.OwnerReferences - svc.Labels = newSvc.Labels - } _, err = m.deps.ServiceControl.UpdateService(tngm, &svc) return err } From 139bc5dc81cd59bdda9a7d3c10011da162dbeed5 Mon Sep 17 00:00:00 2001 From: Shiori Date: Tue, 7 Dec 2021 10:46:41 +0800 Subject: [PATCH 16/28] modify start script to support cluster domain --- .../v1alpha1/tidbngmonitoring_types.go | 3 +++ .../tidbngmonitoring/ng_monitoring_manager.go | 9 ++++++--- pkg/manager/tidbngmonitoring/start_script.go | 20 +++++++++++++++---- 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/pkg/apis/pingcap/v1alpha1/tidbngmonitoring_types.go b/pkg/apis/pingcap/v1alpha1/tidbngmonitoring_types.go index db96d53d001..076dd23da05 100644 --- a/pkg/apis/pingcap/v1alpha1/tidbngmonitoring_types.go +++ b/pkg/apis/pingcap/v1alpha1/tidbngmonitoring_types.go @@ -77,6 +77,9 @@ type TiDBNGMonitoringSpec struct { // +kubebuilder:default=Retain PVReclaimPolicy *corev1.PersistentVolumeReclaimPolicy `json:"pvReclaimPolicy,omitempty"` + // ClusterDomain is the Kubernetes Cluster Domain of tidb ng monitoring + ClusterDomain string `json:"clusterDomain,omitempty"` + // NGMonitoring is spec of ng monitoring NGMonitoring NGMonitoringSpec `json:"ngMonitoring"` } diff --git a/pkg/manager/tidbngmonitoring/ng_monitoring_manager.go b/pkg/manager/tidbngmonitoring/ng_monitoring_manager.go index afd64fb3f77..3da5d7707cf 100644 --- a/pkg/manager/tidbngmonitoring/ng_monitoring_manager.go +++ b/pkg/manager/tidbngmonitoring/ng_monitoring_manager.go @@ -462,9 +462,12 @@ func GenerateNGMonitoringStartScript(tngm *v1alpha1.TiDBNGMonitoring) (string, e tcRef := tngm.Spec.Clusters[0] model := &NGMonitoringStartScriptModel{ - TCName: tcRef.Name, - TCNamespace: tcRef.Namespace, - TCClusterDomain: tcRef.ClusterDomain, + TCName: tcRef.Name, + TCNamespace: tcRef.Namespace, + TCClusterDomain: tcRef.ClusterDomain, + TNGMName: tngm.Name, + TNGMNamespace: tngm.Namespace, + TNGMClusterDomain: tngm.Spec.ClusterDomain, } script, err := model.RenderStartScript() diff --git a/pkg/manager/tidbngmonitoring/start_script.go b/pkg/manager/tidbngmonitoring/start_script.go index c25207aa3d3..b5dc0b60dc9 100644 --- a/pkg/manager/tidbngmonitoring/start_script.go +++ b/pkg/manager/tidbngmonitoring/start_script.go @@ -26,8 +26,9 @@ type NGMonitoringStartScriptModel struct { TCNamespace string // namespace of tidb cluster's namespace TCClusterDomain string // cluster domain of tidb cluster - TNGMName string // name of tidb ng monitoring - TNGMNamespace string // namespace of tidb ng monitoring + TNGMName string // name of tidb ng monitoring + TNGMNamespace string // namespace of tidb ng monitoring + TNGMClusterDomain string // cluster domain of tidb ng monitoring } func (m *NGMonitoringStartScriptModel) FormatClusterDomain() string { @@ -39,6 +40,7 @@ func (m *NGMonitoringStartScriptModel) FormatClusterDomain() string { func (m *NGMonitoringStartScriptModel) PDAddress() string { // don't need add scheme, ng monitoring will use https if cert is configured + // TODO: support across kubernetes return fmt.Sprintf("%s.%s:2379", controller.PDMemberName(m.TCName), m.TCNamespace) } @@ -46,10 +48,20 @@ func (m *NGMonitoringStartScriptModel) RenderStartScript() (string, error) { return renderTemplateFunc(ngMonitoringStartScriptTpl, m) } -// TODO: Find a better method to start +func (m *NGMonitoringStartScriptModel) NGMPeerAddress() string { + headlessSvc := NGMonitoringHeadlessServiceName(m.TNGMName) + ns := m.TNGMNamespace + clusterDomain := m.TNGMClusterDomain + + if clusterDomain == "" { + return fmt.Sprintf("${POD_NAME}.%s.%s:12020", headlessSvc, ns) + } + return fmt.Sprintf("${POD_NAME}.%s.%s.svc.%s:12020", headlessSvc, m.TNGMNamespace, clusterDomain) +} + var ngMonitoringStartScriptTpl = template.Must(template.New("ng-monitoring-start-script").Parse(`/ng-monitoring-server \ --pd.endpoints {{ .PDAddress }} \ - --advertise-address ${POD_NAME}.${HEADLESS_SERVICE_NAME}:12020 \ + --advertise-address {{ .NGMPeerAddress }} \ --config /etc/ng-monitoring/ng-monitoring.toml \ --storage.path /var/lib/ng-monitoring `)) From ae977a582ba4adbaa7ff72dbeee76741390e79d7 Mon Sep 17 00:00:00 2001 From: Shiori Date: Tue, 7 Dec 2021 16:11:01 +0800 Subject: [PATCH 17/28] Change CR name to TidbNGMonitoring --- pkg/apis/pingcap/v1alpha1/crd_kinds.go | 2 +- pkg/apis/pingcap/v1alpha1/register.go | 4 +-- pkg/apis/pingcap/v1alpha1/tidbngmonitoring.go | 4 +-- .../v1alpha1/tidbngmonitoring_component.go | 4 +-- .../v1alpha1/tidbngmonitoring_types.go | 22 +++++++------- .../tidbngmonitoring/ng_monitor_control.go | 29 +++++++++---------- .../tidbngmonitoring/ng_monitor_controller.go | 10 +++---- pkg/manager/manager.go | 2 +- pkg/manager/meta/reclaim_policy_manager.go | 2 +- .../tidbngmonitoring/ng_monitoring_manager.go | 22 +++++++------- 10 files changed, 50 insertions(+), 51 deletions(-) diff --git a/pkg/apis/pingcap/v1alpha1/crd_kinds.go b/pkg/apis/pingcap/v1alpha1/crd_kinds.go index 3c558d672ce..dc03fbd3665 100644 --- a/pkg/apis/pingcap/v1alpha1/crd_kinds.go +++ b/pkg/apis/pingcap/v1alpha1/crd_kinds.go @@ -54,7 +54,7 @@ const ( TidbClusterAutoScalerKindKey = "tidbclusterautoscaler" TiDBNGMonitoringName = "tidbngmonitorings" - TiDBNGMonitoringKind = "TiDBNGMonitoring" + TiDBNGMonitoringKind = "TidbNGMonitoring" TiDBNGMonitoringKindKey = "tidbngmonitoring" SpecPath = "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1." diff --git a/pkg/apis/pingcap/v1alpha1/register.go b/pkg/apis/pingcap/v1alpha1/register.go index 8a54d1e3476..676aa948ed9 100644 --- a/pkg/apis/pingcap/v1alpha1/register.go +++ b/pkg/apis/pingcap/v1alpha1/register.go @@ -68,8 +68,8 @@ func addKnownTypes(scheme *runtime.Scheme) error { &TidbClusterAutoScalerList{}, &DMCluster{}, &DMClusterList{}, - &TiDBNGMonitoring{}, - &TiDBNGMonitoringList{}, + &TidbNGMonitoring{}, + &TidbNGMonitoringList{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) diff --git a/pkg/apis/pingcap/v1alpha1/tidbngmonitoring.go b/pkg/apis/pingcap/v1alpha1/tidbngmonitoring.go index af8d28583ff..4995e036a10 100644 --- a/pkg/apis/pingcap/v1alpha1/tidbngmonitoring.go +++ b/pkg/apis/pingcap/v1alpha1/tidbngmonitoring.go @@ -15,12 +15,12 @@ package v1alpha1 import "fmt" -func (tngm *TiDBNGMonitoring) GetInstanceName() string { +func (tngm *TidbNGMonitoring) GetInstanceName() string { return tngm.Name } // NGMonitoringImage return the image used by NGMonitoring. -func (tngm *TiDBNGMonitoring) NGMonitoringImage() string { +func (tngm *TidbNGMonitoring) NGMonitoringImage() string { image := tngm.Spec.NGMonitoring.Image baseImage := tngm.Spec.NGMonitoring.BaseImage // base image takes higher priority diff --git a/pkg/apis/pingcap/v1alpha1/tidbngmonitoring_component.go b/pkg/apis/pingcap/v1alpha1/tidbngmonitoring_component.go index f30f42b675d..9b1d9bf757a 100644 --- a/pkg/apis/pingcap/v1alpha1/tidbngmonitoring_component.go +++ b/pkg/apis/pingcap/v1alpha1/tidbngmonitoring_component.go @@ -13,11 +13,11 @@ package v1alpha1 -func (tngm *TiDBNGMonitoring) BaseNGMonitoringSpec() ComponentAccessor { +func (tngm *TidbNGMonitoring) BaseNGMonitoringSpec() ComponentAccessor { return buildTiDBNGMonitoringComponentAccessor(ComponentNGMonitoring, tngm, &tngm.Spec.NGMonitoring.ComponentSpec) } -func buildTiDBNGMonitoringComponentAccessor(c Component, tngm *TiDBNGMonitoring, componentSpec *ComponentSpec) ComponentAccessor { +func buildTiDBNGMonitoringComponentAccessor(c Component, tngm *TidbNGMonitoring, componentSpec *ComponentSpec) ComponentAccessor { commonSpec := tngm.Spec.ComponentSpec impl := &componentAccessorImpl{ name: tngm.GetName(), diff --git a/pkg/apis/pingcap/v1alpha1/tidbngmonitoring_types.go b/pkg/apis/pingcap/v1alpha1/tidbngmonitoring_types.go index 076dd23da05..aec6b517b0e 100644 --- a/pkg/apis/pingcap/v1alpha1/tidbngmonitoring_types.go +++ b/pkg/apis/pingcap/v1alpha1/tidbngmonitoring_types.go @@ -20,45 +20,45 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) -// TiDBNGMonitoring contains the spec and status of tidb ng monitor +// TidbNGMonitoring contains the spec and status of tidb ng monitor // // +genclient // +genclient:noStatus // +k8s:openapi-gen=true // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +kubebuilder:resource:shortName="tngm" -type TiDBNGMonitoring struct { +type TidbNGMonitoring struct { metav1.TypeMeta `json:",inline"` // +k8s:openapi-gen=false metav1.ObjectMeta `json:"metadata"` // Spec contains all spec about tidb ng monitor - Spec TiDBNGMonitoringSpec `json:"spec"` + Spec TidbNGMonitoringSpec `json:"spec"` // Status is most recently observed status of tidb ng monitor // // +k8s:openapi-gen=false - Status TiDBNGMonitoringStatus `json:"status,omitempty"` + Status TidbNGMonitoringStatus `json:"status,omitempty"` } -// TiDBNGMonitoringList is TiDBNGMonitoring list +// TiDBNGMonitoringList is TidbNGMonitoring list // // +k8s:openapi-gen=true // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -type TiDBNGMonitoringList struct { +type TidbNGMonitoringList struct { metav1.TypeMeta `json:",inline"` // +k8s:openapi-gen=false metav1.ListMeta `json:"metadata"` - Items []TiDBNGMonitoring `json:"items"` + Items []TidbNGMonitoring `json:"items"` } -// TiDBNGMonitoringSpec is spec of tidb ng monitoring +// TidbNGMonitoringSpec is spec of tidb ng monitoring // // +k8s:openapi-gen=true -type TiDBNGMonitoringSpec struct { +type TidbNGMonitoringSpec struct { // ComponentSpec is common spec. // NOTE: the same field will be overridden by component's spec. ComponentSpec `json:",inline"` @@ -84,8 +84,8 @@ type TiDBNGMonitoringSpec struct { NGMonitoring NGMonitoringSpec `json:"ngMonitoring"` } -// TiDBNGMonitoringStatus is status of tidb ng monitoring -type TiDBNGMonitoringStatus struct { +// TidbNGMonitoringStatus is status of tidb ng monitoring +type TidbNGMonitoringStatus struct { // NGMonitoring is status of ng monitoring NGMonitoring NGMonitoringStatus `json:"ngMonitoring,omitempty"` } diff --git a/pkg/controller/tidbngmonitoring/ng_monitor_control.go b/pkg/controller/tidbngmonitoring/ng_monitor_control.go index a37f05273fe..f11208600dc 100644 --- a/pkg/controller/tidbngmonitoring/ng_monitor_control.go +++ b/pkg/controller/tidbngmonitoring/ng_monitor_control.go @@ -30,23 +30,22 @@ import ( ) const ( - // Event Type EventTypeFailedSync = "FailedSync" EventTypeSuccessSync = "SuccessSync" ) type ReclaimPolicyManager interface { - SyncTiDBNGMonitoring(monitor *v1alpha1.TiDBNGMonitoring) error + SyncTiDBNGMonitoring(monitor *v1alpha1.TidbNGMonitoring) error } -// ControlInterface provide function about control TiDBNGMonitoring +// ControlInterface provide function about control TidbNGMonitoring type ControlInterface interface { - // Reconcile a TiDBNGMonitoring - Reconcile(*v1alpha1.TiDBNGMonitoring) error + // Reconcile a TidbNGMonitoring + Reconcile(*v1alpha1.TidbNGMonitoring) error - // Update a TiDBNGMonitoring - Update(*v1alpha1.TiDBNGMonitoring) (*v1alpha1.TiDBNGMonitoring, error) + // Update a TidbNGMonitoring + Update(*v1alpha1.TidbNGMonitoring) (*v1alpha1.TidbNGMonitoring, error) } func NewDefaultTiDBNGMonitoringControl( @@ -69,7 +68,7 @@ type defaultTiDBNGMonitoringControl struct { reclaimPolicyManager ReclaimPolicyManager } -func (c *defaultTiDBNGMonitoringControl) Reconcile(tngm *v1alpha1.TiDBNGMonitoring) error { +func (c *defaultTiDBNGMonitoringControl) Reconcile(tngm *v1alpha1.TidbNGMonitoring) error { // TODO: default and validate var errs []error @@ -95,7 +94,7 @@ func (c *defaultTiDBNGMonitoringControl) Reconcile(tngm *v1alpha1.TiDBNGMonitori return errorutils.NewAggregate(errs) } -func (c *defaultTiDBNGMonitoringControl) reconcile(tngm *v1alpha1.TiDBNGMonitoring) error { +func (c *defaultTiDBNGMonitoringControl) reconcile(tngm *v1alpha1.TidbNGMonitoring) error { if tngm.DeletionTimestamp != nil { return nil } @@ -115,12 +114,12 @@ func (c *defaultTiDBNGMonitoringControl) reconcile(tngm *v1alpha1.TiDBNGMonitori return nil } -func (c *defaultTiDBNGMonitoringControl) Update(tngm *v1alpha1.TiDBNGMonitoring) (*v1alpha1.TiDBNGMonitoring, error) { +func (c *defaultTiDBNGMonitoringControl) Update(tngm *v1alpha1.TidbNGMonitoring) (*v1alpha1.TidbNGMonitoring, error) { var ( ns string = tngm.GetNamespace() name string = tngm.GetName() - status *v1alpha1.TiDBNGMonitoringStatus = tngm.Status.DeepCopy() - update *v1alpha1.TiDBNGMonitoring + status *v1alpha1.TidbNGMonitoringStatus = tngm.Status.DeepCopy() + update *v1alpha1.TidbNGMonitoring ) // don't wait due to limited number of clients, but backoff after the default number of steps @@ -129,18 +128,18 @@ func (c *defaultTiDBNGMonitoringControl) Update(tngm *v1alpha1.TiDBNGMonitoring) update, updateErr = c.deps.Clientset.PingcapV1alpha1().TiDBNGMonitorings(ns).Update(context.TODO(), tngm, metav1.UpdateOptions{}) if updateErr == nil { - klog.Infof("TiDBNGMonitoring: [%s/%s] updated successfully", ns, name) + klog.Infof("TidbNGMonitoring: [%s/%s] updated successfully", ns, name) return nil } - klog.V(4).Infof("failed to update TiDBNGMonitoring: [%s/%s], error: %v", ns, name, updateErr) + klog.V(4).Infof("failed to update TidbNGMonitoring: [%s/%s], error: %v", ns, name, updateErr) if updated, err := c.deps.TiDBNGMonitoringLister.TiDBNGMonitorings(ns).Get(name); err == nil { // make a copy so we don't mutate the shared cache tngm = updated.DeepCopy() tngm.Status = *status } else { - utilruntime.HandleError(fmt.Errorf("error getting updated TiDBNGMonitoring %s/%s from lister: %v", ns, name, err)) + utilruntime.HandleError(fmt.Errorf("error getting updated TidbNGMonitoring %s/%s from lister: %v", ns, name, err)) } return updateErr diff --git a/pkg/controller/tidbngmonitoring/ng_monitor_controller.go b/pkg/controller/tidbngmonitoring/ng_monitor_controller.go index a269cba5868..50331ffe858 100644 --- a/pkg/controller/tidbngmonitoring/ng_monitor_controller.go +++ b/pkg/controller/tidbngmonitoring/ng_monitor_controller.go @@ -31,7 +31,7 @@ import ( "k8s.io/klog" ) -// Controller sync TiDBNGMonitoring +// Controller sync TidbNGMonitoring type Controller struct { deps *controller.Dependencies control ControlInterface @@ -99,9 +99,9 @@ func (c *Controller) processNextWorkItem() bool { err := c.sync(key) if err != nil { if perrors.Find(err, controller.IsRequeueError) != nil { - klog.Infof("TiDBNGMonitoring %v still need sync: %v, requeuing", key, err) + klog.Infof("TidbNGMonitoring %v still need sync: %v, requeuing", key, err) } else { - utilruntime.HandleError(fmt.Errorf("TiDBNGMonitoring %v sync failed, err: %v", key, err)) + utilruntime.HandleError(fmt.Errorf("TidbNGMonitoring %v sync failed, err: %v", key, err)) } c.queue.AddRateLimited(key) } else { @@ -114,7 +114,7 @@ func (c *Controller) processNextWorkItem() bool { func (c *Controller) sync(key string) error { startTime := time.Now() defer func() { - klog.V(4).Infof("Finished syncing TiDBNGMonitoring %s (%v)", key, time.Since(startTime)) + klog.V(4).Infof("Finished syncing TidbNGMonitoring %s (%v)", key, time.Since(startTime)) }() ns, name, err := cache.SplitMetaNamespaceKey(key) @@ -124,7 +124,7 @@ func (c *Controller) sync(key string) error { tngm, err := c.deps.TiDBNGMonitoringLister.TiDBNGMonitorings(ns).Get(name) if errors.IsNotFound(err) { - klog.Infof("TiDBNGMonitoring %s has been deleted", key) + klog.Infof("TidbNGMonitoring %s has been deleted", key) return nil } if err != nil { diff --git a/pkg/manager/manager.go b/pkg/manager/manager.go index a90ce1b188e..63630db8654 100644 --- a/pkg/manager/manager.go +++ b/pkg/manager/manager.go @@ -29,5 +29,5 @@ type DMManager interface { } type TiDBNGMonitoringManager interface { - Sync(*v1alpha1.TiDBNGMonitoring) error + Sync(*v1alpha1.TidbNGMonitoring) error } diff --git a/pkg/manager/meta/reclaim_policy_manager.go b/pkg/manager/meta/reclaim_policy_manager.go index ba4561339fc..5feefaee157 100644 --- a/pkg/manager/meta/reclaim_policy_manager.go +++ b/pkg/manager/meta/reclaim_policy_manager.go @@ -46,7 +46,7 @@ func (m *reclaimPolicyManager) SyncMonitor(tm *v1alpha1.TidbMonitor) error { return m.sync(v1alpha1.TiDBMonitorKind, tm, false, *tm.Spec.PVReclaimPolicy) } -func (m *reclaimPolicyManager) SyncTiDBNGMonitoring(tngm *v1alpha1.TiDBNGMonitoring) error { +func (m *reclaimPolicyManager) SyncTiDBNGMonitoring(tngm *v1alpha1.TidbNGMonitoring) error { return m.sync(v1alpha1.TiDBNGMonitoringKind, tngm, false, *tngm.Spec.PVReclaimPolicy) } diff --git a/pkg/manager/tidbngmonitoring/ng_monitoring_manager.go b/pkg/manager/tidbngmonitoring/ng_monitoring_manager.go index 3da5d7707cf..d74c5832859 100644 --- a/pkg/manager/tidbngmonitoring/ng_monitoring_manager.go +++ b/pkg/manager/tidbngmonitoring/ng_monitoring_manager.go @@ -52,7 +52,7 @@ func NewNGMonitorManager(deps *controller.Dependencies) manager.TiDBNGMonitoring } } -func (m *ngMonitoringManager) Sync(tngm *v1alpha1.TiDBNGMonitoring) error { +func (m *ngMonitoringManager) Sync(tngm *v1alpha1.TidbNGMonitoring) error { var err error err = m.syncService(tngm) @@ -68,7 +68,7 @@ func (m *ngMonitoringManager) Sync(tngm *v1alpha1.TiDBNGMonitoring) error { return nil } -func (m *ngMonitoringManager) syncService(tngm *v1alpha1.TiDBNGMonitoring) error { +func (m *ngMonitoringManager) syncService(tngm *v1alpha1.TidbNGMonitoring) error { ns := tngm.GetNamespace() name := tngm.GetName() @@ -113,7 +113,7 @@ func (m *ngMonitoringManager) syncService(tngm *v1alpha1.TiDBNGMonitoring) error return nil } -func (m *ngMonitoringManager) syncCore(tngm *v1alpha1.TiDBNGMonitoring) error { +func (m *ngMonitoringManager) syncCore(tngm *v1alpha1.TidbNGMonitoring) error { ns := tngm.GetNamespace() name := tngm.GetName() @@ -163,7 +163,7 @@ func (m *ngMonitoringManager) syncCore(tngm *v1alpha1.TiDBNGMonitoring) error { return mngerutils.UpdateStatefulSet(m.deps.StatefulSetControl, tngm, newSts, oldSts) } -func (m *ngMonitoringManager) syncConfigMap(tngm *v1alpha1.TiDBNGMonitoring, sts *apps.StatefulSet) (*corev1.ConfigMap, error) { +func (m *ngMonitoringManager) syncConfigMap(tngm *v1alpha1.TidbNGMonitoring, sts *apps.StatefulSet) (*corev1.ConfigMap, error) { spec := tngm.BaseNGMonitoringSpec() newCM, err := GenerateNGMonitoringConfigMap(tngm) @@ -186,7 +186,7 @@ func (m *ngMonitoringManager) syncConfigMap(tngm *v1alpha1.TiDBNGMonitoring, sts return m.deps.TypedControl.CreateOrUpdateConfigMap(tngm, newCM) } -func (m *ngMonitoringManager) populateStatus(tngm *v1alpha1.TiDBNGMonitoring, sts *apps.StatefulSet) error { +func (m *ngMonitoringManager) populateStatus(tngm *v1alpha1.TidbNGMonitoring, sts *apps.StatefulSet) error { if sts == nil { return nil // skip if not created yet } @@ -209,7 +209,7 @@ func (m *ngMonitoringManager) populateStatus(tngm *v1alpha1.TiDBNGMonitoring, st return nil } -func (m *ngMonitoringManager) confirmStatefulSetIsUpgrading(tngm *v1alpha1.TiDBNGMonitoring, oldSts *apps.StatefulSet) (bool, error) { +func (m *ngMonitoringManager) confirmStatefulSetIsUpgrading(tngm *v1alpha1.TidbNGMonitoring, oldSts *apps.StatefulSet) (bool, error) { if mngerutils.StatefulSetIsUpgrading(oldSts) { return true, nil } @@ -239,7 +239,7 @@ func (m *ngMonitoringManager) confirmStatefulSetIsUpgrading(tngm *v1alpha1.TiDBN return false, nil } -func GenerateNGMonitoringStatefulSet(tngm *v1alpha1.TiDBNGMonitoring, cm *corev1.ConfigMap) (*apps.StatefulSet, error) { +func GenerateNGMonitoringStatefulSet(tngm *v1alpha1.TidbNGMonitoring, cm *corev1.ConfigMap) (*apps.StatefulSet, error) { ns := tngm.GetNamespace() name := tngm.GetName() @@ -392,7 +392,7 @@ func GenerateNGMonitoringStatefulSet(tngm *v1alpha1.TiDBNGMonitoring, cm *corev1 } // GenerateNGMonitoringConfigMap generate ConfigMap from tidb ng monitoring -func GenerateNGMonitoringConfigMap(tngm *v1alpha1.TiDBNGMonitoring) (*corev1.ConfigMap, error) { +func GenerateNGMonitoringConfigMap(tngm *v1alpha1.TidbNGMonitoring) (*corev1.ConfigMap, error) { config := tngm.Spec.NGMonitoring.Config meta, _ := GenerateNGMonitoringMeta(tngm, controller.NGMonitoringName) @@ -419,7 +419,7 @@ func GenerateNGMonitoringConfigMap(tngm *v1alpha1.TiDBNGMonitoring) (*corev1.Con } // GenerateNGMonitoringMeta build ObjectMeta and Label for ng monitoring -func GenerateNGMonitoringMeta(tngm *v1alpha1.TiDBNGMonitoring, nameFunc func(string) string) (metav1.ObjectMeta, label.Label) { +func GenerateNGMonitoringMeta(tngm *v1alpha1.TidbNGMonitoring, nameFunc func(string) string) (metav1.ObjectMeta, label.Label) { instanceName := tngm.GetInstanceName() label := label.NewTiDBNGMonitoring().Instance(instanceName).NGMonitoring() @@ -433,7 +433,7 @@ func GenerateNGMonitoringMeta(tngm *v1alpha1.TiDBNGMonitoring, nameFunc func(str } // GenerateNGMonitoringHeadlessService build headless service for ng monitoring -func GenerateNGMonitoringHeadlessService(tngm *v1alpha1.TiDBNGMonitoring) *corev1.Service { +func GenerateNGMonitoringHeadlessService(tngm *v1alpha1.TidbNGMonitoring) *corev1.Service { meta, labels := GenerateNGMonitoringMeta(tngm, NGMonitoringHeadlessServiceName) return &corev1.Service{ @@ -454,7 +454,7 @@ func GenerateNGMonitoringHeadlessService(tngm *v1alpha1.TiDBNGMonitoring) *corev } } -func GenerateNGMonitoringStartScript(tngm *v1alpha1.TiDBNGMonitoring) (string, error) { +func GenerateNGMonitoringStartScript(tngm *v1alpha1.TidbNGMonitoring) (string, error) { if len(tngm.Spec.Clusters) < 1 { return "", fmt.Errorf("tidb cluster ref is empty") } From 362ce89f2fe559e13a1c17af6349fc3acbecbced Mon Sep 17 00:00:00 2001 From: Shiori Date: Tue, 7 Dec 2021 16:16:43 +0800 Subject: [PATCH 18/28] udpate all --- docs/api-references/docs.md | 516 ++-- manifests/crd.yaml | 6 +- .../crd/v1/pingcap.com_tidbngmonitorings.yaml | 6 +- .../crd/v1/pingcap.com_tidbngmonitors.yaml | 2352 ----------------- .../pingcap.com_tidbngmonitorings.yaml | 6 +- manifests/crd_v1beta1.yaml | 6 +- .../pingcap/v1alpha1/openapi_generated.go | 1921 +++++++------- .../pingcap/v1alpha1/zz_generated.deepcopy.go | 212 +- .../v1alpha1/fake/fake_pingcap_client.go | 8 +- .../v1alpha1/fake/fake_tidbngmonitoring.go | 62 +- .../pingcap/v1alpha1/generated_expansion.go | 4 +- .../typed/pingcap/v1alpha1/pingcap_client.go | 10 +- .../pingcap/v1alpha1/tidbngmonitoring.go | 78 +- .../informers/externalversions/generic.go | 4 +- .../pingcap/v1alpha1/interface.go | 14 +- .../pingcap/v1alpha1/tidbngmonitoring.go | 38 +- .../pingcap/v1alpha1/expansion_generated.go | 16 +- .../pingcap/v1alpha1/tidbngmonitoring.go | 66 +- 18 files changed, 1505 insertions(+), 3820 deletions(-) delete mode 100644 manifests/crd/v1/pingcap.com_tidbngmonitors.yaml diff --git a/docs/api-references/docs.md b/docs/api-references/docs.md index 2c23ba6e367..007efcd54af 100644 --- a/docs/api-references/docs.md +++ b/docs/api-references/docs.md @@ -4134,10 +4134,10 @@ and component-level overrides

    PDSpec, PumpSpec, TiCDCSpec, -TiDBNGMonitoringSpec, TiDBSpec, TiFlashSpec, TiKVSpec, +TidbNGMonitoringSpec, WorkerSpec)

    @@ -7941,7 +7941,7 @@ Kubernetes core/v1.PullPolicy

    NGMonitoringSpec

    (Appears on: -TiDBNGMonitoringSpec) +TidbNGMonitoringSpec)

    NGMonitoringSpec is spec of ng monitoring

    @@ -8017,7 +8017,7 @@ Defaults to Kubernetes default storage class.

    -

    StorageVolumes configure additional storage for NG Monitoring pods.

    +

    StorageVolumes configures additional storage for NG Monitoring pods.

    @@ -8036,7 +8036,7 @@ github.com/pingcap/tidb-operator/pkg/apis/util/config.GenericConfig

    NGMonitoringStatus

    (Appears on: -TiDBNGMonitoringStatus) +TidbNGMonitoringStatus)

    NGMonitoringStatus is latest status of ng monitoring

    @@ -14389,247 +14389,6 @@ string -

    TiDBNGMonitoring

    -

    -

    TiDBNGMonitoring contains the spec and status of tidb ng monitor

    -

    - - - - - - - - - - - - - - - - - - - - - -
    FieldDescription
    -metadata
    - - -Kubernetes meta/v1.ObjectMeta - - -
    -Refer to the Kubernetes API documentation for the fields of the -metadata field. -
    -spec
    - - -TiDBNGMonitoringSpec - - -
    -

    Spec contains all spec about tidb ng monitor

    -
    -
    - - - - - - - - - - - - - - - - - - - - - -
    -ComponentSpec
    - - -ComponentSpec - - -
    -

    -(Members of ComponentSpec are embedded into this type.) -

    -

    ComponentSpec is common spec. -NOTE: the same field will be overridden by component’s spec.

    -
    -clusters
    - - -[]TidbClusterRef - - -
    -

    Clusters reference TiDB cluster

    -
    -paused
    - -bool - -
    -

    Paused pause controller if it is true

    -
    -pvReclaimPolicy
    - - -Kubernetes core/v1.PersistentVolumeReclaimPolicy - - -
    -

    Persistent volume reclaim policy applied to the PVs that consumed by TiDB cluster

    -
    -ngMonitoring
    - - -NGMonitoringSpec - - -
    -

    NGMonitoring is spec of ng monitoring

    -
    -
    -status
    - - -TiDBNGMonitoringStatus - - -
    -

    Status is most recently observed status of tidb ng monitor

    -
    -

    TiDBNGMonitoringSpec

    -

    -(Appears on: -TiDBNGMonitoring) -

    -

    -

    TiDBNGMonitoringSpec is spec of tidb ng monitoring

    -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FieldDescription
    -ComponentSpec
    - - -ComponentSpec - - -
    -

    -(Members of ComponentSpec are embedded into this type.) -

    -

    ComponentSpec is common spec. -NOTE: the same field will be overridden by component’s spec.

    -
    -clusters
    - - -[]TidbClusterRef - - -
    -

    Clusters reference TiDB cluster

    -
    -paused
    - -bool - -
    -

    Paused pause controller if it is true

    -
    -pvReclaimPolicy
    - - -Kubernetes core/v1.PersistentVolumeReclaimPolicy - - -
    -

    Persistent volume reclaim policy applied to the PVs that consumed by TiDB cluster

    -
    -ngMonitoring
    - - -NGMonitoringSpec - - -
    -

    NGMonitoring is spec of ng monitoring

    -
    -

    TiDBNGMonitoringStatus

    -

    -(Appears on: -TiDBNGMonitoring) -

    -

    -

    TiDBNGMonitoringStatus is status of tidb ng monitoring

    -

    - - - - - - - - - - - - - -
    FieldDescription
    -ngMonitoring
    - - -NGMonitoringStatus - - -
    -

    NGMonitoring is status of ng monitoring

    -

    TiDBProbe

    (Appears on: @@ -20608,11 +20367,11 @@ string

    TidbClusterRef

    (Appears on: -TiDBNGMonitoringSpec, TidbClusterAutoScalerSpec, TidbClusterSpec, TidbInitializerSpec, -TidbMonitorSpec) +TidbMonitorSpec, +TidbNGMonitoringSpec)

    TidbClusterRef reference to a TidbCluster

    @@ -21999,6 +21758,269 @@ Kubernetes apps/v1.StatefulSetStatus +

    TidbNGMonitoring

    +

    +

    TidbNGMonitoring contains the spec and status of tidb ng monitor

    +

    + + + + + + + + + + + + + + + + + + + + + +
    FieldDescription
    +metadata
    + + +Kubernetes meta/v1.ObjectMeta + + +
    +Refer to the Kubernetes API documentation for the fields of the +metadata field. +
    +spec
    + + +TidbNGMonitoringSpec + + +
    +

    Spec contains all spec about tidb ng monitor

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    +ComponentSpec
    + + +ComponentSpec + + +
    +

    +(Members of ComponentSpec are embedded into this type.) +

    +

    ComponentSpec is common spec. +NOTE: the same field will be overridden by component’s spec.

    +
    +clusters
    + + +[]TidbClusterRef + + +
    +

    Clusters reference TiDB cluster

    +
    +paused
    + +bool + +
    +

    Paused pause controller if it is true

    +
    +pvReclaimPolicy
    + + +Kubernetes core/v1.PersistentVolumeReclaimPolicy + + +
    +

    Persistent volume reclaim policy applied to the PVs that consumed by tidb ng monitoring

    +
    +clusterDomain
    + +string + +
    +

    ClusterDomain is the Kubernetes Cluster Domain of tidb ng monitoring

    +
    +ngMonitoring
    + + +NGMonitoringSpec + + +
    +

    NGMonitoring is spec of ng monitoring

    +
    +
    +status
    + + +TidbNGMonitoringStatus + + +
    +

    Status is most recently observed status of tidb ng monitor

    +
    +

    TidbNGMonitoringSpec

    +

    +(Appears on: +TidbNGMonitoring) +

    +

    +

    TidbNGMonitoringSpec is spec of tidb ng monitoring

    +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldDescription
    +ComponentSpec
    + + +ComponentSpec + + +
    +

    +(Members of ComponentSpec are embedded into this type.) +

    +

    ComponentSpec is common spec. +NOTE: the same field will be overridden by component’s spec.

    +
    +clusters
    + + +[]TidbClusterRef + + +
    +

    Clusters reference TiDB cluster

    +
    +paused
    + +bool + +
    +

    Paused pause controller if it is true

    +
    +pvReclaimPolicy
    + + +Kubernetes core/v1.PersistentVolumeReclaimPolicy + + +
    +

    Persistent volume reclaim policy applied to the PVs that consumed by tidb ng monitoring

    +
    +clusterDomain
    + +string + +
    +

    ClusterDomain is the Kubernetes Cluster Domain of tidb ng monitoring

    +
    +ngMonitoring
    + + +NGMonitoringSpec + + +
    +

    NGMonitoring is spec of ng monitoring

    +
    +

    TidbNGMonitoringStatus

    +

    +(Appears on: +TidbNGMonitoring) +

    +

    +

    TidbNGMonitoringStatus is status of tidb ng monitoring

    +

    + + + + + + + + + + + + + +
    FieldDescription
    +ngMonitoring
    + + +NGMonitoringStatus + + +
    +

    NGMonitoring is status of ng monitoring

    +

    TikvAutoScalerSpec

    (Appears on: diff --git a/manifests/crd.yaml b/manifests/crd.yaml index 8e330154822..7f93964dcf1 100644 --- a/manifests/crd.yaml +++ b/manifests/crd.yaml @@ -31915,8 +31915,8 @@ metadata: spec: group: pingcap.com names: - kind: TiDBNGMonitoring - listKind: TiDBNGMonitoringList + kind: TidbNGMonitoring + listKind: TidbNGMonitoringList plural: tidbngmonitorings shortNames: - tngm @@ -33439,6 +33439,8 @@ spec: additionalProperties: type: string type: object + clusterDomain: + type: string clusters: items: properties: diff --git a/manifests/crd/v1/pingcap.com_tidbngmonitorings.yaml b/manifests/crd/v1/pingcap.com_tidbngmonitorings.yaml index e9f48c3c252..b40401bcd30 100644 --- a/manifests/crd/v1/pingcap.com_tidbngmonitorings.yaml +++ b/manifests/crd/v1/pingcap.com_tidbngmonitorings.yaml @@ -10,8 +10,8 @@ metadata: spec: group: pingcap.com names: - kind: TiDBNGMonitoring - listKind: TiDBNGMonitoringList + kind: TidbNGMonitoring + listKind: TidbNGMonitoringList plural: tidbngmonitorings shortNames: - tngm @@ -1534,6 +1534,8 @@ spec: additionalProperties: type: string type: object + clusterDomain: + type: string clusters: items: properties: diff --git a/manifests/crd/v1/pingcap.com_tidbngmonitors.yaml b/manifests/crd/v1/pingcap.com_tidbngmonitors.yaml deleted file mode 100644 index babb5914a9f..00000000000 --- a/manifests/crd/v1/pingcap.com_tidbngmonitors.yaml +++ /dev/null @@ -1,2352 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.6.2 - creationTimestamp: null - name: tidbngmonitors.pingcap.com -spec: - group: pingcap.com - names: - kind: TiDBNGMonitor - listKind: TiDBNGMonitorList - plural: tidbngmonitors - shortNames: - - tnm - singular: tidbngmonitor - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - properties: - apiVersion: - type: string - kind: - type: string - metadata: - type: object - spec: - properties: - additionalContainers: - items: - properties: - args: - items: - type: string - type: array - command: - items: - type: string - type: array - env: - items: - properties: - name: - type: string - value: - type: string - valueFrom: - properties: - configMapKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - resourceFieldRef: - properties: - containerName: - type: string - divisor: - 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 - resource: - type: string - required: - - resource - type: object - secretKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - type: object - required: - - name - type: object - type: array - envFrom: - items: - properties: - configMapRef: - properties: - name: - type: string - optional: - type: boolean - type: object - prefix: - type: string - secretRef: - properties: - name: - type: string - optional: - type: boolean - type: object - type: object - type: array - image: - type: string - imagePullPolicy: - type: string - lifecycle: - properties: - postStart: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - preStop: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - type: object - livenessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - timeoutSeconds: - format: int32 - type: integer - type: object - name: - type: string - ports: - items: - properties: - containerPort: - format: int32 - type: integer - hostIP: - type: string - hostPort: - format: int32 - type: integer - name: - type: string - protocol: - default: TCP - type: string - required: - - containerPort - type: object - type: array - x-kubernetes-list-map-keys: - - containerPort - - protocol - x-kubernetes-list-type: map - readinessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - timeoutSeconds: - format: int32 - type: integer - type: object - resources: - 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 - 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 - type: object - type: object - securityContext: - properties: - allowPrivilegeEscalation: - type: boolean - capabilities: - properties: - add: - items: - type: string - type: array - drop: - items: - type: string - type: array - type: object - privileged: - type: boolean - procMount: - type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - runAsUserName: - type: string - type: object - type: object - startupProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - timeoutSeconds: - format: int32 - type: integer - type: object - stdin: - type: boolean - stdinOnce: - type: boolean - terminationMessagePath: - type: string - terminationMessagePolicy: - type: string - tty: - type: boolean - volumeDevices: - items: - properties: - devicePath: - type: string - name: - type: string - required: - - devicePath - - name - type: object - type: array - volumeMounts: - items: - properties: - mountPath: - type: string - mountPropagation: - type: string - name: - type: string - readOnly: - type: boolean - subPath: - type: string - subPathExpr: - type: string - required: - - mountPath - - name - type: object - type: array - workingDir: - type: string - required: - - name - type: object - type: array - additionalVolumeMounts: - items: - properties: - mountPath: - type: string - mountPropagation: - type: string - name: - type: string - readOnly: - type: boolean - subPath: - type: string - subPathExpr: - type: string - required: - - mountPath - - name - type: object - type: array - additionalVolumes: - items: - properties: - awsElasticBlockStore: - properties: - fsType: - type: string - partition: - format: int32 - type: integer - readOnly: - type: boolean - volumeID: - type: string - required: - - volumeID - type: object - azureDisk: - properties: - cachingMode: - type: string - diskName: - type: string - diskURI: - type: string - fsType: - type: string - kind: - type: string - readOnly: - type: boolean - required: - - diskName - - diskURI - type: object - azureFile: - properties: - readOnly: - type: boolean - secretName: - type: string - shareName: - type: string - required: - - secretName - - shareName - type: object - cephfs: - properties: - monitors: - items: - type: string - type: array - path: - type: string - readOnly: - type: boolean - secretFile: - type: string - secretRef: - properties: - name: - type: string - type: object - user: - type: string - required: - - monitors - type: object - cinder: - properties: - fsType: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - volumeID: - type: string - required: - - volumeID - type: object - configMap: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - csi: - properties: - driver: - type: string - fsType: - type: string - nodePublishSecretRef: - properties: - name: - type: string - type: object - readOnly: - type: boolean - volumeAttributes: - additionalProperties: - type: string - type: object - required: - - driver - type: object - downwardAPI: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - mode: - format: int32 - type: integer - path: - type: string - resourceFieldRef: - properties: - containerName: - type: string - divisor: - 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 - resource: - type: string - required: - - resource - type: object - required: - - path - type: object - type: array - type: object - emptyDir: - properties: - medium: - type: string - sizeLimit: - 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: object - ephemeral: - properties: - readOnly: - type: boolean - volumeClaimTemplate: - properties: - metadata: - type: object - spec: - properties: - accessModes: - items: - type: string - type: array - dataSource: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - resources: - 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 - 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 - type: object - type: object - selector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - storageClassName: - type: string - volumeMode: - type: string - volumeName: - type: string - type: object - required: - - spec - type: object - type: object - fc: - properties: - fsType: - type: string - lun: - format: int32 - type: integer - readOnly: - type: boolean - targetWWNs: - items: - type: string - type: array - wwids: - items: - type: string - type: array - type: object - flexVolume: - properties: - driver: - type: string - fsType: - type: string - options: - additionalProperties: - type: string - type: object - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - required: - - driver - type: object - flocker: - properties: - datasetName: - type: string - datasetUUID: - type: string - type: object - gcePersistentDisk: - properties: - fsType: - type: string - partition: - format: int32 - type: integer - pdName: - type: string - readOnly: - type: boolean - required: - - pdName - type: object - gitRepo: - properties: - directory: - type: string - repository: - type: string - revision: - type: string - required: - - repository - type: object - glusterfs: - properties: - endpoints: - type: string - path: - type: string - readOnly: - type: boolean - required: - - endpoints - - path - type: object - hostPath: - properties: - path: - type: string - type: - type: string - required: - - path - type: object - iscsi: - properties: - chapAuthDiscovery: - type: boolean - chapAuthSession: - type: boolean - fsType: - type: string - initiatorName: - type: string - iqn: - type: string - iscsiInterface: - type: string - lun: - format: int32 - type: integer - portals: - items: - type: string - type: array - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - targetPortal: - type: string - required: - - iqn - - lun - - targetPortal - type: object - name: - type: string - nfs: - properties: - path: - type: string - readOnly: - type: boolean - server: - type: string - required: - - path - - server - type: object - persistentVolumeClaim: - properties: - claimName: - type: string - readOnly: - type: boolean - required: - - claimName - type: object - photonPersistentDisk: - properties: - fsType: - type: string - pdID: - type: string - required: - - pdID - type: object - portworxVolume: - properties: - fsType: - type: string - readOnly: - type: boolean - volumeID: - type: string - required: - - volumeID - type: object - projected: - properties: - defaultMode: - format: int32 - type: integer - sources: - items: - properties: - configMap: - properties: - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - downwardAPI: - properties: - items: - items: - properties: - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - mode: - format: int32 - type: integer - path: - type: string - resourceFieldRef: - properties: - containerName: - type: string - divisor: - 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 - resource: - type: string - required: - - resource - type: object - required: - - path - type: object - type: array - type: object - secret: - properties: - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - serviceAccountToken: - properties: - audience: - type: string - expirationSeconds: - format: int64 - type: integer - path: - type: string - required: - - path - type: object - type: object - type: array - required: - - sources - type: object - quobyte: - properties: - group: - type: string - readOnly: - type: boolean - registry: - type: string - tenant: - type: string - user: - type: string - volume: - type: string - required: - - registry - - volume - type: object - rbd: - properties: - fsType: - type: string - image: - type: string - keyring: - type: string - monitors: - items: - type: string - type: array - pool: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - user: - type: string - required: - - image - - monitors - type: object - scaleIO: - properties: - fsType: - type: string - gateway: - type: string - protectionDomain: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - sslEnabled: - type: boolean - storageMode: - type: string - storagePool: - type: string - system: - type: string - volumeName: - type: string - required: - - gateway - - secretRef - - system - type: object - secret: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - optional: - type: boolean - secretName: - type: string - type: object - storageos: - properties: - fsType: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - volumeName: - type: string - volumeNamespace: - type: string - type: object - vsphereVolume: - properties: - fsType: - type: string - storagePolicyID: - type: string - storagePolicyName: - type: string - volumePath: - type: string - required: - - volumePath - type: object - required: - - name - type: object - type: array - affinity: - properties: - nodeAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - preference: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - weight: - format: int32 - type: integer - required: - - preference - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - properties: - nodeSelectorTerms: - items: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - type: array - required: - - nodeSelectorTerms - type: object - type: object - podAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - podAffinityTerm: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - weight: - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - items: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - type: array - type: object - podAntiAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - podAffinityTerm: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - weight: - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - items: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - type: array - type: object - type: object - annotations: - additionalProperties: - type: string - type: object - clusters: - items: - properties: - clusterDomain: - type: string - name: - type: string - namespace: - type: string - required: - - name - type: object - type: array - configUpdateStrategy: - type: string - env: - items: - properties: - name: - type: string - value: - type: string - valueFrom: - properties: - configMapKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - resourceFieldRef: - properties: - containerName: - type: string - divisor: - 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 - resource: - type: string - required: - - resource - type: object - secretKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - type: object - required: - - name - type: object - type: array - hostNetwork: - type: boolean - image: - type: string - imagePullPolicy: - type: string - imagePullSecrets: - items: - properties: - name: - type: string - type: object - type: array - initContainers: - items: - properties: - args: - items: - type: string - type: array - command: - items: - type: string - type: array - env: - items: - properties: - name: - type: string - value: - type: string - valueFrom: - properties: - configMapKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - resourceFieldRef: - properties: - containerName: - type: string - divisor: - 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 - resource: - type: string - required: - - resource - type: object - secretKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - type: object - required: - - name - type: object - type: array - envFrom: - items: - properties: - configMapRef: - properties: - name: - type: string - optional: - type: boolean - type: object - prefix: - type: string - secretRef: - properties: - name: - type: string - optional: - type: boolean - type: object - type: object - type: array - image: - type: string - imagePullPolicy: - type: string - lifecycle: - properties: - postStart: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - preStop: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - type: object - livenessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - timeoutSeconds: - format: int32 - type: integer - type: object - name: - type: string - ports: - items: - properties: - containerPort: - format: int32 - type: integer - hostIP: - type: string - hostPort: - format: int32 - type: integer - name: - type: string - protocol: - default: TCP - type: string - required: - - containerPort - type: object - type: array - x-kubernetes-list-map-keys: - - containerPort - - protocol - x-kubernetes-list-type: map - readinessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - timeoutSeconds: - format: int32 - type: integer - type: object - resources: - 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 - 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 - type: object - type: object - securityContext: - properties: - allowPrivilegeEscalation: - type: boolean - capabilities: - properties: - add: - items: - type: string - type: array - drop: - items: - type: string - type: array - type: object - privileged: - type: boolean - procMount: - type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - runAsUserName: - type: string - type: object - type: object - startupProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - timeoutSeconds: - format: int32 - type: integer - type: object - stdin: - type: boolean - stdinOnce: - type: boolean - terminationMessagePath: - type: string - terminationMessagePolicy: - type: string - tty: - type: boolean - volumeDevices: - items: - properties: - devicePath: - type: string - name: - type: string - required: - - devicePath - - name - type: object - type: array - volumeMounts: - items: - properties: - mountPath: - type: string - mountPropagation: - type: string - name: - type: string - readOnly: - type: boolean - subPath: - type: string - subPathExpr: - type: string - required: - - mountPath - - name - type: object - type: array - workingDir: - type: string - required: - - name - type: object - type: array - labels: - additionalProperties: - type: string - type: object - nodeSelector: - additionalProperties: - type: string - type: object - podManagementPolicy: - type: string - podSecurityContext: - properties: - fsGroup: - format: int64 - type: integer - fsGroupChangePolicy: - type: string - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - supplementalGroups: - items: - format: int64 - type: integer - type: array - sysctls: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - runAsUserName: - type: string - type: object - type: object - priorityClassName: - type: string - schedulerName: - type: string - statefulSetUpdateStrategy: - type: string - terminationGracePeriodSeconds: - format: int64 - type: integer - tolerations: - items: - properties: - effect: - type: string - key: - type: string - operator: - type: string - tolerationSeconds: - format: int64 - type: integer - value: - type: string - type: object - type: array - topologySpreadConstraints: - items: - properties: - topologyKey: - type: string - required: - - topologyKey - type: object - type: array - x-kubernetes-list-map-keys: - - topologyKey - x-kubernetes-list-type: map - version: - type: string - required: - - clusters - type: object - status: - properties: - monitor: - properties: - phase: - type: string - statefulSet: - properties: - collisionCount: - format: int32 - type: integer - conditions: - items: - properties: - lastTransitionTime: - format: date-time - type: string - message: - type: string - reason: - type: string - status: - type: string - type: - type: string - required: - - status - - type - type: object - type: array - currentReplicas: - format: int32 - type: integer - currentRevision: - type: string - observedGeneration: - format: int64 - type: integer - readyReplicas: - format: int32 - type: integer - replicas: - format: int32 - type: integer - updateRevision: - type: string - updatedReplicas: - format: int32 - type: integer - required: - - replicas - type: object - synced: - type: boolean - type: object - type: object - required: - - metadata - - spec - type: object - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/manifests/crd/v1beta1/pingcap.com_tidbngmonitorings.yaml b/manifests/crd/v1beta1/pingcap.com_tidbngmonitorings.yaml index 91dc864a3c8..0e14c965e4e 100644 --- a/manifests/crd/v1beta1/pingcap.com_tidbngmonitorings.yaml +++ b/manifests/crd/v1beta1/pingcap.com_tidbngmonitorings.yaml @@ -10,8 +10,8 @@ metadata: spec: group: pingcap.com names: - kind: TiDBNGMonitoring - listKind: TiDBNGMonitoringList + kind: TidbNGMonitoring + listKind: TidbNGMonitoringList plural: tidbngmonitorings shortNames: - tngm @@ -1532,6 +1532,8 @@ spec: additionalProperties: type: string type: object + clusterDomain: + type: string clusters: items: properties: diff --git a/manifests/crd_v1beta1.yaml b/manifests/crd_v1beta1.yaml index 2f13f01f2e3..23163f6c018 100644 --- a/manifests/crd_v1beta1.yaml +++ b/manifests/crd_v1beta1.yaml @@ -31893,8 +31893,8 @@ metadata: spec: group: pingcap.com names: - kind: TiDBNGMonitoring - listKind: TiDBNGMonitoringList + kind: TidbNGMonitoring + listKind: TidbNGMonitoringList plural: tidbngmonitorings shortNames: - tngm @@ -33415,6 +33415,8 @@ spec: additionalProperties: type: string type: object + clusterDomain: + type: string clusters: items: properties: diff --git a/pkg/apis/pingcap/v1alpha1/openapi_generated.go b/pkg/apis/pingcap/v1alpha1/openapi_generated.go index fcc50249b96..5fb24e36752 100644 --- a/pkg/apis/pingcap/v1alpha1/openapi_generated.go +++ b/pkg/apis/pingcap/v1alpha1/openapi_generated.go @@ -118,9 +118,6 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiCDCSpec": schema_pkg_apis_pingcap_v1alpha1_TiCDCSpec(ref), "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBAccessConfig": schema_pkg_apis_pingcap_v1alpha1_TiDBAccessConfig(ref), "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBConfig": schema_pkg_apis_pingcap_v1alpha1_TiDBConfig(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBNGMonitoring": schema_pkg_apis_pingcap_v1alpha1_TiDBNGMonitoring(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBNGMonitoringList": schema_pkg_apis_pingcap_v1alpha1_TiDBNGMonitoringList(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBNGMonitoringSpec": schema_pkg_apis_pingcap_v1alpha1_TiDBNGMonitoringSpec(ref), "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBProbe": schema_pkg_apis_pingcap_v1alpha1_TiDBProbe(ref), "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBServiceSpec": schema_pkg_apis_pingcap_v1alpha1_TiDBServiceSpec(ref), "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBSlowLogTailerSpec": schema_pkg_apis_pingcap_v1alpha1_TiDBSlowLogTailerSpec(ref), @@ -172,6 +169,9 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbMonitorList": schema_pkg_apis_pingcap_v1alpha1_TidbMonitorList(ref), "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbMonitorRef": schema_pkg_apis_pingcap_v1alpha1_TidbMonitorRef(ref), "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbMonitorSpec": schema_pkg_apis_pingcap_v1alpha1_TidbMonitorSpec(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbNGMonitoring": schema_pkg_apis_pingcap_v1alpha1_TidbNGMonitoring(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbNGMonitoringList": schema_pkg_apis_pingcap_v1alpha1_TidbNGMonitoringList(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbNGMonitoringSpec": schema_pkg_apis_pingcap_v1alpha1_TidbNGMonitoringSpec(ref), "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TikvAutoScalerSpec": schema_pkg_apis_pingcap_v1alpha1_TikvAutoScalerSpec(ref), "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TikvAutoScalerStatus": schema_pkg_apis_pingcap_v1alpha1_TikvAutoScalerStatus(ref), "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TxnLocalLatches": schema_pkg_apis_pingcap_v1alpha1_TxnLocalLatches(ref), @@ -3828,7 +3828,7 @@ func schema_pkg_apis_pingcap_v1alpha1_NGMonitoringSpec(ref common.ReferenceCallb }, "storageVolumes": { SchemaProps: spec.SchemaProps{ - Description: "StorageVolumes configure additional storage for NG Monitoring pods.", + Description: "StorageVolumes configures additional storage for NG Monitoring pods.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -7501,89 +7501,130 @@ func schema_pkg_apis_pingcap_v1alpha1_TiDBConfig(ref common.ReferenceCallback) c } } -func schema_pkg_apis_pingcap_v1alpha1_TiDBNGMonitoring(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_pingcap_v1alpha1_TiDBProbe(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "TiDBNGMonitoring contains the spec and status of tidb ng monitor", + Description: "TiDBProbe contains details of probing tidb. default probe by TCPPort on 4000.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "type": { SchemaProps: spec.SchemaProps{ - 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", + Description: "\"tcp\" will use TCP socket to connetct port 4000\n\n\"command\" will probe the status api of tidb. This will use curl command to request tidb, before v4.0.9 there is no curl in the image, So do not use this before v4.0.9.", Type: []string{"string"}, Format: "", }, }, - "apiVersion": { + }, + }, + }, + } +} + +func schema_pkg_apis_pingcap_v1alpha1_TiDBServiceSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TiDBServiceSpec defines `.tidb.service` field of `TidbCluster.spec`.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "externalTrafficPolicy": { SchemaProps: spec.SchemaProps{ - 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", + Description: "ExternalTrafficPolicy of the service Optional: Defaults to omitted", Type: []string{"string"}, Format: "", }, }, - "spec": { + "exposeStatus": { SchemaProps: spec.SchemaProps{ - Description: "Spec contains all spec about tidb ng monitor", - Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBNGMonitoringSpec"), + Description: "Whether expose the status port Optional: Defaults to true", + Type: []string{"boolean"}, + Format: "", + }, + }, + "mysqlNodePort": { + SchemaProps: spec.SchemaProps{ + Description: "Expose the tidb cluster mysql port to MySQLNodePort Optional: Defaults to 0", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "statusNodePort": { + SchemaProps: spec.SchemaProps{ + Description: "Expose the tidb status node port to StatusNodePort Optional: Defaults to 0", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "additionalPorts": { + SchemaProps: spec.SchemaProps{ + Description: "Expose additional ports for TiDB Optional: Defaults to omitted", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.ServicePort"), + }, + }, + }, }, }, }, - Required: []string{"spec"}, }, }, Dependencies: []string{ - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBNGMonitoringSpec"}, + "k8s.io/api/core/v1.ServicePort"}, } } -func schema_pkg_apis_pingcap_v1alpha1_TiDBNGMonitoringList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_pingcap_v1alpha1_TiDBSlowLogTailerSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "TiDBNGMonitoringList is TiDBNGMonitoring list", + Description: "TiDBSlowLogTailerSpec represents an optional log tailer sidecar with TiDB", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "apiVersion": { + "limits": { SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", + Description: "Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, }, }, - "items": { + "requests": { SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ + Description: "Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBNGMonitoring"), + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, }, }, }, }, - Required: []string{"items"}, }, }, Dependencies: []string{ - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBNGMonitoring"}, + "k8s.io/apimachinery/pkg/api/resource.Quantity"}, } } -func schema_pkg_apis_pingcap_v1alpha1_TiDBNGMonitoringSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_pingcap_v1alpha1_TiDBSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "TiDBNGMonitoringSpec is spec of tidb ng monitoring", + Description: "TiDBSpec contains details of TiDB members", Type: []string{"object"}, Properties: map[string]spec.Schema{ "version": { @@ -7818,172 +7859,221 @@ func schema_pkg_apis_pingcap_v1alpha1_TiDBNGMonitoringSpec(ref common.ReferenceC }, }, }, - "clusters": { + "limits": { SchemaProps: spec.SchemaProps{ - Description: "Clusters reference TiDB cluster", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ + Description: "Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbClusterRef"), + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, }, }, }, - "paused": { + "requests": { SchemaProps: spec.SchemaProps{ - Description: "Paused pause controller if it is true", - Type: []string{"boolean"}, - Format: "", + Description: "Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, }, }, - "pvReclaimPolicy": { + "serviceAccount": { SchemaProps: spec.SchemaProps{ - Description: "Persistent volume reclaim policy applied to the PVs that consumed by TiDB cluster", + Description: "Specify a Service Account for tidb", Type: []string{"string"}, Format: "", }, }, - "ngMonitoring": { + "replicas": { SchemaProps: spec.SchemaProps{ - Description: "NGMonitoring is spec of ng monitoring", - Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.NGMonitoringSpec"), + Description: "The desired ready replicas", + Type: []string{"integer"}, + Format: "int32", }, }, - }, - Required: []string{"clusters", "ngMonitoring"}, - }, - }, - Dependencies: []string{ - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.NGMonitoringSpec", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbClusterRef", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TopologySpreadConstraint", "k8s.io/api/core/v1.Affinity", "k8s.io/api/core/v1.Container", "k8s.io/api/core/v1.EnvVar", "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PodSecurityContext", "k8s.io/api/core/v1.Toleration", "k8s.io/api/core/v1.Volume", "k8s.io/api/core/v1.VolumeMount"}, - } -} - -func schema_pkg_apis_pingcap_v1alpha1_TiDBProbe(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TiDBProbe contains details of probing tidb. default probe by TCPPort on 4000.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "type": { + "baseImage": { SchemaProps: spec.SchemaProps{ - Description: "\"tcp\" will use TCP socket to connetct port 4000\n\n\"command\" will probe the status api of tidb. This will use curl command to request tidb, before v4.0.9 there is no curl in the image, So do not use this before v4.0.9.", + Description: "Base image of the component, image tag is now allowed during validation", Type: []string{"string"}, Format: "", }, }, - }, - }, - }, - } -} - -func schema_pkg_apis_pingcap_v1alpha1_TiDBServiceSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TiDBServiceSpec defines `.tidb.service` field of `TidbCluster.spec`.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "externalTrafficPolicy": { + "service": { SchemaProps: spec.SchemaProps{ - Description: "ExternalTrafficPolicy of the service Optional: Defaults to omitted", - Type: []string{"string"}, - Format: "", + Description: "Service defines a Kubernetes service of TiDB cluster. Optional: No kubernetes service will be created by default.", + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBServiceSpec"), }, }, - "exposeStatus": { + "binlogEnabled": { SchemaProps: spec.SchemaProps{ - Description: "Whether expose the status port Optional: Defaults to true", + Description: "Whether enable TiDB Binlog, it is encouraged to not set this field and rely on the default behavior Optional: Defaults to true if PumpSpec is non-nil, otherwise false", Type: []string{"boolean"}, Format: "", }, }, - "mysqlNodePort": { + "maxFailoverCount": { SchemaProps: spec.SchemaProps{ - Description: "Expose the tidb cluster mysql port to MySQLNodePort Optional: Defaults to 0", + Description: "MaxFailoverCount limit the max replicas could be added in failover, 0 means no failover Optional: Defaults to 3", Type: []string{"integer"}, Format: "int32", }, }, - "statusNodePort": { + "separateSlowLog": { SchemaProps: spec.SchemaProps{ - Description: "Expose the tidb status node port to StatusNodePort Optional: Defaults to 0", - Type: []string{"integer"}, - Format: "int32", + Description: "Whether output the slow log in an separate sidecar container Optional: Defaults to true", + Type: []string{"boolean"}, + Format: "", }, }, - "additionalPorts": { + "slowLogVolumeName": { SchemaProps: spec.SchemaProps{ - Description: "Expose additional ports for TiDB Optional: Defaults to omitted", + Description: "Optional volume name configuration for slow query log.", + Type: []string{"string"}, + Format: "", + }, + }, + "slowLogTailer": { + SchemaProps: spec.SchemaProps{ + Description: "The specification of the slow log tailer sidecar", + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBSlowLogTailerSpec"), + }, + }, + "tlsClient": { + SchemaProps: spec.SchemaProps{ + Description: "Whether enable the TLS connection between the SQL client and TiDB server Optional: Defaults to nil", + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBTLSClient"), + }, + }, + "plugins": { + SchemaProps: spec.SchemaProps{ + Description: "Plugins is a list of plugins that are loaded by TiDB server, empty means plugin disabled", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.ServicePort"), + Type: []string{"string"}, + Format: "", }, }, }, }, }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ServicePort"}, - } -} - -func schema_pkg_apis_pingcap_v1alpha1_TiDBSlowLogTailerSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TiDBSlowLogTailerSpec represents an optional log tailer sidecar with TiDB", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "limits": { + "config": { SchemaProps: spec.SchemaProps{ - Description: "Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, + Description: "Config is the Configuration of tidb-servers", + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBConfigWraper"), + }, + }, + "lifecycle": { + SchemaProps: spec.SchemaProps{ + Description: "Lifecycle describes actions that the management system should take in response to container lifecycle events. For the PostStart and PreStop lifecycle handlers, management of the container blocks until the action is complete, unless the container process fails, in which case the handler is aborted.", + Ref: ref("k8s.io/api/core/v1.Lifecycle"), + }, + }, + "storageVolumes": { + SchemaProps: spec.SchemaProps{ + Description: "StorageVolumes configure additional storage for TiDB pods.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.StorageVolume"), }, }, }, }, }, - "requests": { + "storageClassName": { SchemaProps: spec.SchemaProps{ - Description: "Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, + Description: "The storageClassName of the persistent volume for TiDB data storage. Defaults to Kubernetes default storage class.", + Type: []string{"string"}, + Format: "", + }, + }, + "readinessProbe": { + SchemaProps: spec.SchemaProps{ + Description: "ReadinessProbe describes actions that probe the tidb's readiness. the default behavior is like setting type as \"tcp\"", + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBProbe"), }, }, }, + Required: []string{"replicas"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.StorageVolume", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBConfigWraper", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBProbe", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBServiceSpec", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBSlowLogTailerSpec", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBTLSClient", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TopologySpreadConstraint", "k8s.io/api/core/v1.Affinity", "k8s.io/api/core/v1.Container", "k8s.io/api/core/v1.EnvVar", "k8s.io/api/core/v1.Lifecycle", "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PodSecurityContext", "k8s.io/api/core/v1.Toleration", "k8s.io/api/core/v1.Volume", "k8s.io/api/core/v1.VolumeMount", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, } } -func schema_pkg_apis_pingcap_v1alpha1_TiDBSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_pingcap_v1alpha1_TiDBTLSClient(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "TiDBSpec contains details of TiDB members", + Description: "TiDBTLSClient can enable TLS connection between TiDB server and MySQL client", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "enabled": { + SchemaProps: spec.SchemaProps{ + Description: "When enabled, TiDB will accept TLS encrypted connections from MySQL client The steps to enable this feature:\n 1. Generate a TiDB server-side certificate and a client-side certifiacete for the TiDB cluster.\n There are multiple ways to generate certificates:\n - user-provided certificates: https://pingcap.com/docs/stable/how-to/secure/enable-tls-clients/\n - use the K8s built-in certificate signing system signed certificates: https://kubernetes.io/docs/tasks/tls/managing-tls-in-a-cluster/\n - or use cert-manager signed certificates: https://cert-manager.io/\n 2. Create a K8s Secret object which contains the TiDB server-side certificate created above.\n The name of this Secret must be: -tidb-server-secret.\n kubectl create secret generic -tidb-server-secret --namespace= --from-file=tls.crt= --from-file=tls.key= --from-file=ca.crt=\n 3. Create a K8s Secret object which contains the TiDB client-side certificate created above which will be used by TiDB Operator.\n The name of this Secret must be: -tidb-client-secret.\n kubectl create secret generic -tidb-client-secret --namespace= --from-file=tls.crt= --from-file=tls.key= --from-file=ca.crt=\n 4. Set Enabled to `true`.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "disableClientAuthn": { + SchemaProps: spec.SchemaProps{ + Description: "DisableClientAuthn will skip client authentication from the TiDB server. Optional: defaults to false", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_pkg_apis_pingcap_v1alpha1_TiFlashConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TiFlashConfig is the configuration of TiFlash.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "config": { + SchemaProps: spec.SchemaProps{ + Description: "commonConfig is the Configuration of TiFlash process", + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.CommonConfig"), + }, + }, + "proxy": { + SchemaProps: spec.SchemaProps{ + Description: "proxyConfig is the Configuration of proxy process", + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.ProxyConfig"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.CommonConfig", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.ProxyConfig"}, + } +} + +func schema_pkg_apis_pingcap_v1alpha1_TiFlashSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TiFlashSpec contains details of TiFlash members", Type: []string{"object"}, Properties: map[string]spec.Schema{ "version": { @@ -8248,7 +8338,7 @@ func schema_pkg_apis_pingcap_v1alpha1_TiDBSpec(ref common.ReferenceCallback) com }, "serviceAccount": { SchemaProps: spec.SchemaProps{ - Description: "Specify a Service Account for tidb", + Description: "Specify a Service Account for TiFlash", Type: []string{"string"}, Format: "", }, @@ -8267,15 +8357,9 @@ func schema_pkg_apis_pingcap_v1alpha1_TiDBSpec(ref common.ReferenceCallback) com Format: "", }, }, - "service": { - SchemaProps: spec.SchemaProps{ - Description: "Service defines a Kubernetes service of TiDB cluster. Optional: No kubernetes service will be created by default.", - Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBServiceSpec"), - }, - }, - "binlogEnabled": { + "privileged": { SchemaProps: spec.SchemaProps{ - Description: "Whether enable TiDB Binlog, it is encouraged to not set this field and rely on the default behavior Optional: Defaults to true if PumpSpec is non-nil, otherwise false", + Description: "Whether create the TiFlash container in privileged mode, it is highly discouraged to enable this in critical environment. Optional: defaults to false", Type: []string{"boolean"}, Format: "", }, @@ -8287,41 +8371,14 @@ func schema_pkg_apis_pingcap_v1alpha1_TiDBSpec(ref common.ReferenceCallback) com Format: "int32", }, }, - "separateSlowLog": { - SchemaProps: spec.SchemaProps{ - Description: "Whether output the slow log in an separate sidecar container Optional: Defaults to true", - Type: []string{"boolean"}, - Format: "", - }, - }, - "slowLogVolumeName": { - SchemaProps: spec.SchemaProps{ - Description: "Optional volume name configuration for slow query log.", - Type: []string{"string"}, - Format: "", - }, - }, - "slowLogTailer": { - SchemaProps: spec.SchemaProps{ - Description: "The specification of the slow log tailer sidecar", - Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBSlowLogTailerSpec"), - }, - }, - "tlsClient": { - SchemaProps: spec.SchemaProps{ - Description: "Whether enable the TLS connection between the SQL client and TiDB server Optional: Defaults to nil", - Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBTLSClient"), - }, - }, - "plugins": { + "storageClaims": { SchemaProps: spec.SchemaProps{ - Description: "Plugins is a list of plugins that are loaded by TiDB server, empty means plugin disabled", + Description: "The persistent volume claims of the TiFlash data storages. TiFlash supports multiple disks.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.StorageClaim"), }, }, }, @@ -8329,70 +8386,42 @@ func schema_pkg_apis_pingcap_v1alpha1_TiDBSpec(ref common.ReferenceCallback) com }, "config": { SchemaProps: spec.SchemaProps{ - Description: "Config is the Configuration of tidb-servers", - Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBConfigWraper"), - }, - }, - "lifecycle": { - SchemaProps: spec.SchemaProps{ - Description: "Lifecycle describes actions that the management system should take in response to container lifecycle events. For the PostStart and PreStop lifecycle handlers, management of the container blocks until the action is complete, unless the container process fails, in which case the handler is aborted.", - Ref: ref("k8s.io/api/core/v1.Lifecycle"), + Description: "Config is the Configuration of TiFlash", + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiFlashConfigWraper"), }, }, - "storageVolumes": { + "logTailer": { SchemaProps: spec.SchemaProps{ - Description: "StorageVolumes configure additional storage for TiDB pods.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.StorageVolume"), - }, - }, - }, + Description: "LogTailer is the configurations of the log tailers for TiFlash", + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.LogTailerSpec"), }, }, - "storageClassName": { + "recoverFailover": { SchemaProps: spec.SchemaProps{ - Description: "The storageClassName of the persistent volume for TiDB data storage. Defaults to Kubernetes default storage class.", - Type: []string{"string"}, + Description: "RecoverFailover indicates that Operator can recover the failover Pods", + Type: []string{"boolean"}, Format: "", }, }, - "readinessProbe": { - SchemaProps: spec.SchemaProps{ - Description: "ReadinessProbe describes actions that probe the tidb's readiness. the default behavior is like setting type as \"tcp\"", - Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBProbe"), - }, - }, }, - Required: []string{"replicas"}, + Required: []string{"replicas", "storageClaims"}, }, }, Dependencies: []string{ - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.StorageVolume", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBConfigWraper", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBProbe", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBServiceSpec", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBSlowLogTailerSpec", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBTLSClient", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TopologySpreadConstraint", "k8s.io/api/core/v1.Affinity", "k8s.io/api/core/v1.Container", "k8s.io/api/core/v1.EnvVar", "k8s.io/api/core/v1.Lifecycle", "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PodSecurityContext", "k8s.io/api/core/v1.Toleration", "k8s.io/api/core/v1.Volume", "k8s.io/api/core/v1.VolumeMount", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.LogTailerSpec", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.StorageClaim", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiFlashConfigWraper", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TopologySpreadConstraint", "k8s.io/api/core/v1.Affinity", "k8s.io/api/core/v1.Container", "k8s.io/api/core/v1.EnvVar", "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PodSecurityContext", "k8s.io/api/core/v1.Toleration", "k8s.io/api/core/v1.Volume", "k8s.io/api/core/v1.VolumeMount", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, } } -func schema_pkg_apis_pingcap_v1alpha1_TiDBTLSClient(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_pingcap_v1alpha1_TiKVBackupConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "TiDBTLSClient can enable TLS connection between TiDB server and MySQL client", - Type: []string{"object"}, + Type: []string{"object"}, Properties: map[string]spec.Schema{ - "enabled": { - SchemaProps: spec.SchemaProps{ - Description: "When enabled, TiDB will accept TLS encrypted connections from MySQL client The steps to enable this feature:\n 1. Generate a TiDB server-side certificate and a client-side certifiacete for the TiDB cluster.\n There are multiple ways to generate certificates:\n - user-provided certificates: https://pingcap.com/docs/stable/how-to/secure/enable-tls-clients/\n - use the K8s built-in certificate signing system signed certificates: https://kubernetes.io/docs/tasks/tls/managing-tls-in-a-cluster/\n - or use cert-manager signed certificates: https://cert-manager.io/\n 2. Create a K8s Secret object which contains the TiDB server-side certificate created above.\n The name of this Secret must be: -tidb-server-secret.\n kubectl create secret generic -tidb-server-secret --namespace= --from-file=tls.crt= --from-file=tls.key= --from-file=ca.crt=\n 3. Create a K8s Secret object which contains the TiDB client-side certificate created above which will be used by TiDB Operator.\n The name of this Secret must be: -tidb-client-secret.\n kubectl create secret generic -tidb-client-secret --namespace= --from-file=tls.crt= --from-file=tls.key= --from-file=ca.crt=\n 4. Set Enabled to `true`.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "disableClientAuthn": { + "num-threads": { SchemaProps: spec.SchemaProps{ - Description: "DisableClientAuthn will skip client authentication from the TiDB server. Optional: defaults to false", - Type: []string{"boolean"}, - Format: "", + Type: []string{"integer"}, + Format: "int64", }, }, }, @@ -8401,467 +8430,79 @@ func schema_pkg_apis_pingcap_v1alpha1_TiDBTLSClient(ref common.ReferenceCallback } } -func schema_pkg_apis_pingcap_v1alpha1_TiFlashConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_pingcap_v1alpha1_TiKVBlockCacheConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "TiFlashConfig is the configuration of TiFlash.", + Description: "TiKVBlockCacheConfig is the config of a block cache", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "config": { + "shared": { SchemaProps: spec.SchemaProps{ - Description: "commonConfig is the Configuration of TiFlash process", - Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.CommonConfig"), + Description: "Optional: Defaults to true", + Type: []string{"boolean"}, + Format: "", }, }, - "proxy": { + "capacity": { SchemaProps: spec.SchemaProps{ - Description: "proxyConfig is the Configuration of proxy process", - Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.ProxyConfig"), + Type: []string{"string"}, + Format: "", + }, + }, + "num-shard-bits": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int64", + }, + }, + "strict-capacity-limit": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + "high-pri-pool-ratio": { + SchemaProps: spec.SchemaProps{ + Type: []string{"number"}, + Format: "double", + }, + }, + "memory-allocator": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", }, }, }, }, }, - Dependencies: []string{ - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.CommonConfig", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.ProxyConfig"}, } } -func schema_pkg_apis_pingcap_v1alpha1_TiFlashSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_pingcap_v1alpha1_TiKVCfConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "TiFlashSpec contains details of TiFlash members", + Description: "TiKVCfConfig is the config of a cf", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "version": { + "block-size": { SchemaProps: spec.SchemaProps{ - Description: "Version of the component. Override the cluster-level version if non-empty Optional: Defaults to cluster-level setting", - Type: []string{"string"}, - Format: "", + Type: []string{"string"}, + Format: "", }, }, - "imagePullPolicy": { + "block-cache-size": { SchemaProps: spec.SchemaProps{ - Description: "ImagePullPolicy of the component. Override the cluster-level imagePullPolicy if present Optional: Defaults to cluster-level setting", - Type: []string{"string"}, - Format: "", + Type: []string{"string"}, + Format: "", }, }, - "imagePullSecrets": { + "disable-block-cache": { SchemaProps: spec.SchemaProps{ - Description: "ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), - }, - }, - }, - }, - }, - "hostNetwork": { - SchemaProps: spec.SchemaProps{ - Description: "Whether Hostnetwork of the component is enabled. Override the cluster-level setting if present Optional: Defaults to cluster-level setting", - Type: []string{"boolean"}, - Format: "", - }, - }, - "affinity": { - SchemaProps: spec.SchemaProps{ - Description: "Affinity of the component. Override the cluster-level setting if present. Optional: Defaults to cluster-level setting", - Ref: ref("k8s.io/api/core/v1.Affinity"), - }, - }, - "priorityClassName": { - SchemaProps: spec.SchemaProps{ - Description: "PriorityClassName of the component. Override the cluster-level one if present Optional: Defaults to cluster-level setting", - Type: []string{"string"}, - Format: "", - }, - }, - "schedulerName": { - SchemaProps: spec.SchemaProps{ - Description: "SchedulerName of the component. Override the cluster-level one if present Optional: Defaults to cluster-level setting", - Type: []string{"string"}, - Format: "", - }, - }, - "nodeSelector": { - SchemaProps: spec.SchemaProps{ - Description: "NodeSelector of the component. Merged into the cluster-level nodeSelector if non-empty Optional: Defaults to cluster-level setting", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "annotations": { - SchemaProps: spec.SchemaProps{ - Description: "Annotations for the component. Merge into the cluster-level annotations if non-empty Optional: Defaults to cluster-level setting", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "labels": { - SchemaProps: spec.SchemaProps{ - Description: "Labels for the component. Merge into the cluster-level labels if non-empty Optional: Defaults to cluster-level setting", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "tolerations": { - SchemaProps: spec.SchemaProps{ - Description: "Tolerations of the component. Override the cluster-level tolerations if non-empty Optional: Defaults to cluster-level setting", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.Toleration"), - }, - }, - }, - }, - }, - "podSecurityContext": { - SchemaProps: spec.SchemaProps{ - Description: "PodSecurityContext of the component", - Ref: ref("k8s.io/api/core/v1.PodSecurityContext"), - }, - }, - "configUpdateStrategy": { - SchemaProps: spec.SchemaProps{ - Description: "ConfigUpdateStrategy of the component. Override the cluster-level updateStrategy if present Optional: Defaults to cluster-level setting", - Type: []string{"string"}, - Format: "", - }, - }, - "env": { - SchemaProps: spec.SchemaProps{ - Description: "List of environment variables to set in the container, like v1.Container.Env. Note that the following env names cannot be used and will be overridden by TiDB Operator builtin envs - NAMESPACE - TZ - SERVICE_NAME - PEER_SERVICE_NAME - HEADLESS_SERVICE_NAME - SET_NAME - HOSTNAME - CLUSTER_NAME - POD_NAME - BINLOG_ENABLED - SLOW_LOG_FILE", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.EnvVar"), - }, - }, - }, - }, - }, - "initContainers": { - SchemaProps: spec.SchemaProps{ - Description: "Init containers of the components", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.Container"), - }, - }, - }, - }, - }, - "additionalContainers": { - SchemaProps: spec.SchemaProps{ - Description: "Additional containers of the component.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.Container"), - }, - }, - }, - }, - }, - "additionalVolumes": { - SchemaProps: spec.SchemaProps{ - Description: "Additional volumes of component pod.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.Volume"), - }, - }, - }, - }, - }, - "additionalVolumeMounts": { - SchemaProps: spec.SchemaProps{ - Description: "Additional volume mounts of component pod.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.VolumeMount"), - }, - }, - }, - }, - }, - "terminationGracePeriodSeconds": { - SchemaProps: spec.SchemaProps{ - 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 delete immediately. 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.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "statefulSetUpdateStrategy": { - SchemaProps: spec.SchemaProps{ - Description: "StatefulSetUpdateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template.", - Type: []string{"string"}, - Format: "", - }, - }, - "podManagementPolicy": { - SchemaProps: spec.SchemaProps{ - Description: "PodManagementPolicy of TiDB cluster StatefulSets", - Type: []string{"string"}, - Format: "", - }, - }, - "topologySpreadConstraints": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-map-keys": []interface{}{ - "topologyKey", - }, - "x-kubernetes-list-type": "map", - }, - }, - SchemaProps: spec.SchemaProps{ - 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. This field is is only honored by clusters that enables the EvenPodsSpread feature. All topologySpreadConstraints are ANDed.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TopologySpreadConstraint"), - }, - }, - }, - }, - }, - "limits": { - SchemaProps: spec.SchemaProps{ - Description: "Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - "requests": { - SchemaProps: spec.SchemaProps{ - Description: "Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - "serviceAccount": { - SchemaProps: spec.SchemaProps{ - Description: "Specify a Service Account for TiFlash", - Type: []string{"string"}, - Format: "", - }, - }, - "replicas": { - SchemaProps: spec.SchemaProps{ - Description: "The desired ready replicas", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "baseImage": { - SchemaProps: spec.SchemaProps{ - Description: "Base image of the component, image tag is now allowed during validation", - Type: []string{"string"}, - Format: "", - }, - }, - "privileged": { - SchemaProps: spec.SchemaProps{ - Description: "Whether create the TiFlash container in privileged mode, it is highly discouraged to enable this in critical environment. Optional: defaults to false", - Type: []string{"boolean"}, - Format: "", - }, - }, - "maxFailoverCount": { - SchemaProps: spec.SchemaProps{ - Description: "MaxFailoverCount limit the max replicas could be added in failover, 0 means no failover Optional: Defaults to 3", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "storageClaims": { - SchemaProps: spec.SchemaProps{ - Description: "The persistent volume claims of the TiFlash data storages. TiFlash supports multiple disks.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.StorageClaim"), - }, - }, - }, - }, - }, - "config": { - SchemaProps: spec.SchemaProps{ - Description: "Config is the Configuration of TiFlash", - Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiFlashConfigWraper"), - }, - }, - "logTailer": { - SchemaProps: spec.SchemaProps{ - Description: "LogTailer is the configurations of the log tailers for TiFlash", - Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.LogTailerSpec"), - }, - }, - "recoverFailover": { - SchemaProps: spec.SchemaProps{ - Description: "RecoverFailover indicates that Operator can recover the failover Pods", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"replicas", "storageClaims"}, - }, - }, - Dependencies: []string{ - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.LogTailerSpec", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.StorageClaim", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiFlashConfigWraper", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TopologySpreadConstraint", "k8s.io/api/core/v1.Affinity", "k8s.io/api/core/v1.Container", "k8s.io/api/core/v1.EnvVar", "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PodSecurityContext", "k8s.io/api/core/v1.Toleration", "k8s.io/api/core/v1.Volume", "k8s.io/api/core/v1.VolumeMount", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, - } -} - -func schema_pkg_apis_pingcap_v1alpha1_TiKVBackupConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "num-threads": { - SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", - }, - }, - }, - }, - }, - } -} - -func schema_pkg_apis_pingcap_v1alpha1_TiKVBlockCacheConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TiKVBlockCacheConfig is the config of a block cache", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "shared": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: Defaults to true", - Type: []string{"boolean"}, - Format: "", - }, - }, - "capacity": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "num-shard-bits": { - SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", - }, - }, - "strict-capacity-limit": { - SchemaProps: spec.SchemaProps{ - Type: []string{"boolean"}, - Format: "", - }, - }, - "high-pri-pool-ratio": { - SchemaProps: spec.SchemaProps{ - Type: []string{"number"}, - Format: "double", - }, - }, - "memory-allocator": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} - -func schema_pkg_apis_pingcap_v1alpha1_TiKVCfConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TiKVCfConfig is the config of a cf", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "block-size": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "block-cache-size": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "disable-block-cache": { - SchemaProps: spec.SchemaProps{ - Type: []string{"boolean"}, - Format: "", + Type: []string{"boolean"}, + Format: "", }, }, "cache-index-and-filter-blocks": { @@ -12002,129 +11643,377 @@ func schema_pkg_apis_pingcap_v1alpha1_TidbClusterSpec(ref common.ReferenceCallba }, }, }, - "labels": { + "labels": { + SchemaProps: spec.SchemaProps{ + Description: "Base labels for TiDB cluster, all Pods in the cluster should have these labels. Can be overrode by labels in the specific component spec.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "tolerations": { + SchemaProps: spec.SchemaProps{ + Description: "Base tolerations of TiDB cluster Pods, components may add more tolerations upon this respectively", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.Toleration"), + }, + }, + }, + }, + }, + "timezone": { + SchemaProps: spec.SchemaProps{ + Description: "Time zone of TiDB cluster Pods Optional: Defaults to UTC", + Type: []string{"string"}, + Format: "", + }, + }, + "enableDynamicConfiguration": { + SchemaProps: spec.SchemaProps{ + Description: "EnableDynamicConfiguration indicates whether to append `--advertise-status-addr` to the startup parameters of TiKV.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "clusterDomain": { + SchemaProps: spec.SchemaProps{ + Description: "ClusterDomain is the Kubernetes Cluster Domain of TiDB cluster Optional: Defaults to \"\"", + Type: []string{"string"}, + Format: "", + }, + }, + "cluster": { + SchemaProps: spec.SchemaProps{ + Description: "Cluster is the external cluster, if configured, the components in this TidbCluster will join to this configured cluster.", + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbClusterRef"), + }, + }, + "pdAddresses": { + SchemaProps: spec.SchemaProps{ + Description: "PDAddresses are the external PD addresses, if configured, the PDs in this TidbCluster will join to the configured PD cluster.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "statefulSetUpdateStrategy": { + SchemaProps: spec.SchemaProps{ + Description: "StatefulSetUpdateStrategy of TiDB cluster StatefulSets", + Type: []string{"string"}, + Format: "", + }, + }, + "podManagementPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "PodManagementPolicy of TiDB cluster StatefulSets", + Type: []string{"string"}, + Format: "", + }, + }, + "podSecurityContext": { + SchemaProps: spec.SchemaProps{ + Description: "PodSecurityContext of the component", + Ref: ref("k8s.io/api/core/v1.PodSecurityContext"), + }, + }, + "topologySpreadConstraints": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "topologyKey", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + 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. This field is is only honored by clusters that enables the EvenPodsSpread feature. All topologySpreadConstraints are ANDed.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TopologySpreadConstraint"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.DiscoverySpec", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.HelperSpec", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PDSpec", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PumpSpec", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TLSCluster", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiCDCSpec", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBSpec", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiFlashSpec", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVSpec", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbClusterRef", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TopologySpreadConstraint", "k8s.io/api/core/v1.Affinity", "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PodSecurityContext", "k8s.io/api/core/v1.Toleration"}, + } +} + +func schema_pkg_apis_pingcap_v1alpha1_TidbInitializer(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TidbInitializer is a TiDB cluster initializing job", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + 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{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + 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{"string"}, + Format: "", + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec defines the desired state of TidbInitializer", + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbInitializerSpec"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbInitializerSpec"}, + } +} + +func schema_pkg_apis_pingcap_v1alpha1_TidbInitializerList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + 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{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + 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{"string"}, + Format: "", + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbInitializer"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbInitializer"}, + } +} + +func schema_pkg_apis_pingcap_v1alpha1_TidbInitializerSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TidbInitializer spec encode the desired state of tidb initializer Job", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "image": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "cluster": { + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbClusterRef"), + }, + }, + "podSecurityContext": { SchemaProps: spec.SchemaProps{ - Description: "Base labels for TiDB cluster, all Pods in the cluster should have these labels. Can be overrode by labels in the specific component spec.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "PodSecurityContext of the component", + Ref: ref("k8s.io/api/core/v1.PodSecurityContext"), }, }, - "tolerations": { + "imagePullPolicy": { SchemaProps: spec.SchemaProps{ - Description: "Base tolerations of TiDB cluster Pods, components may add more tolerations upon this respectively", + Type: []string{"string"}, + Format: "", + }, + }, + "imagePullSecrets": { + SchemaProps: spec.SchemaProps{ + Description: "ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.Toleration"), + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), }, }, }, }, }, - "timezone": { + "permitHost": { SchemaProps: spec.SchemaProps{ - Description: "Time zone of TiDB cluster Pods Optional: Defaults to UTC", + Description: "permitHost is the host which will only be allowed to connect to the TiDB.", Type: []string{"string"}, Format: "", }, }, - "enableDynamicConfiguration": { + "initSql": { SchemaProps: spec.SchemaProps{ - Description: "EnableDynamicConfiguration indicates whether to append `--advertise-status-addr` to the startup parameters of TiKV.", - Type: []string{"boolean"}, + Description: "InitSql is the SQL statements executed after the TiDB cluster is bootstrapped.", + Type: []string{"string"}, Format: "", }, }, - "clusterDomain": { + "initSqlConfigMap": { SchemaProps: spec.SchemaProps{ - Description: "ClusterDomain is the Kubernetes Cluster Domain of TiDB cluster Optional: Defaults to \"\"", + Description: "InitSqlConfigMapName reference a configmap that provide init-sql, take high precedence than initSql if set", Type: []string{"string"}, Format: "", }, }, - "cluster": { + "passwordSecret": { SchemaProps: spec.SchemaProps{ - Description: "Cluster is the external cluster, if configured, the components in this TidbCluster will join to this configured cluster.", - Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbClusterRef"), + Type: []string{"string"}, + Format: "", }, }, - "pdAddresses": { + "resources": { SchemaProps: spec.SchemaProps{ - Description: "PDAddresses are the external PD addresses, if configured, the PDs in this TidbCluster will join to the configured PD cluster.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + Ref: ref("k8s.io/api/core/v1.ResourceRequirements"), }, }, - "statefulSetUpdateStrategy": { + "timezone": { SchemaProps: spec.SchemaProps{ - Description: "StatefulSetUpdateStrategy of TiDB cluster StatefulSets", + Description: "Time zone of TiDB initializer Pods", Type: []string{"string"}, Format: "", }, }, - "podManagementPolicy": { + "tlsClientSecretName": { SchemaProps: spec.SchemaProps{ - Description: "PodManagementPolicy of TiDB cluster StatefulSets", + Description: "TLSClientSecretName is the name of secret which stores tidb server client certificate Optional: Defaults to nil", Type: []string{"string"}, Format: "", }, }, - "podSecurityContext": { - SchemaProps: spec.SchemaProps{ - Description: "PodSecurityContext of the component", - Ref: ref("k8s.io/api/core/v1.PodSecurityContext"), - }, - }, - "topologySpreadConstraints": { + }, + Required: []string{"image", "cluster"}, + }, + }, + Dependencies: []string{ + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbClusterRef", "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PodSecurityContext", "k8s.io/api/core/v1.ResourceRequirements"}, + } +} + +func schema_pkg_apis_pingcap_v1alpha1_TidbInitializerStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "conditions": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ - "x-kubernetes-list-map-keys": []interface{}{ - "topologyKey", - }, - "x-kubernetes-list-type": "map", + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge", }, }, SchemaProps: spec.SchemaProps{ - 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. This field is is only honored by clusters that enables the EvenPodsSpread feature. All topologySpreadConstraints are ANDed.", + Description: "The latest available observations of an object's current state. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TopologySpreadConstraint"), + Ref: ref("k8s.io/api/batch/v1.JobCondition"), }, }, }, }, }, + "startTime": { + SchemaProps: spec.SchemaProps{ + Description: "Represents time when the job was acknowledged by the job controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "completionTime": { + SchemaProps: spec.SchemaProps{ + Description: "Represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "active": { + SchemaProps: spec.SchemaProps{ + Description: "The number of actively running pods.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "succeeded": { + SchemaProps: spec.SchemaProps{ + Description: "The number of pods which reached phase Succeeded.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "failed": { + SchemaProps: spec.SchemaProps{ + Description: "The number of pods which reached phase Failed.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "phase": { + SchemaProps: spec.SchemaProps{ + Description: "Phase is a user readable state inferred from the underlying Job status and TidbCluster status", + Type: []string{"string"}, + Format: "", + }, + }, }, }, }, Dependencies: []string{ - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.DiscoverySpec", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.HelperSpec", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PDSpec", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PumpSpec", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TLSCluster", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiCDCSpec", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBSpec", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiFlashSpec", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVSpec", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbClusterRef", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TopologySpreadConstraint", "k8s.io/api/core/v1.Affinity", "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PodSecurityContext", "k8s.io/api/core/v1.Toleration"}, + "k8s.io/api/batch/v1.JobCondition", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, } } -func schema_pkg_apis_pingcap_v1alpha1_TidbInitializer(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_pingcap_v1alpha1_TidbMonitor(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "TidbInitializer is a TiDB cluster initializing job", + Description: "TidbMonitor encode the spec and status of the monitoring component of a TiDB cluster", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -12143,8 +12032,8 @@ func schema_pkg_apis_pingcap_v1alpha1_TidbInitializer(ref common.ReferenceCallba }, "spec": { SchemaProps: spec.SchemaProps{ - Description: "Spec defines the desired state of TidbInitializer", - Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbInitializerSpec"), + Description: "Spec defines the desired state of TidbMonitor", + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbMonitorSpec"), }, }, }, @@ -12152,15 +12041,16 @@ func schema_pkg_apis_pingcap_v1alpha1_TidbInitializer(ref common.ReferenceCallba }, }, Dependencies: []string{ - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbInitializerSpec"}, + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbMonitorSpec"}, } } -func schema_pkg_apis_pingcap_v1alpha1_TidbInitializerList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_pingcap_v1alpha1_TidbMonitorList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, + Description: "TidbMonitorList is TidbMonitor list", + Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { SchemaProps: spec.SchemaProps{ @@ -12182,49 +12072,130 @@ func schema_pkg_apis_pingcap_v1alpha1_TidbInitializerList(ref common.ReferenceCa Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbInitializer"), + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbMonitor"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbMonitor"}, + } +} + +func schema_pkg_apis_pingcap_v1alpha1_TidbMonitorRef(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TidbMonitorRef reference to a TidbMonitor", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "namespace": { + SchemaProps: spec.SchemaProps{ + Description: "Namespace is the namespace that TidbMonitor object locates, default to the same namespace with TidbClusterAutoScaler", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is the name of TidbMonitor object", + Type: []string{"string"}, + Format: "", + }, + }, + "grafanaEnabled": { + SchemaProps: spec.SchemaProps{ + Description: "GrafanaEnabled indicate whether the grafana is enabled for this target tidbmonitor", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"name"}, + }, + }, + } +} + +func schema_pkg_apis_pingcap_v1alpha1_TidbMonitorSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TidbMonitor spec encode the desired state of tidb monitoring component", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "clusters": { + SchemaProps: spec.SchemaProps{ + Description: "monitored TiDB cluster info", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbClusterRef"), }, }, }, }, }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbInitializer"}, - } -} - -func schema_pkg_apis_pingcap_v1alpha1_TidbInitializerSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TidbInitializer spec encode the desired state of tidb initializer Job", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "image": { + "prometheus": { + SchemaProps: spec.SchemaProps{ + Description: "Prometheus spec", + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PrometheusSpec"), + }, + }, + "grafana": { + SchemaProps: spec.SchemaProps{ + Description: "Grafana spec", + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.GrafanaSpec"), + }, + }, + "reloader": { + SchemaProps: spec.SchemaProps{ + Description: "Reloader spec", + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.ReloaderSpec"), + }, + }, + "initializer": { + SchemaProps: spec.SchemaProps{ + Description: "Initializer spec", + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.InitializerSpec"), + }, + }, + "dm": { + SchemaProps: spec.SchemaProps{ + Description: "monitored DM cluster spec", + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.DMMonitorSpec"), + }, + }, + "thanos": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "Thanos spec", + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.ThanosSpec"), }, }, - "cluster": { + "prometheusReloader": { SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbClusterRef"), + Description: "PrometheusReloader set prometheus reloader configuration", + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PrometheusReloaderSpec"), }, }, - "podSecurityContext": { + "pvReclaimPolicy": { SchemaProps: spec.SchemaProps{ - Description: "PodSecurityContext of the component", - Ref: ref("k8s.io/api/core/v1.PodSecurityContext"), + Description: "Persistent volume reclaim policy applied to the PVs that consumed by TiDB cluster", + Type: []string{"string"}, + Format: "", }, }, "imagePullPolicy": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "ImagePullPolicy of TidbMonitor Pods", + Type: []string{"string"}, + Format: "", }, }, "imagePullSecrets": { @@ -12240,175 +12211,202 @@ func schema_pkg_apis_pingcap_v1alpha1_TidbInitializerSpec(ref common.ReferenceCa }, }, }, - "permitHost": { + "persistent": { SchemaProps: spec.SchemaProps{ - Description: "permitHost is the host which will only be allowed to connect to the TiDB.", - Type: []string{"string"}, + Description: "If Persistent enabled, storageClassName must be set to an existing storage. Defaults to false.", + Type: []string{"boolean"}, Format: "", }, }, - "initSql": { + "storageClassName": { SchemaProps: spec.SchemaProps{ - Description: "InitSql is the SQL statements executed after the TiDB cluster is bootstrapped.", + Description: "The storageClassName of the persistent volume for TidbMonitor data storage. Defaults to Kubernetes default storage class.", Type: []string{"string"}, Format: "", }, }, - "initSqlConfigMap": { + "storage": { SchemaProps: spec.SchemaProps{ - Description: "InitSqlConfigMapName reference a configmap that provide init-sql, take high precedence than initSql if set", + Description: "Size of the persistent volume.", Type: []string{"string"}, Format: "", }, }, - "passwordSecret": { + "nodeSelector": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "NodeSelector of the TidbMonitor.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "resources": { + "annotations": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.ResourceRequirements"), + Description: "Annotations for the TidbMonitor. Optional: Defaults to cluster-level setting", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "timezone": { + "labels": { SchemaProps: spec.SchemaProps{ - Description: "Time zone of TiDB initializer Pods", + Description: "Labels for the TidbMonitor.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "tolerations": { + SchemaProps: spec.SchemaProps{ + Description: "Tolerations of the TidbMonitor.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.Toleration"), + }, + }, + }, + }, + }, + "kubePrometheusURL": { + SchemaProps: spec.SchemaProps{ + Description: "kubePrometheusURL is where tidb-monitoring get the common metrics of kube-prometheus. Ref: https://github.com/coreos/kube-prometheus", Type: []string{"string"}, Format: "", }, }, - "tlsClientSecretName": { + "alertmanagerURL": { SchemaProps: spec.SchemaProps{ - Description: "TLSClientSecretName is the name of secret which stores tidb server client certificate Optional: Defaults to nil", + Description: "alertmanagerURL is where tidb-monitoring push alerts to. Ref: https://prometheus.io/docs/alerting/alertmanager/", Type: []string{"string"}, Format: "", }, }, - }, - Required: []string{"image", "cluster"}, - }, - }, - Dependencies: []string{ - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbClusterRef", "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PodSecurityContext", "k8s.io/api/core/v1.ResourceRequirements"}, - } -} - -func schema_pkg_apis_pingcap_v1alpha1_TidbInitializerStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "conditions": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge", - }, + "alertManagerRulesVersion": { + SchemaProps: spec.SchemaProps{ + Description: "alertManagerRulesVersion is the version of the tidb cluster that used for alert rules. default to current tidb cluster version, for example: v3.0.15", + Type: []string{"string"}, + Format: "", }, + }, + "additionalContainers": { SchemaProps: spec.SchemaProps{ - Description: "The latest available observations of an object's current state. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/", + Description: "Additional containers of the TidbMonitor.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/batch/v1.JobCondition"), + Ref: ref("k8s.io/api/core/v1.Container"), }, }, }, }, }, - "startTime": { + "clusterScoped": { SchemaProps: spec.SchemaProps{ - Description: "Represents time when the job was acknowledged by the job controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Description: "ClusterScoped indicates whether this monitor should manage Kubernetes cluster-wide TiDB clusters", + Type: []string{"boolean"}, + Format: "", }, }, - "completionTime": { + "externalLabels": { SchemaProps: spec.SchemaProps{ - Description: "Represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Description: "The labels to add to any time series or alerts when communicating with external systems (federation, remote storage, Alertmanager).", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "active": { + "replicaExternalLabelName": { SchemaProps: spec.SchemaProps{ - Description: "The number of actively running pods.", - Type: []string{"integer"}, - Format: "int32", + Description: "Name of Prometheus external label used to denote replica name. Defaults to the value of `prometheus_replica`. External label will _not_ be added when value is set to empty string (`\"\"`).", + Type: []string{"string"}, + Format: "", }, }, - "succeeded": { + "replicas": { SchemaProps: spec.SchemaProps{ - Description: "The number of pods which reached phase Succeeded.", + Description: "Replicas is the number of desired replicas. Defaults to 1.", Type: []string{"integer"}, Format: "int32", }, }, - "failed": { + "shards": { SchemaProps: spec.SchemaProps{ - Description: "The number of pods which reached phase Failed.", + Description: "EXPERIMENTAL: Number of shards to distribute targets onto. Number of replicas multiplied by shards is the total number of Pods created. Note that scaling down shards will not reshard data onto remaining instances, it must be manually moved. Increasing shards will not reshard data either but it will continue to be available from the same instances. To query globally use Thanos sidecar and Thanos querier or remote write data to a central location. Sharding is done on the content of the `__address__` target meta-label.", Type: []string{"integer"}, Format: "int32", }, }, - "phase": { + "additionalVolumes": { SchemaProps: spec.SchemaProps{ - Description: "Phase is a user readable state inferred from the underlying Job status and TidbCluster status", - Type: []string{"string"}, - Format: "", + Description: "Additional volumes of TidbMonitor pod.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.Volume"), + }, + }, + }, }, }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/batch/v1.JobCondition", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - } -} - -func schema_pkg_apis_pingcap_v1alpha1_TidbMonitor(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TidbMonitor encode the spec and status of the monitoring component of a TiDB cluster", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { + "podSecurityContext": { SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", + Description: "PodSecurityContext of TidbMonitor pod.", + Ref: ref("k8s.io/api/core/v1.PodSecurityContext"), }, }, - "apiVersion": { + "enableAlertRules": { SchemaProps: spec.SchemaProps{ - 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{"string"}, + Description: "EnableAlertRules adds alert rules to the Prometheus config even if `AlertmanagerURL` is not configured.", + Type: []string{"boolean"}, Format: "", }, }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Spec defines the desired state of TidbMonitor", - Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbMonitorSpec"), - }, - }, }, - Required: []string{"spec"}, + Required: []string{"prometheus", "reloader", "initializer"}, }, }, Dependencies: []string{ - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbMonitorSpec"}, + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.DMMonitorSpec", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.GrafanaSpec", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.InitializerSpec", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PrometheusReloaderSpec", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PrometheusSpec", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.ReloaderSpec", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.ThanosSpec", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbClusterRef", "k8s.io/api/core/v1.Container", "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PodSecurityContext", "k8s.io/api/core/v1.Toleration", "k8s.io/api/core/v1.Volume"}, } } -func schema_pkg_apis_pingcap_v1alpha1_TidbMonitorList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_pingcap_v1alpha1_TidbNGMonitoring(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "TidbMonitorList is TidbMonitor list", + Description: "TidbNGMonitoring contains the spec and status of tidb ng monitor", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -12425,134 +12423,80 @@ func schema_pkg_apis_pingcap_v1alpha1_TidbMonitorList(ref common.ReferenceCallba Format: "", }, }, - "items": { + "spec": { SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbMonitor"), - }, - }, - }, + Description: "Spec contains all spec about tidb ng monitor", + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbNGMonitoringSpec"), }, }, }, - Required: []string{"items"}, + Required: []string{"spec"}, }, }, Dependencies: []string{ - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbMonitor"}, + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbNGMonitoringSpec"}, } } -func schema_pkg_apis_pingcap_v1alpha1_TidbMonitorRef(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_pingcap_v1alpha1_TidbNGMonitoringList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "TidbMonitorRef reference to a TidbMonitor", + Description: "TiDBNGMonitoringList is TidbNGMonitoring list", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "namespace": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "Namespace is the namespace that TidbMonitor object locates, default to the same namespace with TidbClusterAutoScaler", + 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{"string"}, Format: "", }, }, - "name": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "Name is the name of TidbMonitor object", + 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{"string"}, Format: "", }, }, - "grafanaEnabled": { + "items": { SchemaProps: spec.SchemaProps{ - Description: "GrafanaEnabled indicate whether the grafana is enabled for this target tidbmonitor", - Type: []string{"boolean"}, - Format: "", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbNGMonitoring"), + }, + }, + }, }, }, }, - Required: []string{"name"}, + Required: []string{"items"}, }, }, + Dependencies: []string{ + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbNGMonitoring"}, } } -func schema_pkg_apis_pingcap_v1alpha1_TidbMonitorSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_pingcap_v1alpha1_TidbNGMonitoringSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "TidbMonitor spec encode the desired state of tidb monitoring component", + Description: "TidbNGMonitoringSpec is spec of tidb ng monitoring", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "clusters": { - SchemaProps: spec.SchemaProps{ - Description: "monitored TiDB cluster info", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbClusterRef"), - }, - }, - }, - }, - }, - "prometheus": { - SchemaProps: spec.SchemaProps{ - Description: "Prometheus spec", - Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PrometheusSpec"), - }, - }, - "grafana": { - SchemaProps: spec.SchemaProps{ - Description: "Grafana spec", - Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.GrafanaSpec"), - }, - }, - "reloader": { - SchemaProps: spec.SchemaProps{ - Description: "Reloader spec", - Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.ReloaderSpec"), - }, - }, - "initializer": { - SchemaProps: spec.SchemaProps{ - Description: "Initializer spec", - Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.InitializerSpec"), - }, - }, - "dm": { - SchemaProps: spec.SchemaProps{ - Description: "monitored DM cluster spec", - Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.DMMonitorSpec"), - }, - }, - "thanos": { - SchemaProps: spec.SchemaProps{ - Description: "Thanos spec", - Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.ThanosSpec"), - }, - }, - "prometheusReloader": { - SchemaProps: spec.SchemaProps{ - Description: "PrometheusReloader set prometheus reloader configuration", - Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PrometheusReloaderSpec"), - }, - }, - "pvReclaimPolicy": { + "version": { SchemaProps: spec.SchemaProps{ - Description: "Persistent volume reclaim policy applied to the PVs that consumed by TiDB cluster", + Description: "Version of the component. Override the cluster-level version if non-empty Optional: Defaults to cluster-level setting", Type: []string{"string"}, Format: "", }, }, "imagePullPolicy": { SchemaProps: spec.SchemaProps{ - Description: "ImagePullPolicy of TidbMonitor Pods", + Description: "ImagePullPolicy of the component. Override the cluster-level imagePullPolicy if present Optional: Defaults to cluster-level setting", Type: []string{"string"}, Format: "", }, @@ -12570,30 +12514,36 @@ func schema_pkg_apis_pingcap_v1alpha1_TidbMonitorSpec(ref common.ReferenceCallba }, }, }, - "persistent": { + "hostNetwork": { SchemaProps: spec.SchemaProps{ - Description: "If Persistent enabled, storageClassName must be set to an existing storage. Defaults to false.", + Description: "Whether Hostnetwork of the component is enabled. Override the cluster-level setting if present Optional: Defaults to cluster-level setting", Type: []string{"boolean"}, Format: "", }, }, - "storageClassName": { + "affinity": { SchemaProps: spec.SchemaProps{ - Description: "The storageClassName of the persistent volume for TidbMonitor data storage. Defaults to Kubernetes default storage class.", + Description: "Affinity of the component. Override the cluster-level setting if present. Optional: Defaults to cluster-level setting", + Ref: ref("k8s.io/api/core/v1.Affinity"), + }, + }, + "priorityClassName": { + SchemaProps: spec.SchemaProps{ + Description: "PriorityClassName of the component. Override the cluster-level one if present Optional: Defaults to cluster-level setting", Type: []string{"string"}, Format: "", }, }, - "storage": { + "schedulerName": { SchemaProps: spec.SchemaProps{ - Description: "Size of the persistent volume.", + Description: "SchedulerName of the component. Override the cluster-level one if present Optional: Defaults to cluster-level setting", Type: []string{"string"}, Format: "", }, }, "nodeSelector": { SchemaProps: spec.SchemaProps{ - Description: "NodeSelector of the TidbMonitor.", + Description: "NodeSelector of the component. Merged into the cluster-level nodeSelector if non-empty Optional: Defaults to cluster-level setting", Type: []string{"object"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, @@ -12608,7 +12558,7 @@ func schema_pkg_apis_pingcap_v1alpha1_TidbMonitorSpec(ref common.ReferenceCallba }, "annotations": { SchemaProps: spec.SchemaProps{ - Description: "Annotations for the TidbMonitor. Optional: Defaults to cluster-level setting", + Description: "Annotations for the component. Merge into the cluster-level annotations if non-empty Optional: Defaults to cluster-level setting", Type: []string{"object"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, @@ -12623,7 +12573,7 @@ func schema_pkg_apis_pingcap_v1alpha1_TidbMonitorSpec(ref common.ReferenceCallba }, "labels": { SchemaProps: spec.SchemaProps{ - Description: "Labels for the TidbMonitor.", + Description: "Labels for the component. Merge into the cluster-level labels if non-empty Optional: Defaults to cluster-level setting", Type: []string{"object"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, @@ -12638,7 +12588,7 @@ func schema_pkg_apis_pingcap_v1alpha1_TidbMonitorSpec(ref common.ReferenceCallba }, "tolerations": { SchemaProps: spec.SchemaProps{ - Description: "Tolerations of the TidbMonitor.", + Description: "Tolerations of the component. Override the cluster-level tolerations if non-empty Optional: Defaults to cluster-level setting", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -12649,30 +12599,48 @@ func schema_pkg_apis_pingcap_v1alpha1_TidbMonitorSpec(ref common.ReferenceCallba }, }, }, - "kubePrometheusURL": { + "podSecurityContext": { SchemaProps: spec.SchemaProps{ - Description: "kubePrometheusURL is where tidb-monitoring get the common metrics of kube-prometheus. Ref: https://github.com/coreos/kube-prometheus", - Type: []string{"string"}, - Format: "", + Description: "PodSecurityContext of the component", + Ref: ref("k8s.io/api/core/v1.PodSecurityContext"), }, }, - "alertmanagerURL": { + "configUpdateStrategy": { SchemaProps: spec.SchemaProps{ - Description: "alertmanagerURL is where tidb-monitoring push alerts to. Ref: https://prometheus.io/docs/alerting/alertmanager/", + Description: "ConfigUpdateStrategy of the component. Override the cluster-level updateStrategy if present Optional: Defaults to cluster-level setting", Type: []string{"string"}, Format: "", }, }, - "alertManagerRulesVersion": { + "env": { SchemaProps: spec.SchemaProps{ - Description: "alertManagerRulesVersion is the version of the tidb cluster that used for alert rules. default to current tidb cluster version, for example: v3.0.15", - Type: []string{"string"}, - Format: "", + Description: "List of environment variables to set in the container, like v1.Container.Env. Note that the following env names cannot be used and will be overridden by TiDB Operator builtin envs - NAMESPACE - TZ - SERVICE_NAME - PEER_SERVICE_NAME - HEADLESS_SERVICE_NAME - SET_NAME - HOSTNAME - CLUSTER_NAME - POD_NAME - BINLOG_ENABLED - SLOW_LOG_FILE", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.EnvVar"), + }, + }, + }, + }, + }, + "initContainers": { + SchemaProps: spec.SchemaProps{ + Description: "Init containers of the components", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.Container"), + }, + }, + }, }, }, "additionalContainers": { SchemaProps: spec.SchemaProps{ - Description: "Additional containers of the TidbMonitor.", + Description: "Additional containers of the component.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -12683,81 +12651,120 @@ func schema_pkg_apis_pingcap_v1alpha1_TidbMonitorSpec(ref common.ReferenceCallba }, }, }, - "clusterScoped": { + "additionalVolumes": { SchemaProps: spec.SchemaProps{ - Description: "ClusterScoped indicates whether this monitor should manage Kubernetes cluster-wide TiDB clusters", - Type: []string{"boolean"}, - Format: "", + Description: "Additional volumes of component pod.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.Volume"), + }, + }, + }, }, }, - "externalLabels": { + "additionalVolumeMounts": { SchemaProps: spec.SchemaProps{ - Description: "The labels to add to any time series or alerts when communicating with external systems (federation, remote storage, Alertmanager).", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, + Description: "Additional volume mounts of component pod.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Ref: ref("k8s.io/api/core/v1.VolumeMount"), }, }, }, }, }, - "replicaExternalLabelName": { + "terminationGracePeriodSeconds": { SchemaProps: spec.SchemaProps{ - Description: "Name of Prometheus external label used to denote replica name. Defaults to the value of `prometheus_replica`. External label will _not_ be added when value is set to empty string (`\"\"`).", + 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 delete immediately. 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.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "statefulSetUpdateStrategy": { + SchemaProps: spec.SchemaProps{ + Description: "StatefulSetUpdateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template.", Type: []string{"string"}, Format: "", }, }, - "replicas": { + "podManagementPolicy": { SchemaProps: spec.SchemaProps{ - Description: "Replicas is the number of desired replicas. Defaults to 1.", - Type: []string{"integer"}, - Format: "int32", + Description: "PodManagementPolicy of TiDB cluster StatefulSets", + Type: []string{"string"}, + Format: "", }, }, - "shards": { + "topologySpreadConstraints": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "topologyKey", + }, + "x-kubernetes-list-type": "map", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "EXPERIMENTAL: Number of shards to distribute targets onto. Number of replicas multiplied by shards is the total number of Pods created. Note that scaling down shards will not reshard data onto remaining instances, it must be manually moved. Increasing shards will not reshard data either but it will continue to be available from the same instances. To query globally use Thanos sidecar and Thanos querier or remote write data to a central location. Sharding is done on the content of the `__address__` target meta-label.", - Type: []string{"integer"}, - Format: "int32", + 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. This field is is only honored by clusters that enables the EvenPodsSpread feature. All topologySpreadConstraints are ANDed.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TopologySpreadConstraint"), + }, + }, + }, }, }, - "additionalVolumes": { + "clusters": { SchemaProps: spec.SchemaProps{ - Description: "Additional volumes of TidbMonitor pod.", + Description: "Clusters reference TiDB cluster", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.Volume"), + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbClusterRef"), }, }, }, }, }, - "podSecurityContext": { + "paused": { SchemaProps: spec.SchemaProps{ - Description: "PodSecurityContext of TidbMonitor pod.", - Ref: ref("k8s.io/api/core/v1.PodSecurityContext"), + Description: "Paused pause controller if it is true", + Type: []string{"boolean"}, + Format: "", }, }, - "enableAlertRules": { + "pvReclaimPolicy": { SchemaProps: spec.SchemaProps{ - Description: "EnableAlertRules adds alert rules to the Prometheus config even if `AlertmanagerURL` is not configured.", - Type: []string{"boolean"}, + Description: "Persistent volume reclaim policy applied to the PVs that consumed by tidb ng monitoring", + Type: []string{"string"}, Format: "", }, }, + "clusterDomain": { + SchemaProps: spec.SchemaProps{ + Description: "ClusterDomain is the Kubernetes Cluster Domain of tidb ng monitoring", + Type: []string{"string"}, + Format: "", + }, + }, + "ngMonitoring": { + SchemaProps: spec.SchemaProps{ + Description: "NGMonitoring is spec of ng monitoring", + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.NGMonitoringSpec"), + }, + }, }, - Required: []string{"prometheus", "reloader", "initializer"}, + Required: []string{"clusters", "ngMonitoring"}, }, }, Dependencies: []string{ - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.DMMonitorSpec", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.GrafanaSpec", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.InitializerSpec", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PrometheusReloaderSpec", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PrometheusSpec", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.ReloaderSpec", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.ThanosSpec", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbClusterRef", "k8s.io/api/core/v1.Container", "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PodSecurityContext", "k8s.io/api/core/v1.Toleration", "k8s.io/api/core/v1.Volume"}, + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.NGMonitoringSpec", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbClusterRef", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TopologySpreadConstraint", "k8s.io/api/core/v1.Affinity", "k8s.io/api/core/v1.Container", "k8s.io/api/core/v1.EnvVar", "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PodSecurityContext", "k8s.io/api/core/v1.Toleration", "k8s.io/api/core/v1.Volume", "k8s.io/api/core/v1.VolumeMount"}, } } diff --git a/pkg/apis/pingcap/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/pingcap/v1alpha1/zz_generated.deepcopy.go index ddea51cb5fe..eedcdca3b6b 100644 --- a/pkg/apis/pingcap/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/pingcap/v1alpha1/zz_generated.deepcopy.go @@ -5324,112 +5324,6 @@ func (in *TiDBMember) DeepCopy() *TiDBMember { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TiDBNGMonitoring) DeepCopyInto(out *TiDBNGMonitoring) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TiDBNGMonitoring. -func (in *TiDBNGMonitoring) DeepCopy() *TiDBNGMonitoring { - if in == nil { - return nil - } - out := new(TiDBNGMonitoring) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *TiDBNGMonitoring) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TiDBNGMonitoringList) DeepCopyInto(out *TiDBNGMonitoringList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]TiDBNGMonitoring, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TiDBNGMonitoringList. -func (in *TiDBNGMonitoringList) DeepCopy() *TiDBNGMonitoringList { - if in == nil { - return nil - } - out := new(TiDBNGMonitoringList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *TiDBNGMonitoringList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TiDBNGMonitoringSpec) DeepCopyInto(out *TiDBNGMonitoringSpec) { - *out = *in - in.ComponentSpec.DeepCopyInto(&out.ComponentSpec) - if in.Clusters != nil { - in, out := &in.Clusters, &out.Clusters - *out = make([]TidbClusterRef, len(*in)) - copy(*out, *in) - } - if in.PVReclaimPolicy != nil { - in, out := &in.PVReclaimPolicy, &out.PVReclaimPolicy - *out = new(v1.PersistentVolumeReclaimPolicy) - **out = **in - } - in.NGMonitoring.DeepCopyInto(&out.NGMonitoring) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TiDBNGMonitoringSpec. -func (in *TiDBNGMonitoringSpec) DeepCopy() *TiDBNGMonitoringSpec { - if in == nil { - return nil - } - out := new(TiDBNGMonitoringSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TiDBNGMonitoringStatus) DeepCopyInto(out *TiDBNGMonitoringStatus) { - *out = *in - in.NGMonitoring.DeepCopyInto(&out.NGMonitoring) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TiDBNGMonitoringStatus. -func (in *TiDBNGMonitoringStatus) DeepCopy() *TiDBNGMonitoringStatus { - if in == nil { - return nil - } - out := new(TiDBNGMonitoringStatus) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TiDBProbe) DeepCopyInto(out *TiDBProbe) { *out = *in @@ -8790,6 +8684,112 @@ func (in *TidbMonitorStatus) DeepCopy() *TidbMonitorStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TidbNGMonitoring) DeepCopyInto(out *TidbNGMonitoring) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TidbNGMonitoring. +func (in *TidbNGMonitoring) DeepCopy() *TidbNGMonitoring { + if in == nil { + return nil + } + out := new(TidbNGMonitoring) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TidbNGMonitoring) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TidbNGMonitoringList) DeepCopyInto(out *TidbNGMonitoringList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]TidbNGMonitoring, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TidbNGMonitoringList. +func (in *TidbNGMonitoringList) DeepCopy() *TidbNGMonitoringList { + if in == nil { + return nil + } + out := new(TidbNGMonitoringList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TidbNGMonitoringList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TidbNGMonitoringSpec) DeepCopyInto(out *TidbNGMonitoringSpec) { + *out = *in + in.ComponentSpec.DeepCopyInto(&out.ComponentSpec) + if in.Clusters != nil { + in, out := &in.Clusters, &out.Clusters + *out = make([]TidbClusterRef, len(*in)) + copy(*out, *in) + } + if in.PVReclaimPolicy != nil { + in, out := &in.PVReclaimPolicy, &out.PVReclaimPolicy + *out = new(v1.PersistentVolumeReclaimPolicy) + **out = **in + } + in.NGMonitoring.DeepCopyInto(&out.NGMonitoring) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TidbNGMonitoringSpec. +func (in *TidbNGMonitoringSpec) DeepCopy() *TidbNGMonitoringSpec { + if in == nil { + return nil + } + out := new(TidbNGMonitoringSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TidbNGMonitoringStatus) DeepCopyInto(out *TidbNGMonitoringStatus) { + *out = *in + in.NGMonitoring.DeepCopyInto(&out.NGMonitoring) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TidbNGMonitoringStatus. +func (in *TidbNGMonitoringStatus) DeepCopy() *TidbNGMonitoringStatus { + if in == nil { + return nil + } + out := new(TidbNGMonitoringStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TikvAutoScalerSpec) DeepCopyInto(out *TikvAutoScalerSpec) { *out = *in diff --git a/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/fake/fake_pingcap_client.go b/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/fake/fake_pingcap_client.go index e3297745239..1e5dfbc8c7d 100644 --- a/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/fake/fake_pingcap_client.go +++ b/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/fake/fake_pingcap_client.go @@ -45,10 +45,6 @@ func (c *FakePingcapV1alpha1) Restores(namespace string) v1alpha1.RestoreInterfa return &FakeRestores{c, namespace} } -func (c *FakePingcapV1alpha1) TiDBNGMonitorings(namespace string) v1alpha1.TiDBNGMonitoringInterface { - return &FakeTiDBNGMonitorings{c, namespace} -} - func (c *FakePingcapV1alpha1) TidbClusters(namespace string) v1alpha1.TidbClusterInterface { return &FakeTidbClusters{c, namespace} } @@ -65,6 +61,10 @@ func (c *FakePingcapV1alpha1) TidbMonitors(namespace string) v1alpha1.TidbMonito return &FakeTidbMonitors{c, namespace} } +func (c *FakePingcapV1alpha1) TidbNGMonitorings(namespace string) v1alpha1.TidbNGMonitoringInterface { + return &FakeTidbNGMonitorings{c, namespace} +} + // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. func (c *FakePingcapV1alpha1) RESTClient() rest.Interface { diff --git a/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/fake/fake_tidbngmonitoring.go b/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/fake/fake_tidbngmonitoring.go index 65ee2161fbf..4c71abca2c6 100644 --- a/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/fake/fake_tidbngmonitoring.go +++ b/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/fake/fake_tidbngmonitoring.go @@ -27,31 +27,31 @@ import ( testing "k8s.io/client-go/testing" ) -// FakeTiDBNGMonitorings implements TiDBNGMonitoringInterface -type FakeTiDBNGMonitorings struct { +// FakeTidbNGMonitorings implements TidbNGMonitoringInterface +type FakeTidbNGMonitorings struct { Fake *FakePingcapV1alpha1 ns string } var tidbngmonitoringsResource = schema.GroupVersionResource{Group: "pingcap.com", Version: "v1alpha1", Resource: "tidbngmonitorings"} -var tidbngmonitoringsKind = schema.GroupVersionKind{Group: "pingcap.com", Version: "v1alpha1", Kind: "TiDBNGMonitoring"} +var tidbngmonitoringsKind = schema.GroupVersionKind{Group: "pingcap.com", Version: "v1alpha1", Kind: "TidbNGMonitoring"} -// Get takes name of the tiDBNGMonitoring, and returns the corresponding tiDBNGMonitoring object, and an error if there is any. -func (c *FakeTiDBNGMonitorings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.TiDBNGMonitoring, err error) { +// Get takes name of the tidbNGMonitoring, and returns the corresponding tidbNGMonitoring object, and an error if there is any. +func (c *FakeTidbNGMonitorings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.TidbNGMonitoring, err error) { obj, err := c.Fake. - Invokes(testing.NewGetAction(tidbngmonitoringsResource, c.ns, name), &v1alpha1.TiDBNGMonitoring{}) + Invokes(testing.NewGetAction(tidbngmonitoringsResource, c.ns, name), &v1alpha1.TidbNGMonitoring{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.TiDBNGMonitoring), err + return obj.(*v1alpha1.TidbNGMonitoring), err } -// List takes label and field selectors, and returns the list of TiDBNGMonitorings that match those selectors. -func (c *FakeTiDBNGMonitorings) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.TiDBNGMonitoringList, err error) { +// List takes label and field selectors, and returns the list of TidbNGMonitorings that match those selectors. +func (c *FakeTidbNGMonitorings) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.TidbNGMonitoringList, err error) { obj, err := c.Fake. - Invokes(testing.NewListAction(tidbngmonitoringsResource, tidbngmonitoringsKind, c.ns, opts), &v1alpha1.TiDBNGMonitoringList{}) + Invokes(testing.NewListAction(tidbngmonitoringsResource, tidbngmonitoringsKind, c.ns, opts), &v1alpha1.TidbNGMonitoringList{}) if obj == nil { return nil, err @@ -61,8 +61,8 @@ func (c *FakeTiDBNGMonitorings) List(ctx context.Context, opts v1.ListOptions) ( if label == nil { label = labels.Everything() } - list := &v1alpha1.TiDBNGMonitoringList{ListMeta: obj.(*v1alpha1.TiDBNGMonitoringList).ListMeta} - for _, item := range obj.(*v1alpha1.TiDBNGMonitoringList).Items { + list := &v1alpha1.TidbNGMonitoringList{ListMeta: obj.(*v1alpha1.TidbNGMonitoringList).ListMeta} + for _, item := range obj.(*v1alpha1.TidbNGMonitoringList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -70,58 +70,58 @@ func (c *FakeTiDBNGMonitorings) List(ctx context.Context, opts v1.ListOptions) ( return list, err } -// Watch returns a watch.Interface that watches the requested tiDBNGMonitorings. -func (c *FakeTiDBNGMonitorings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { +// Watch returns a watch.Interface that watches the requested tidbNGMonitorings. +func (c *FakeTidbNGMonitorings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(tidbngmonitoringsResource, c.ns, opts)) } -// Create takes the representation of a tiDBNGMonitoring and creates it. Returns the server's representation of the tiDBNGMonitoring, and an error, if there is any. -func (c *FakeTiDBNGMonitorings) Create(ctx context.Context, tiDBNGMonitoring *v1alpha1.TiDBNGMonitoring, opts v1.CreateOptions) (result *v1alpha1.TiDBNGMonitoring, err error) { +// Create takes the representation of a tidbNGMonitoring and creates it. Returns the server's representation of the tidbNGMonitoring, and an error, if there is any. +func (c *FakeTidbNGMonitorings) Create(ctx context.Context, tidbNGMonitoring *v1alpha1.TidbNGMonitoring, opts v1.CreateOptions) (result *v1alpha1.TidbNGMonitoring, err error) { obj, err := c.Fake. - Invokes(testing.NewCreateAction(tidbngmonitoringsResource, c.ns, tiDBNGMonitoring), &v1alpha1.TiDBNGMonitoring{}) + Invokes(testing.NewCreateAction(tidbngmonitoringsResource, c.ns, tidbNGMonitoring), &v1alpha1.TidbNGMonitoring{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.TiDBNGMonitoring), err + return obj.(*v1alpha1.TidbNGMonitoring), err } -// Update takes the representation of a tiDBNGMonitoring and updates it. Returns the server's representation of the tiDBNGMonitoring, and an error, if there is any. -func (c *FakeTiDBNGMonitorings) Update(ctx context.Context, tiDBNGMonitoring *v1alpha1.TiDBNGMonitoring, opts v1.UpdateOptions) (result *v1alpha1.TiDBNGMonitoring, err error) { +// Update takes the representation of a tidbNGMonitoring and updates it. Returns the server's representation of the tidbNGMonitoring, and an error, if there is any. +func (c *FakeTidbNGMonitorings) Update(ctx context.Context, tidbNGMonitoring *v1alpha1.TidbNGMonitoring, opts v1.UpdateOptions) (result *v1alpha1.TidbNGMonitoring, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateAction(tidbngmonitoringsResource, c.ns, tiDBNGMonitoring), &v1alpha1.TiDBNGMonitoring{}) + Invokes(testing.NewUpdateAction(tidbngmonitoringsResource, c.ns, tidbNGMonitoring), &v1alpha1.TidbNGMonitoring{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.TiDBNGMonitoring), err + return obj.(*v1alpha1.TidbNGMonitoring), err } -// Delete takes name of the tiDBNGMonitoring and deletes it. Returns an error if one occurs. -func (c *FakeTiDBNGMonitorings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { +// Delete takes name of the tidbNGMonitoring and deletes it. Returns an error if one occurs. +func (c *FakeTidbNGMonitorings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteAction(tidbngmonitoringsResource, c.ns, name), &v1alpha1.TiDBNGMonitoring{}) + Invokes(testing.NewDeleteAction(tidbngmonitoringsResource, c.ns, name), &v1alpha1.TidbNGMonitoring{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeTiDBNGMonitorings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { +func (c *FakeTidbNGMonitorings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { action := testing.NewDeleteCollectionAction(tidbngmonitoringsResource, c.ns, listOpts) - _, err := c.Fake.Invokes(action, &v1alpha1.TiDBNGMonitoringList{}) + _, err := c.Fake.Invokes(action, &v1alpha1.TidbNGMonitoringList{}) return err } -// Patch applies the patch and returns the patched tiDBNGMonitoring. -func (c *FakeTiDBNGMonitorings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.TiDBNGMonitoring, err error) { +// Patch applies the patch and returns the patched tidbNGMonitoring. +func (c *FakeTidbNGMonitorings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.TidbNGMonitoring, err error) { obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(tidbngmonitoringsResource, c.ns, name, pt, data, subresources...), &v1alpha1.TiDBNGMonitoring{}) + Invokes(testing.NewPatchSubresourceAction(tidbngmonitoringsResource, c.ns, name, pt, data, subresources...), &v1alpha1.TidbNGMonitoring{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.TiDBNGMonitoring), err + return obj.(*v1alpha1.TidbNGMonitoring), err } diff --git a/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/generated_expansion.go b/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/generated_expansion.go index a20080a809f..3682b0f7858 100644 --- a/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/generated_expansion.go +++ b/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/generated_expansion.go @@ -25,8 +25,6 @@ type DataResourceExpansion interface{} type RestoreExpansion interface{} -type TiDBNGMonitoringExpansion interface{} - type TidbClusterExpansion interface{} type TidbClusterAutoScalerExpansion interface{} @@ -34,3 +32,5 @@ type TidbClusterAutoScalerExpansion interface{} type TidbInitializerExpansion interface{} type TidbMonitorExpansion interface{} + +type TidbNGMonitoringExpansion interface{} diff --git a/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/pingcap_client.go b/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/pingcap_client.go index 9e4fe22c89f..cbad91e845c 100644 --- a/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/pingcap_client.go +++ b/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/pingcap_client.go @@ -28,11 +28,11 @@ type PingcapV1alpha1Interface interface { DMClustersGetter DataResourcesGetter RestoresGetter - TiDBNGMonitoringsGetter TidbClustersGetter TidbClusterAutoScalersGetter TidbInitializersGetter TidbMonitorsGetter + TidbNGMonitoringsGetter } // PingcapV1alpha1Client is used to interact with features provided by the pingcap.com group. @@ -60,10 +60,6 @@ func (c *PingcapV1alpha1Client) Restores(namespace string) RestoreInterface { return newRestores(c, namespace) } -func (c *PingcapV1alpha1Client) TiDBNGMonitorings(namespace string) TiDBNGMonitoringInterface { - return newTiDBNGMonitorings(c, namespace) -} - func (c *PingcapV1alpha1Client) TidbClusters(namespace string) TidbClusterInterface { return newTidbClusters(c, namespace) } @@ -80,6 +76,10 @@ func (c *PingcapV1alpha1Client) TidbMonitors(namespace string) TidbMonitorInterf return newTidbMonitors(c, namespace) } +func (c *PingcapV1alpha1Client) TidbNGMonitorings(namespace string) TidbNGMonitoringInterface { + return newTidbNGMonitorings(c, namespace) +} + // NewForConfig creates a new PingcapV1alpha1Client for the given config. func NewForConfig(c *rest.Config) (*PingcapV1alpha1Client, error) { config := *c diff --git a/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/tidbngmonitoring.go b/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/tidbngmonitoring.go index 87b3385b998..a9a1590e143 100644 --- a/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/tidbngmonitoring.go +++ b/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/tidbngmonitoring.go @@ -27,42 +27,42 @@ import ( rest "k8s.io/client-go/rest" ) -// TiDBNGMonitoringsGetter has a method to return a TiDBNGMonitoringInterface. +// TidbNGMonitoringsGetter has a method to return a TidbNGMonitoringInterface. // A group's client should implement this interface. -type TiDBNGMonitoringsGetter interface { - TiDBNGMonitorings(namespace string) TiDBNGMonitoringInterface +type TidbNGMonitoringsGetter interface { + TidbNGMonitorings(namespace string) TidbNGMonitoringInterface } -// TiDBNGMonitoringInterface has methods to work with TiDBNGMonitoring resources. -type TiDBNGMonitoringInterface interface { - Create(ctx context.Context, tiDBNGMonitoring *v1alpha1.TiDBNGMonitoring, opts v1.CreateOptions) (*v1alpha1.TiDBNGMonitoring, error) - Update(ctx context.Context, tiDBNGMonitoring *v1alpha1.TiDBNGMonitoring, opts v1.UpdateOptions) (*v1alpha1.TiDBNGMonitoring, error) +// TidbNGMonitoringInterface has methods to work with TidbNGMonitoring resources. +type TidbNGMonitoringInterface interface { + Create(ctx context.Context, tidbNGMonitoring *v1alpha1.TidbNGMonitoring, opts v1.CreateOptions) (*v1alpha1.TidbNGMonitoring, error) + Update(ctx context.Context, tidbNGMonitoring *v1alpha1.TidbNGMonitoring, opts v1.UpdateOptions) (*v1alpha1.TidbNGMonitoring, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.TiDBNGMonitoring, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.TiDBNGMonitoringList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.TidbNGMonitoring, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.TidbNGMonitoringList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.TiDBNGMonitoring, err error) - TiDBNGMonitoringExpansion + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.TidbNGMonitoring, err error) + TidbNGMonitoringExpansion } -// tiDBNGMonitorings implements TiDBNGMonitoringInterface -type tiDBNGMonitorings struct { +// tidbNGMonitorings implements TidbNGMonitoringInterface +type tidbNGMonitorings struct { client rest.Interface ns string } -// newTiDBNGMonitorings returns a TiDBNGMonitorings -func newTiDBNGMonitorings(c *PingcapV1alpha1Client, namespace string) *tiDBNGMonitorings { - return &tiDBNGMonitorings{ +// newTidbNGMonitorings returns a TidbNGMonitorings +func newTidbNGMonitorings(c *PingcapV1alpha1Client, namespace string) *tidbNGMonitorings { + return &tidbNGMonitorings{ client: c.RESTClient(), ns: namespace, } } -// Get takes name of the tiDBNGMonitoring, and returns the corresponding tiDBNGMonitoring object, and an error if there is any. -func (c *tiDBNGMonitorings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.TiDBNGMonitoring, err error) { - result = &v1alpha1.TiDBNGMonitoring{} +// Get takes name of the tidbNGMonitoring, and returns the corresponding tidbNGMonitoring object, and an error if there is any. +func (c *tidbNGMonitorings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.TidbNGMonitoring, err error) { + result = &v1alpha1.TidbNGMonitoring{} err = c.client.Get(). Namespace(c.ns). Resource("tidbngmonitorings"). @@ -73,13 +73,13 @@ func (c *tiDBNGMonitorings) Get(ctx context.Context, name string, options v1.Get return } -// List takes label and field selectors, and returns the list of TiDBNGMonitorings that match those selectors. -func (c *tiDBNGMonitorings) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.TiDBNGMonitoringList, err error) { +// List takes label and field selectors, and returns the list of TidbNGMonitorings that match those selectors. +func (c *tidbNGMonitorings) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.TidbNGMonitoringList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second } - result = &v1alpha1.TiDBNGMonitoringList{} + result = &v1alpha1.TidbNGMonitoringList{} err = c.client.Get(). Namespace(c.ns). Resource("tidbngmonitorings"). @@ -90,8 +90,8 @@ func (c *tiDBNGMonitorings) List(ctx context.Context, opts v1.ListOptions) (resu return } -// Watch returns a watch.Interface that watches the requested tiDBNGMonitorings. -func (c *tiDBNGMonitorings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { +// Watch returns a watch.Interface that watches the requested tidbNGMonitorings. +func (c *tidbNGMonitorings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,35 +105,35 @@ func (c *tiDBNGMonitorings) Watch(ctx context.Context, opts v1.ListOptions) (wat Watch(ctx) } -// Create takes the representation of a tiDBNGMonitoring and creates it. Returns the server's representation of the tiDBNGMonitoring, and an error, if there is any. -func (c *tiDBNGMonitorings) Create(ctx context.Context, tiDBNGMonitoring *v1alpha1.TiDBNGMonitoring, opts v1.CreateOptions) (result *v1alpha1.TiDBNGMonitoring, err error) { - result = &v1alpha1.TiDBNGMonitoring{} +// Create takes the representation of a tidbNGMonitoring and creates it. Returns the server's representation of the tidbNGMonitoring, and an error, if there is any. +func (c *tidbNGMonitorings) Create(ctx context.Context, tidbNGMonitoring *v1alpha1.TidbNGMonitoring, opts v1.CreateOptions) (result *v1alpha1.TidbNGMonitoring, err error) { + result = &v1alpha1.TidbNGMonitoring{} err = c.client.Post(). Namespace(c.ns). Resource("tidbngmonitorings"). VersionedParams(&opts, scheme.ParameterCodec). - Body(tiDBNGMonitoring). + Body(tidbNGMonitoring). Do(ctx). Into(result) return } -// Update takes the representation of a tiDBNGMonitoring and updates it. Returns the server's representation of the tiDBNGMonitoring, and an error, if there is any. -func (c *tiDBNGMonitorings) Update(ctx context.Context, tiDBNGMonitoring *v1alpha1.TiDBNGMonitoring, opts v1.UpdateOptions) (result *v1alpha1.TiDBNGMonitoring, err error) { - result = &v1alpha1.TiDBNGMonitoring{} +// Update takes the representation of a tidbNGMonitoring and updates it. Returns the server's representation of the tidbNGMonitoring, and an error, if there is any. +func (c *tidbNGMonitorings) Update(ctx context.Context, tidbNGMonitoring *v1alpha1.TidbNGMonitoring, opts v1.UpdateOptions) (result *v1alpha1.TidbNGMonitoring, err error) { + result = &v1alpha1.TidbNGMonitoring{} err = c.client.Put(). Namespace(c.ns). Resource("tidbngmonitorings"). - Name(tiDBNGMonitoring.Name). + Name(tidbNGMonitoring.Name). VersionedParams(&opts, scheme.ParameterCodec). - Body(tiDBNGMonitoring). + Body(tidbNGMonitoring). Do(ctx). Into(result) return } -// Delete takes name of the tiDBNGMonitoring and deletes it. Returns an error if one occurs. -func (c *tiDBNGMonitorings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { +// Delete takes name of the tidbNGMonitoring and deletes it. Returns an error if one occurs. +func (c *tidbNGMonitorings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("tidbngmonitorings"). @@ -144,7 +144,7 @@ func (c *tiDBNGMonitorings) Delete(ctx context.Context, name string, opts v1.Del } // DeleteCollection deletes a collection of objects. -func (c *tiDBNGMonitorings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { +func (c *tidbNGMonitorings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration if listOpts.TimeoutSeconds != nil { timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second @@ -159,9 +159,9 @@ func (c *tiDBNGMonitorings) DeleteCollection(ctx context.Context, opts v1.Delete Error() } -// Patch applies the patch and returns the patched tiDBNGMonitoring. -func (c *tiDBNGMonitorings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.TiDBNGMonitoring, err error) { - result = &v1alpha1.TiDBNGMonitoring{} +// Patch applies the patch and returns the patched tidbNGMonitoring. +func (c *tidbNGMonitorings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.TidbNGMonitoring, err error) { + result = &v1alpha1.TidbNGMonitoring{} err = c.client.Patch(pt). Namespace(c.ns). Resource("tidbngmonitorings"). diff --git a/pkg/client/informers/externalversions/generic.go b/pkg/client/informers/externalversions/generic.go index 5f10a7b04f3..b782237010f 100644 --- a/pkg/client/informers/externalversions/generic.go +++ b/pkg/client/informers/externalversions/generic.go @@ -60,8 +60,6 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource return &genericInformer{resource: resource.GroupResource(), informer: f.Pingcap().V1alpha1().DataResources().Informer()}, nil case v1alpha1.SchemeGroupVersion.WithResource("restores"): return &genericInformer{resource: resource.GroupResource(), informer: f.Pingcap().V1alpha1().Restores().Informer()}, nil - case v1alpha1.SchemeGroupVersion.WithResource("tidbngmonitorings"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Pingcap().V1alpha1().TiDBNGMonitorings().Informer()}, nil case v1alpha1.SchemeGroupVersion.WithResource("tidbclusters"): return &genericInformer{resource: resource.GroupResource(), informer: f.Pingcap().V1alpha1().TidbClusters().Informer()}, nil case v1alpha1.SchemeGroupVersion.WithResource("tidbclusterautoscalers"): @@ -70,6 +68,8 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource return &genericInformer{resource: resource.GroupResource(), informer: f.Pingcap().V1alpha1().TidbInitializers().Informer()}, nil case v1alpha1.SchemeGroupVersion.WithResource("tidbmonitors"): return &genericInformer{resource: resource.GroupResource(), informer: f.Pingcap().V1alpha1().TidbMonitors().Informer()}, nil + case v1alpha1.SchemeGroupVersion.WithResource("tidbngmonitorings"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Pingcap().V1alpha1().TidbNGMonitorings().Informer()}, nil } diff --git a/pkg/client/informers/externalversions/pingcap/v1alpha1/interface.go b/pkg/client/informers/externalversions/pingcap/v1alpha1/interface.go index f0942e9e5c7..55e62f94611 100644 --- a/pkg/client/informers/externalversions/pingcap/v1alpha1/interface.go +++ b/pkg/client/informers/externalversions/pingcap/v1alpha1/interface.go @@ -31,8 +31,6 @@ type Interface interface { DataResources() DataResourceInformer // Restores returns a RestoreInformer. Restores() RestoreInformer - // TiDBNGMonitorings returns a TiDBNGMonitoringInformer. - TiDBNGMonitorings() TiDBNGMonitoringInformer // TidbClusters returns a TidbClusterInformer. TidbClusters() TidbClusterInformer // TidbClusterAutoScalers returns a TidbClusterAutoScalerInformer. @@ -41,6 +39,8 @@ type Interface interface { TidbInitializers() TidbInitializerInformer // TidbMonitors returns a TidbMonitorInformer. TidbMonitors() TidbMonitorInformer + // TidbNGMonitorings returns a TidbNGMonitoringInformer. + TidbNGMonitorings() TidbNGMonitoringInformer } type version struct { @@ -79,11 +79,6 @@ func (v *version) Restores() RestoreInformer { return &restoreInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} } -// TiDBNGMonitorings returns a TiDBNGMonitoringInformer. -func (v *version) TiDBNGMonitorings() TiDBNGMonitoringInformer { - return &tiDBNGMonitoringInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} - // TidbClusters returns a TidbClusterInformer. func (v *version) TidbClusters() TidbClusterInformer { return &tidbClusterInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} @@ -103,3 +98,8 @@ func (v *version) TidbInitializers() TidbInitializerInformer { func (v *version) TidbMonitors() TidbMonitorInformer { return &tidbMonitorInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} } + +// TidbNGMonitorings returns a TidbNGMonitoringInformer. +func (v *version) TidbNGMonitorings() TidbNGMonitoringInformer { + return &tidbNGMonitoringInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} diff --git a/pkg/client/informers/externalversions/pingcap/v1alpha1/tidbngmonitoring.go b/pkg/client/informers/externalversions/pingcap/v1alpha1/tidbngmonitoring.go index c36dbf6b93b..6580140a5d0 100644 --- a/pkg/client/informers/externalversions/pingcap/v1alpha1/tidbngmonitoring.go +++ b/pkg/client/informers/externalversions/pingcap/v1alpha1/tidbngmonitoring.go @@ -29,59 +29,59 @@ import ( cache "k8s.io/client-go/tools/cache" ) -// TiDBNGMonitoringInformer provides access to a shared informer and lister for -// TiDBNGMonitorings. -type TiDBNGMonitoringInformer interface { +// TidbNGMonitoringInformer provides access to a shared informer and lister for +// TidbNGMonitorings. +type TidbNGMonitoringInformer interface { Informer() cache.SharedIndexInformer - Lister() v1alpha1.TiDBNGMonitoringLister + Lister() v1alpha1.TidbNGMonitoringLister } -type tiDBNGMonitoringInformer struct { +type tidbNGMonitoringInformer struct { factory internalinterfaces.SharedInformerFactory tweakListOptions internalinterfaces.TweakListOptionsFunc namespace string } -// NewTiDBNGMonitoringInformer constructs a new informer for TiDBNGMonitoring type. +// NewTidbNGMonitoringInformer constructs a new informer for TidbNGMonitoring type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. -func NewTiDBNGMonitoringInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredTiDBNGMonitoringInformer(client, namespace, resyncPeriod, indexers, nil) +func NewTidbNGMonitoringInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredTidbNGMonitoringInformer(client, namespace, resyncPeriod, indexers, nil) } -// NewFilteredTiDBNGMonitoringInformer constructs a new informer for TiDBNGMonitoring type. +// NewFilteredTidbNGMonitoringInformer constructs a new informer for TidbNGMonitoring type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. -func NewFilteredTiDBNGMonitoringInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { +func NewFilteredTidbNGMonitoringInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.PingcapV1alpha1().TiDBNGMonitorings(namespace).List(context.TODO(), options) + return client.PingcapV1alpha1().TidbNGMonitorings(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.PingcapV1alpha1().TiDBNGMonitorings(namespace).Watch(context.TODO(), options) + return client.PingcapV1alpha1().TidbNGMonitorings(namespace).Watch(context.TODO(), options) }, }, - &pingcapv1alpha1.TiDBNGMonitoring{}, + &pingcapv1alpha1.TidbNGMonitoring{}, resyncPeriod, indexers, ) } -func (f *tiDBNGMonitoringInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredTiDBNGMonitoringInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +func (f *tidbNGMonitoringInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredTidbNGMonitoringInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) } -func (f *tiDBNGMonitoringInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&pingcapv1alpha1.TiDBNGMonitoring{}, f.defaultInformer) +func (f *tidbNGMonitoringInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&pingcapv1alpha1.TidbNGMonitoring{}, f.defaultInformer) } -func (f *tiDBNGMonitoringInformer) Lister() v1alpha1.TiDBNGMonitoringLister { - return v1alpha1.NewTiDBNGMonitoringLister(f.Informer().GetIndexer()) +func (f *tidbNGMonitoringInformer) Lister() v1alpha1.TidbNGMonitoringLister { + return v1alpha1.NewTidbNGMonitoringLister(f.Informer().GetIndexer()) } diff --git a/pkg/client/listers/pingcap/v1alpha1/expansion_generated.go b/pkg/client/listers/pingcap/v1alpha1/expansion_generated.go index 88ea04e126a..c1b495df0fb 100644 --- a/pkg/client/listers/pingcap/v1alpha1/expansion_generated.go +++ b/pkg/client/listers/pingcap/v1alpha1/expansion_generated.go @@ -55,14 +55,6 @@ type RestoreListerExpansion interface{} // RestoreNamespaceLister. type RestoreNamespaceListerExpansion interface{} -// TiDBNGMonitoringListerExpansion allows custom methods to be added to -// TiDBNGMonitoringLister. -type TiDBNGMonitoringListerExpansion interface{} - -// TiDBNGMonitoringNamespaceListerExpansion allows custom methods to be added to -// TiDBNGMonitoringNamespaceLister. -type TiDBNGMonitoringNamespaceListerExpansion interface{} - // TidbClusterListerExpansion allows custom methods to be added to // TidbClusterLister. type TidbClusterListerExpansion interface{} @@ -94,3 +86,11 @@ type TidbMonitorListerExpansion interface{} // TidbMonitorNamespaceListerExpansion allows custom methods to be added to // TidbMonitorNamespaceLister. type TidbMonitorNamespaceListerExpansion interface{} + +// TidbNGMonitoringListerExpansion allows custom methods to be added to +// TidbNGMonitoringLister. +type TidbNGMonitoringListerExpansion interface{} + +// TidbNGMonitoringNamespaceListerExpansion allows custom methods to be added to +// TidbNGMonitoringNamespaceLister. +type TidbNGMonitoringNamespaceListerExpansion interface{} diff --git a/pkg/client/listers/pingcap/v1alpha1/tidbngmonitoring.go b/pkg/client/listers/pingcap/v1alpha1/tidbngmonitoring.go index fb78353f034..2e846157b95 100644 --- a/pkg/client/listers/pingcap/v1alpha1/tidbngmonitoring.go +++ b/pkg/client/listers/pingcap/v1alpha1/tidbngmonitoring.go @@ -22,69 +22,69 @@ import ( "k8s.io/client-go/tools/cache" ) -// TiDBNGMonitoringLister helps list TiDBNGMonitorings. +// TidbNGMonitoringLister helps list TidbNGMonitorings. // All objects returned here must be treated as read-only. -type TiDBNGMonitoringLister interface { - // List lists all TiDBNGMonitorings in the indexer. +type TidbNGMonitoringLister interface { + // List lists all TidbNGMonitorings in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.TiDBNGMonitoring, err error) - // TiDBNGMonitorings returns an object that can list and get TiDBNGMonitorings. - TiDBNGMonitorings(namespace string) TiDBNGMonitoringNamespaceLister - TiDBNGMonitoringListerExpansion + List(selector labels.Selector) (ret []*v1alpha1.TidbNGMonitoring, err error) + // TidbNGMonitorings returns an object that can list and get TidbNGMonitorings. + TidbNGMonitorings(namespace string) TidbNGMonitoringNamespaceLister + TidbNGMonitoringListerExpansion } -// tiDBNGMonitoringLister implements the TiDBNGMonitoringLister interface. -type tiDBNGMonitoringLister struct { +// tidbNGMonitoringLister implements the TidbNGMonitoringLister interface. +type tidbNGMonitoringLister struct { indexer cache.Indexer } -// NewTiDBNGMonitoringLister returns a new TiDBNGMonitoringLister. -func NewTiDBNGMonitoringLister(indexer cache.Indexer) TiDBNGMonitoringLister { - return &tiDBNGMonitoringLister{indexer: indexer} +// NewTidbNGMonitoringLister returns a new TidbNGMonitoringLister. +func NewTidbNGMonitoringLister(indexer cache.Indexer) TidbNGMonitoringLister { + return &tidbNGMonitoringLister{indexer: indexer} } -// List lists all TiDBNGMonitorings in the indexer. -func (s *tiDBNGMonitoringLister) List(selector labels.Selector) (ret []*v1alpha1.TiDBNGMonitoring, err error) { +// List lists all TidbNGMonitorings in the indexer. +func (s *tidbNGMonitoringLister) List(selector labels.Selector) (ret []*v1alpha1.TidbNGMonitoring, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.TiDBNGMonitoring)) + ret = append(ret, m.(*v1alpha1.TidbNGMonitoring)) }) return ret, err } -// TiDBNGMonitorings returns an object that can list and get TiDBNGMonitorings. -func (s *tiDBNGMonitoringLister) TiDBNGMonitorings(namespace string) TiDBNGMonitoringNamespaceLister { - return tiDBNGMonitoringNamespaceLister{indexer: s.indexer, namespace: namespace} +// TidbNGMonitorings returns an object that can list and get TidbNGMonitorings. +func (s *tidbNGMonitoringLister) TidbNGMonitorings(namespace string) TidbNGMonitoringNamespaceLister { + return tidbNGMonitoringNamespaceLister{indexer: s.indexer, namespace: namespace} } -// TiDBNGMonitoringNamespaceLister helps list and get TiDBNGMonitorings. +// TidbNGMonitoringNamespaceLister helps list and get TidbNGMonitorings. // All objects returned here must be treated as read-only. -type TiDBNGMonitoringNamespaceLister interface { - // List lists all TiDBNGMonitorings in the indexer for a given namespace. +type TidbNGMonitoringNamespaceLister interface { + // List lists all TidbNGMonitorings in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.TiDBNGMonitoring, err error) - // Get retrieves the TiDBNGMonitoring from the indexer for a given namespace and name. + List(selector labels.Selector) (ret []*v1alpha1.TidbNGMonitoring, err error) + // Get retrieves the TidbNGMonitoring from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1alpha1.TiDBNGMonitoring, error) - TiDBNGMonitoringNamespaceListerExpansion + Get(name string) (*v1alpha1.TidbNGMonitoring, error) + TidbNGMonitoringNamespaceListerExpansion } -// tiDBNGMonitoringNamespaceLister implements the TiDBNGMonitoringNamespaceLister +// tidbNGMonitoringNamespaceLister implements the TidbNGMonitoringNamespaceLister // interface. -type tiDBNGMonitoringNamespaceLister struct { +type tidbNGMonitoringNamespaceLister struct { indexer cache.Indexer namespace string } -// List lists all TiDBNGMonitorings in the indexer for a given namespace. -func (s tiDBNGMonitoringNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.TiDBNGMonitoring, err error) { +// List lists all TidbNGMonitorings in the indexer for a given namespace. +func (s tidbNGMonitoringNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.TidbNGMonitoring, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.TiDBNGMonitoring)) + ret = append(ret, m.(*v1alpha1.TidbNGMonitoring)) }) return ret, err } -// Get retrieves the TiDBNGMonitoring from the indexer for a given namespace and name. -func (s tiDBNGMonitoringNamespaceLister) Get(name string) (*v1alpha1.TiDBNGMonitoring, error) { +// Get retrieves the TidbNGMonitoring from the indexer for a given namespace and name. +func (s tidbNGMonitoringNamespaceLister) Get(name string) (*v1alpha1.TidbNGMonitoring, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err @@ -92,5 +92,5 @@ func (s tiDBNGMonitoringNamespaceLister) Get(name string) (*v1alpha1.TiDBNGMonit if !exists { return nil, errors.NewNotFound(v1alpha1.Resource("tidbngmonitoring"), name) } - return obj.(*v1alpha1.TiDBNGMonitoring), nil + return obj.(*v1alpha1.TidbNGMonitoring), nil } From 05c545af76109508590232494abbba2f4bb19d35 Mon Sep 17 00:00:00 2001 From: Shiori Date: Tue, 7 Dec 2021 16:22:30 +0800 Subject: [PATCH 19/28] fix --- pkg/apis/pingcap/v1alpha1/tidbngmonitoring_types.go | 2 +- pkg/controller/controller_utils.go | 6 +++--- pkg/controller/dependences.go | 4 ++-- pkg/controller/tidbngmonitoring/ng_monitor_control.go | 4 ++-- pkg/controller/tidbngmonitoring/ng_monitor_controller.go | 6 +++--- pkg/manager/meta/reclaim_policy_manager_test.go | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/pkg/apis/pingcap/v1alpha1/tidbngmonitoring_types.go b/pkg/apis/pingcap/v1alpha1/tidbngmonitoring_types.go index aec6b517b0e..6e48b6ccbe8 100644 --- a/pkg/apis/pingcap/v1alpha1/tidbngmonitoring_types.go +++ b/pkg/apis/pingcap/v1alpha1/tidbngmonitoring_types.go @@ -42,7 +42,7 @@ type TidbNGMonitoring struct { Status TidbNGMonitoringStatus `json:"status,omitempty"` } -// TiDBNGMonitoringList is TidbNGMonitoring list +// TidbNGMonitoringList is TidbNGMonitoring list // // +k8s:openapi-gen=true // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object diff --git a/pkg/controller/controller_utils.go b/pkg/controller/controller_utils.go index 6a38768ad81..d4bbd2183ce 100644 --- a/pkg/controller/controller_utils.go +++ b/pkg/controller/controller_utils.go @@ -58,8 +58,8 @@ var ( // tidbClusterAutoScalerKind cotnains the schema.GroupVersionKind for TidbClusterAutoScaler controller type. tidbClusterAutoScalerKind = v1alpha1.SchemeGroupVersion.WithKind("TidbClusterAutoScaler") - // tidbNGMonitoringKind cotnains the schema.GroupVersionKind for TiDBNGMonitoring controller type. - tidbNGMonitoringKind = v1alpha1.SchemeGroupVersion.WithKind("TiDBNGMonitoring") + // tidbNGMonitoringKind cotnains the schema.GroupVersionKind for TidbNGMonitoring controller type. + tidbNGMonitoringKind = v1alpha1.SchemeGroupVersion.WithKind("TidbNGMonitoring") ) // RequeueError is used to requeue the item, this error type should't be considered as a real error @@ -198,7 +198,7 @@ func GetTiDBClusterAutoScalerOwnerRef(tac *v1alpha1.TidbClusterAutoScaler) metav } } -func GetTiDBNGMonitoringOwnerRef(tngm *v1alpha1.TiDBNGMonitoring) metav1.OwnerReference { +func GetTiDBNGMonitoringOwnerRef(tngm *v1alpha1.TidbNGMonitoring) metav1.OwnerReference { controller := true blockOwnerDeletion := true return metav1.OwnerReference{ diff --git a/pkg/controller/dependences.go b/pkg/controller/dependences.go index 2e5b90412ad..41aeff544cb 100644 --- a/pkg/controller/dependences.go +++ b/pkg/controller/dependences.go @@ -216,7 +216,7 @@ type Dependencies struct { BackupScheduleLister listers.BackupScheduleLister TiDBInitializerLister listers.TidbInitializerLister TiDBMonitorLister listers.TidbMonitorLister - TiDBNGMonitoringLister listers.TiDBNGMonitoringLister + TiDBNGMonitoringLister listers.TidbNGMonitoringLister // Controls Controls @@ -349,7 +349,7 @@ func newDependencies( BackupScheduleLister: informerFactory.Pingcap().V1alpha1().BackupSchedules().Lister(), TiDBInitializerLister: informerFactory.Pingcap().V1alpha1().TidbInitializers().Lister(), TiDBMonitorLister: informerFactory.Pingcap().V1alpha1().TidbMonitors().Lister(), - TiDBNGMonitoringLister: informerFactory.Pingcap().V1alpha1().TiDBNGMonitorings().Lister(), + TiDBNGMonitoringLister: informerFactory.Pingcap().V1alpha1().TidbNGMonitorings().Lister(), }, nil } diff --git a/pkg/controller/tidbngmonitoring/ng_monitor_control.go b/pkg/controller/tidbngmonitoring/ng_monitor_control.go index f11208600dc..cac1e561830 100644 --- a/pkg/controller/tidbngmonitoring/ng_monitor_control.go +++ b/pkg/controller/tidbngmonitoring/ng_monitor_control.go @@ -126,7 +126,7 @@ func (c *defaultTiDBNGMonitoringControl) Update(tngm *v1alpha1.TidbNGMonitoring) err := retry.RetryOnConflict(retry.DefaultRetry, func() error { var updateErr error - update, updateErr = c.deps.Clientset.PingcapV1alpha1().TiDBNGMonitorings(ns).Update(context.TODO(), tngm, metav1.UpdateOptions{}) + update, updateErr = c.deps.Clientset.PingcapV1alpha1().TidbNGMonitorings(ns).Update(context.TODO(), tngm, metav1.UpdateOptions{}) if updateErr == nil { klog.Infof("TidbNGMonitoring: [%s/%s] updated successfully", ns, name) return nil @@ -134,7 +134,7 @@ func (c *defaultTiDBNGMonitoringControl) Update(tngm *v1alpha1.TidbNGMonitoring) klog.V(4).Infof("failed to update TidbNGMonitoring: [%s/%s], error: %v", ns, name, updateErr) - if updated, err := c.deps.TiDBNGMonitoringLister.TiDBNGMonitorings(ns).Get(name); err == nil { + if updated, err := c.deps.TiDBNGMonitoringLister.TidbNGMonitorings(ns).Get(name); err == nil { // make a copy so we don't mutate the shared cache tngm = updated.DeepCopy() tngm.Status = *status diff --git a/pkg/controller/tidbngmonitoring/ng_monitor_controller.go b/pkg/controller/tidbngmonitoring/ng_monitor_controller.go index 50331ffe858..98d3f7ea0b4 100644 --- a/pkg/controller/tidbngmonitoring/ng_monitor_controller.go +++ b/pkg/controller/tidbngmonitoring/ng_monitor_controller.go @@ -54,14 +54,14 @@ func NewController(deps *controller.Dependencies) *Controller { ), } - tnmInformer := deps.InformerFactory.Pingcap().V1alpha1().TiDBNGMonitorings() + tnmInformer := deps.InformerFactory.Pingcap().V1alpha1().TidbNGMonitorings() stsInformer := deps.KubeInformerFactory.Apps().V1().StatefulSets() controller.WatchForObject(tnmInformer.Informer(), c.queue) controller.WatchForController( stsInformer.Informer(), c.queue, func(ns, name string) (runtime.Object, error) { - return c.deps.TiDBNGMonitoringLister.TiDBNGMonitorings(ns).Get(name) + return c.deps.TiDBNGMonitoringLister.TidbNGMonitorings(ns).Get(name) }, nil, ) @@ -122,7 +122,7 @@ func (c *Controller) sync(key string) error { return err } - tngm, err := c.deps.TiDBNGMonitoringLister.TiDBNGMonitorings(ns).Get(name) + tngm, err := c.deps.TiDBNGMonitoringLister.TidbNGMonitorings(ns).Get(name) if errors.IsNotFound(err) { klog.Infof("TidbNGMonitoring %s has been deleted", key) return nil diff --git a/pkg/manager/meta/reclaim_policy_manager_test.go b/pkg/manager/meta/reclaim_policy_manager_test.go index 6ca2760d07e..b24a96b0fed 100644 --- a/pkg/manager/meta/reclaim_policy_manager_test.go +++ b/pkg/manager/meta/reclaim_policy_manager_test.go @@ -307,7 +307,7 @@ func newTiDBNGMonitoringForMeta() *v1alpha1.TiDBNGMonitoring { pvp := corev1.PersistentVolumeReclaimDelete return &v1alpha1.TiDBNGMonitoring{ TypeMeta: metav1.TypeMeta{ - Kind: "TiDBNGMonitoring", + Kind: "TidbNGMonitoring", APIVersion: "pingcap.com/v1alpha1", }, ObjectMeta: metav1.ObjectMeta{ From 72b286c57a76b8e244cf2a98cb8dcf73b6b754e4 Mon Sep 17 00:00:00 2001 From: Shiori Date: Tue, 7 Dec 2021 17:21:50 +0800 Subject: [PATCH 20/28] add validate and move `Name` function to manager --- .../pingcap/v1alpha1/validation/validation.go | 26 ++++++++++++++++- pkg/controller/controller_utils.go | 4 --- .../tidbngmonitoring/ng_monitor_control.go | 29 ++++++++++++++----- .../tidbngmonitoring/ng_monitor_controller.go | 1 + pkg/manager/tidbngmonitoring/name.go | 7 +++++ .../tidbngmonitoring/ng_monitoring_manager.go | 10 +++---- 6 files changed, 59 insertions(+), 18 deletions(-) diff --git a/pkg/apis/pingcap/v1alpha1/validation/validation.go b/pkg/apis/pingcap/v1alpha1/validation/validation.go index 5034b640539..0b1462729f5 100644 --- a/pkg/apis/pingcap/v1alpha1/validation/validation.go +++ b/pkg/apis/pingcap/v1alpha1/validation/validation.go @@ -62,7 +62,20 @@ func ValidateDMCluster(dc *v1alpha1.DMCluster) field.ErrorList { return allErrs } -// FIXME: TiDBNGMonitoring +// ValidateTiDBNGMonitoring validates a TidbNGMonitoring +func ValidateTiDBNGMonitoring(tngm *v1alpha1.TidbNGMonitoring) field.ErrorList { + allErrs := field.ErrorList{} + + // medata + fldPath := field.NewPath("metadata") + allErrs = append(allErrs, validateAnnotations(tngm.ObjectMeta.Annotations, fldPath.Child("annotations"))...) + // spec + fldPath = field.NewPath("spec") + allErrs = append(allErrs, validateComponentSpec(&tngm.Spec.ComponentSpec, fldPath)...) + allErrs = append(allErrs, validateNGMonitoringSpec(&tngm.Spec.NGMonitoring, fldPath.Child("ngMonitoring"))...) + + return allErrs +} func ValidateTidbMonitor(monitor *v1alpha1.TidbMonitor) field.ErrorList { allErrs := field.ErrorList{} @@ -311,6 +324,17 @@ func validateWorkerSpec(spec *v1alpha1.WorkerSpec, fldPath *field.Path) field.Er return allErrs } +func validateNGMonitoringSpec(spec *v1alpha1.NGMonitoringSpec, fldPath *field.Path) field.ErrorList { + allErrs := field.ErrorList{} + + allErrs = append(allErrs, validateComponentSpec(&spec.ComponentSpec, fldPath)...) + if len(spec.StorageVolumes) > 0 { + allErrs = append(allErrs, validateStorageVolumes(spec.StorageVolumes, fldPath.Child("storageVolumes"))...) + } + + return allErrs +} + func validateComponentSpec(spec *v1alpha1.ComponentSpec, fldPath *field.Path) field.ErrorList { allErrs := field.ErrorList{} // TODO validate other fields diff --git a/pkg/controller/controller_utils.go b/pkg/controller/controller_utils.go index d4bbd2183ce..21d570e5bf5 100644 --- a/pkg/controller/controller_utils.go +++ b/pkg/controller/controller_utils.go @@ -345,10 +345,6 @@ func DMWorkerPeerMemberName(clusterName string) string { return fmt.Sprintf("%s-dm-worker-peer", clusterName) } -func NGMonitoringName(monitorName string) string { - return fmt.Sprintf("%s-ng-monitoring", monitorName) -} - // AnnProm adds annotations for prometheus scraping metrics func AnnProm(port int32) map[string]string { return map[string]string{ diff --git a/pkg/controller/tidbngmonitoring/ng_monitor_control.go b/pkg/controller/tidbngmonitoring/ng_monitor_control.go index cac1e561830..6200767a846 100644 --- a/pkg/controller/tidbngmonitoring/ng_monitor_control.go +++ b/pkg/controller/tidbngmonitoring/ng_monitor_control.go @@ -18,23 +18,20 @@ import ( "fmt" "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" + v1alpha1validation "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1/validation" "github.com/pingcap/tidb-operator/pkg/controller" "github.com/pingcap/tidb-operator/pkg/manager" + v1 "k8s.io/api/core/v1" apiequality "k8s.io/apimachinery/pkg/api/equality" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" errorutils "k8s.io/apimachinery/pkg/util/errors" utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/client-go/tools/record" "k8s.io/client-go/util/retry" "k8s.io/klog" ) -const ( - // Event Type - EventTypeFailedSync = "FailedSync" - EventTypeSuccessSync = "SuccessSync" -) - type ReclaimPolicyManager interface { SyncTiDBNGMonitoring(monitor *v1alpha1.TidbNGMonitoring) error } @@ -52,24 +49,29 @@ func NewDefaultTiDBNGMonitoringControl( deps *controller.Dependencies, ngmMnger manager.TiDBNGMonitoringManager, reclaimPolicyManager ReclaimPolicyManager, + recorder record.EventRecorder, ) ControlInterface { return &defaultTiDBNGMonitoringControl{ deps: deps, + recorder: recorder, ngmMnger: ngmMnger, reclaimPolicyManager: reclaimPolicyManager, } } type defaultTiDBNGMonitoringControl struct { - deps *controller.Dependencies + deps *controller.Dependencies + recorder record.EventRecorder ngmMnger manager.TiDBNGMonitoringManager reclaimPolicyManager ReclaimPolicyManager } func (c *defaultTiDBNGMonitoringControl) Reconcile(tngm *v1alpha1.TidbNGMonitoring) error { - // TODO: default and validate + if !c.validate(tngm) { + return nil // fatal error, no need to retry on invalid object + } var errs []error @@ -149,3 +151,14 @@ func (c *defaultTiDBNGMonitoringControl) Update(tngm *v1alpha1.TidbNGMonitoring) } return update, err } + +func (c *defaultTiDBNGMonitoringControl) validate(tngm *v1alpha1.TidbNGMonitoring) bool { + errs := v1alpha1validation.ValidateTiDBNGMonitoring(tngm) + if len(errs) > 0 { + aggregatedErr := errs.ToAggregate() + klog.Errorf("tidb ng monitoring %s/%s is not valid and must be fixed first, aggregated error: %v", tngm.GetNamespace(), tngm.GetName(), aggregatedErr) + c.recorder.Event(tngm, v1.EventTypeWarning, "FailedValidation", aggregatedErr.Error()) + return false + } + return true +} diff --git a/pkg/controller/tidbngmonitoring/ng_monitor_controller.go b/pkg/controller/tidbngmonitoring/ng_monitor_controller.go index 98d3f7ea0b4..48d42992e7e 100644 --- a/pkg/controller/tidbngmonitoring/ng_monitor_controller.go +++ b/pkg/controller/tidbngmonitoring/ng_monitor_controller.go @@ -43,6 +43,7 @@ func NewController(deps *controller.Dependencies) *Controller { deps, tidbngmonitoring.NewNGMonitorManager(deps), meta.NewReclaimPolicyManager(deps), + deps.Recorder, ) c := &Controller{ diff --git a/pkg/manager/tidbngmonitoring/name.go b/pkg/manager/tidbngmonitoring/name.go index 49ac45de3ea..e4273ef6f79 100644 --- a/pkg/manager/tidbngmonitoring/name.go +++ b/pkg/manager/tidbngmonitoring/name.go @@ -15,7 +15,14 @@ package tidbngmonitoring import "fmt" +// NGMonitoringName return ng monitoring name +func NGMonitoringName(monitorName string) string { + return fmt.Sprintf("%s-ng-monitoring", monitorName) +} + // NGMonitoringHeadlessServiceName return headless service name func NGMonitoringHeadlessServiceName(tngm string) string { return fmt.Sprintf("%s-ng-monitoring", tngm) } + + diff --git a/pkg/manager/tidbngmonitoring/ng_monitoring_manager.go b/pkg/manager/tidbngmonitoring/ng_monitoring_manager.go index d74c5832859..f7d8bf79b16 100644 --- a/pkg/manager/tidbngmonitoring/ng_monitoring_manager.go +++ b/pkg/manager/tidbngmonitoring/ng_monitoring_manager.go @@ -117,7 +117,7 @@ func (m *ngMonitoringManager) syncCore(tngm *v1alpha1.TidbNGMonitoring) error { ns := tngm.GetNamespace() name := tngm.GetName() - stsName := controller.NGMonitoringName(name) + stsName := NGMonitoringName(name) oldStsTemp, err := m.deps.StatefulSetLister.StatefulSets(ns).Get(stsName) if err != nil && !errors.IsNotFound(err) { return fmt.Errorf("populateStatus: failed to get sts %s for tidb ng monitor %s/%s, error: %s", stsName, ns, name, err) @@ -174,7 +174,7 @@ func (m *ngMonitoringManager) syncConfigMap(tngm *v1alpha1.TidbNGMonitoring, sts var inUseName string if sts != nil { inUseName = mngerutils.FindConfigMapVolume(&sts.Spec.Template.Spec, func(name string) bool { - return strings.HasPrefix(name, controller.NGMonitoringName(tngm.Name)) + return strings.HasPrefix(name, NGMonitoringName(tngm.Name)) }) } @@ -244,7 +244,7 @@ func GenerateNGMonitoringStatefulSet(tngm *v1alpha1.TidbNGMonitoring, cm *corev1 name := tngm.GetName() spec := tngm.BaseNGMonitoringSpec() - meta, stsLabels := GenerateNGMonitoringMeta(tngm, controller.NGMonitoringName) + meta, stsLabels := GenerateNGMonitoringMeta(tngm, NGMonitoringName) headlessServiceName := NGMonitoringHeadlessServiceName(name) replicas := int32(1) // only support one replica now @@ -394,7 +394,7 @@ func GenerateNGMonitoringStatefulSet(tngm *v1alpha1.TidbNGMonitoring, cm *corev1 // GenerateNGMonitoringConfigMap generate ConfigMap from tidb ng monitoring func GenerateNGMonitoringConfigMap(tngm *v1alpha1.TidbNGMonitoring) (*corev1.ConfigMap, error) { config := tngm.Spec.NGMonitoring.Config - meta, _ := GenerateNGMonitoringMeta(tngm, controller.NGMonitoringName) + meta, _ := GenerateNGMonitoringMeta(tngm, NGMonitoringName) // TODO: TLS @@ -403,7 +403,7 @@ func GenerateNGMonitoringConfigMap(tngm *v1alpha1.TidbNGMonitoring) (*corev1.Con return nil, err } - name := controller.NGMonitoringName(tngm.Name) + name := NGMonitoringName(tngm.Name) confTextStr := string(confText) data := map[string]string{ From 287b7f44685673705a865020c019b936b41f2c3e Mon Sep 17 00:00:00 2001 From: Shiori Date: Tue, 7 Dec 2021 20:01:45 +0800 Subject: [PATCH 21/28] fix ut --- pkg/manager/meta/reclaim_policy_manager_test.go | 8 ++++---- pkg/manager/tidbngmonitoring/name.go | 2 -- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/pkg/manager/meta/reclaim_policy_manager_test.go b/pkg/manager/meta/reclaim_policy_manager_test.go index b24a96b0fed..596701c7e82 100644 --- a/pkg/manager/meta/reclaim_policy_manager_test.go +++ b/pkg/manager/meta/reclaim_policy_manager_test.go @@ -92,7 +92,7 @@ func TestReclaimPolicyManagerSync(t *testing.T) { case v1alpha1.DMClusterKind: err = rpm.SyncDM(obj.(*v1alpha1.DMCluster)) case v1alpha1.TiDBNGMonitoringKind: - err = rpm.SyncTiDBNGMonitoring(obj.(*v1alpha1.TiDBNGMonitoring)) + err = rpm.SyncTiDBNGMonitoring(obj.(*v1alpha1.TidbNGMonitoring)) } if test.err { g.Expect(err).To(HaveOccurred()) @@ -303,9 +303,9 @@ func newTiDBMonitorForMeta() *v1alpha1.TidbMonitor { } } -func newTiDBNGMonitoringForMeta() *v1alpha1.TiDBNGMonitoring { +func newTiDBNGMonitoringForMeta() *v1alpha1.TidbNGMonitoring { pvp := corev1.PersistentVolumeReclaimDelete - return &v1alpha1.TiDBNGMonitoring{ + return &v1alpha1.TidbNGMonitoring{ TypeMeta: metav1.TypeMeta{ Kind: "TidbNGMonitoring", APIVersion: "pingcap.com/v1alpha1", @@ -316,7 +316,7 @@ func newTiDBNGMonitoringForMeta() *v1alpha1.TiDBNGMonitoring { UID: types.UID("test"), Labels: label.NewDM().Instance(controller.TestClusterName), }, - Spec: v1alpha1.TiDBNGMonitoringSpec{ + Spec: v1alpha1.TidbNGMonitoringSpec{ PVReclaimPolicy: &pvp, }, } diff --git a/pkg/manager/tidbngmonitoring/name.go b/pkg/manager/tidbngmonitoring/name.go index e4273ef6f79..6a84364e7d3 100644 --- a/pkg/manager/tidbngmonitoring/name.go +++ b/pkg/manager/tidbngmonitoring/name.go @@ -24,5 +24,3 @@ func NGMonitoringName(monitorName string) string { func NGMonitoringHeadlessServiceName(tngm string) string { return fmt.Sprintf("%s-ng-monitoring", tngm) } - - From f7a244ed2450873b99da45e3753a1ebaa02fd6f4 Mon Sep 17 00:00:00 2001 From: Shiori Date: Wed, 8 Dec 2021 11:07:07 +0800 Subject: [PATCH 22/28] rename file --- .../{ng_monitor_control.go => tidb_ng_monitoring_control.go} | 0 ...{ng_monitor_controller.go => tidb_ng_monitoring_controller.go} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename pkg/controller/tidbngmonitoring/{ng_monitor_control.go => tidb_ng_monitoring_control.go} (100%) rename pkg/controller/tidbngmonitoring/{ng_monitor_controller.go => tidb_ng_monitoring_controller.go} (100%) diff --git a/pkg/controller/tidbngmonitoring/ng_monitor_control.go b/pkg/controller/tidbngmonitoring/tidb_ng_monitoring_control.go similarity index 100% rename from pkg/controller/tidbngmonitoring/ng_monitor_control.go rename to pkg/controller/tidbngmonitoring/tidb_ng_monitoring_control.go diff --git a/pkg/controller/tidbngmonitoring/ng_monitor_controller.go b/pkg/controller/tidbngmonitoring/tidb_ng_monitoring_controller.go similarity index 100% rename from pkg/controller/tidbngmonitoring/ng_monitor_controller.go rename to pkg/controller/tidbngmonitoring/tidb_ng_monitoring_controller.go From 0649a2046a412cb580516634ebf953c96fdc00f6 Mon Sep 17 00:00:00 2001 From: Shiori Date: Thu, 9 Dec 2021 10:02:24 +0800 Subject: [PATCH 23/28] enable status subresource --- manifests/crd.yaml | 2 ++ .../crd/v1/pingcap.com_tidbngmonitorings.yaml | 2 ++ .../v1beta1/pingcap.com_tidbngmonitorings.yaml | 2 ++ manifests/crd_v1beta1.yaml | 2 ++ .../pingcap/v1alpha1/tidbngmonitoring_types.go | 2 +- .../v1alpha1/fake/fake_tidbngmonitoring.go | 12 ++++++++++++ .../typed/pingcap/v1alpha1/tidbngmonitoring.go | 17 +++++++++++++++++ 7 files changed, 38 insertions(+), 1 deletion(-) diff --git a/manifests/crd.yaml b/manifests/crd.yaml index 6a542a37d6b..351dfac8add 100644 --- a/manifests/crd.yaml +++ b/manifests/crd.yaml @@ -36539,6 +36539,8 @@ spec: type: object served: true storage: true + subresources: + status: {} status: acceptedNames: kind: "" diff --git a/manifests/crd/v1/pingcap.com_tidbngmonitorings.yaml b/manifests/crd/v1/pingcap.com_tidbngmonitorings.yaml index b40401bcd30..9794f471317 100644 --- a/manifests/crd/v1/pingcap.com_tidbngmonitorings.yaml +++ b/manifests/crd/v1/pingcap.com_tidbngmonitorings.yaml @@ -4632,6 +4632,8 @@ spec: type: object served: true storage: true + subresources: + status: {} status: acceptedNames: kind: "" diff --git a/manifests/crd/v1beta1/pingcap.com_tidbngmonitorings.yaml b/manifests/crd/v1beta1/pingcap.com_tidbngmonitorings.yaml index 0e14c965e4e..f299709b570 100644 --- a/manifests/crd/v1beta1/pingcap.com_tidbngmonitorings.yaml +++ b/manifests/crd/v1beta1/pingcap.com_tidbngmonitorings.yaml @@ -18,6 +18,8 @@ spec: singular: tidbngmonitoring preserveUnknownFields: false scope: Namespaced + subresources: + status: {} validation: openAPIV3Schema: properties: diff --git a/manifests/crd_v1beta1.yaml b/manifests/crd_v1beta1.yaml index ffa1748a9d5..6d461147cd9 100644 --- a/manifests/crd_v1beta1.yaml +++ b/manifests/crd_v1beta1.yaml @@ -31903,6 +31903,8 @@ spec: singular: tidbngmonitoring preserveUnknownFields: false scope: Namespaced + subresources: + status: {} validation: openAPIV3Schema: properties: diff --git a/pkg/apis/pingcap/v1alpha1/tidbngmonitoring_types.go b/pkg/apis/pingcap/v1alpha1/tidbngmonitoring_types.go index 6e48b6ccbe8..6f68f9c06c3 100644 --- a/pkg/apis/pingcap/v1alpha1/tidbngmonitoring_types.go +++ b/pkg/apis/pingcap/v1alpha1/tidbngmonitoring_types.go @@ -23,10 +23,10 @@ import ( // TidbNGMonitoring contains the spec and status of tidb ng monitor // // +genclient -// +genclient:noStatus // +k8s:openapi-gen=true // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +kubebuilder:resource:shortName="tngm" +// +kubebuilder:subresource:status type TidbNGMonitoring struct { metav1.TypeMeta `json:",inline"` diff --git a/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/fake/fake_tidbngmonitoring.go b/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/fake/fake_tidbngmonitoring.go index 4c71abca2c6..3d713630034 100644 --- a/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/fake/fake_tidbngmonitoring.go +++ b/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/fake/fake_tidbngmonitoring.go @@ -99,6 +99,18 @@ func (c *FakeTidbNGMonitorings) Update(ctx context.Context, tidbNGMonitoring *v1 return obj.(*v1alpha1.TidbNGMonitoring), err } +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeTidbNGMonitorings) UpdateStatus(ctx context.Context, tidbNGMonitoring *v1alpha1.TidbNGMonitoring, opts v1.UpdateOptions) (*v1alpha1.TidbNGMonitoring, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(tidbngmonitoringsResource, "status", c.ns, tidbNGMonitoring), &v1alpha1.TidbNGMonitoring{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.TidbNGMonitoring), err +} + // Delete takes name of the tidbNGMonitoring and deletes it. Returns an error if one occurs. func (c *FakeTidbNGMonitorings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. diff --git a/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/tidbngmonitoring.go b/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/tidbngmonitoring.go index a9a1590e143..10fb448b0d6 100644 --- a/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/tidbngmonitoring.go +++ b/pkg/client/clientset/versioned/typed/pingcap/v1alpha1/tidbngmonitoring.go @@ -37,6 +37,7 @@ type TidbNGMonitoringsGetter interface { type TidbNGMonitoringInterface interface { Create(ctx context.Context, tidbNGMonitoring *v1alpha1.TidbNGMonitoring, opts v1.CreateOptions) (*v1alpha1.TidbNGMonitoring, error) Update(ctx context.Context, tidbNGMonitoring *v1alpha1.TidbNGMonitoring, opts v1.UpdateOptions) (*v1alpha1.TidbNGMonitoring, error) + UpdateStatus(ctx context.Context, tidbNGMonitoring *v1alpha1.TidbNGMonitoring, opts v1.UpdateOptions) (*v1alpha1.TidbNGMonitoring, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.TidbNGMonitoring, error) @@ -132,6 +133,22 @@ func (c *tidbNGMonitorings) Update(ctx context.Context, tidbNGMonitoring *v1alph return } +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *tidbNGMonitorings) UpdateStatus(ctx context.Context, tidbNGMonitoring *v1alpha1.TidbNGMonitoring, opts v1.UpdateOptions) (result *v1alpha1.TidbNGMonitoring, err error) { + result = &v1alpha1.TidbNGMonitoring{} + err = c.client.Put(). + Namespace(c.ns). + Resource("tidbngmonitorings"). + Name(tidbNGMonitoring.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(tidbNGMonitoring). + Do(ctx). + Into(result) + return +} + // Delete takes name of the tidbNGMonitoring and deletes it. Returns an error if one occurs. func (c *tidbNGMonitorings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). From 4efaea5dc23e2339f1a6086dd01ae279da644dd4 Mon Sep 17 00:00:00 2001 From: Shiori Date: Thu, 9 Dec 2021 10:11:45 +0800 Subject: [PATCH 24/28] remomve validate annotation --- pkg/apis/pingcap/v1alpha1/validation/validation.go | 5 +---- .../tidbngmonitoring/tidb_ng_monitoring_control.go | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/pkg/apis/pingcap/v1alpha1/validation/validation.go b/pkg/apis/pingcap/v1alpha1/validation/validation.go index 0b1462729f5..73fad3e23a7 100644 --- a/pkg/apis/pingcap/v1alpha1/validation/validation.go +++ b/pkg/apis/pingcap/v1alpha1/validation/validation.go @@ -66,11 +66,8 @@ func ValidateDMCluster(dc *v1alpha1.DMCluster) field.ErrorList { func ValidateTiDBNGMonitoring(tngm *v1alpha1.TidbNGMonitoring) field.ErrorList { allErrs := field.ErrorList{} - // medata - fldPath := field.NewPath("metadata") - allErrs = append(allErrs, validateAnnotations(tngm.ObjectMeta.Annotations, fldPath.Child("annotations"))...) // spec - fldPath = field.NewPath("spec") + fldPath := field.NewPath("spec") allErrs = append(allErrs, validateComponentSpec(&tngm.Spec.ComponentSpec, fldPath)...) allErrs = append(allErrs, validateNGMonitoringSpec(&tngm.Spec.NGMonitoring, fldPath.Child("ngMonitoring"))...) diff --git a/pkg/controller/tidbngmonitoring/tidb_ng_monitoring_control.go b/pkg/controller/tidbngmonitoring/tidb_ng_monitoring_control.go index 6200767a846..8791234d0b3 100644 --- a/pkg/controller/tidbngmonitoring/tidb_ng_monitoring_control.go +++ b/pkg/controller/tidbngmonitoring/tidb_ng_monitoring_control.go @@ -128,7 +128,7 @@ func (c *defaultTiDBNGMonitoringControl) Update(tngm *v1alpha1.TidbNGMonitoring) err := retry.RetryOnConflict(retry.DefaultRetry, func() error { var updateErr error - update, updateErr = c.deps.Clientset.PingcapV1alpha1().TidbNGMonitorings(ns).Update(context.TODO(), tngm, metav1.UpdateOptions{}) + update, updateErr = c.deps.Clientset.PingcapV1alpha1().TidbNGMonitorings(ns).UpdateStatus(context.TODO(), tngm, metav1.UpdateOptions{}) if updateErr == nil { klog.Infof("TidbNGMonitoring: [%s/%s] updated successfully", ns, name) return nil From 4d09da3b8bcc927b36e21f3e0613ea3ed68eb75f Mon Sep 17 00:00:00 2001 From: Shiori Date: Fri, 10 Dec 2021 16:17:07 +0800 Subject: [PATCH 25/28] fix some bug # Conflicts: # pkg/manager/tidbngmonitoring/ng_monitoring_manager.go --- .../tidbngmonitoring/ng_monitoring_manager.go | 30 +++++++++++++++++-- pkg/manager/utils/statefulset_builder.go | 13 +++++++- 2 files changed, 39 insertions(+), 4 deletions(-) diff --git a/pkg/manager/tidbngmonitoring/ng_monitoring_manager.go b/pkg/manager/tidbngmonitoring/ng_monitoring_manager.go index f7d8bf79b16..53c8777aef9 100644 --- a/pkg/manager/tidbngmonitoring/ng_monitoring_manager.go +++ b/pkg/manager/tidbngmonitoring/ng_monitoring_manager.go @@ -20,7 +20,6 @@ import ( "github.com/pingcap/tidb-operator/pkg/apis/label" "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" "github.com/pingcap/tidb-operator/pkg/controller" - "github.com/pingcap/tidb-operator/pkg/manager" mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" "github.com/pingcap/tidb-operator/pkg/util" @@ -46,7 +45,7 @@ type ngMonitoringManager struct { deps *controller.Dependencies } -func NewNGMonitorManager(deps *controller.Dependencies) manager.TiDBNGMonitoringManager { +func NewNGMonitorManager(deps *controller.Dependencies) *ngMonitoringManager { return &ngMonitoringManager{ deps: deps, } @@ -243,6 +242,10 @@ func GenerateNGMonitoringStatefulSet(tngm *v1alpha1.TidbNGMonitoring, cm *corev1 ns := tngm.GetNamespace() name := tngm.GetName() + if cm == nil { + return nil, fmt.Errorf("config map is nil for tidb ng monitoring %s/%s", ns, name) + } + spec := tngm.BaseNGMonitoringSpec() meta, stsLabels := GenerateNGMonitoringMeta(tngm, NGMonitoringName) headlessServiceName := NGMonitoringHeadlessServiceName(name) @@ -378,7 +381,7 @@ func GenerateNGMonitoringStatefulSet(tngm *v1alpha1.TidbNGMonitoring, cm *corev1 // downward builder.PodTemplateSpecBuilder().ContainerBuilder(nmContainerName).AddEnvs(spec.Env()...) builder.PodTemplateSpecBuilder().AddLabels(spec.Labels()) - builder.PodTemplateSpecBuilder().AddLabels(spec.Annotations()) + builder.PodTemplateSpecBuilder().AddAnnotations(spec.Annotations()) // additional storage volumes storageVolMounts, additionalPVCs := util.BuildStorageVolumeAndVolumeMount(tngm.Spec.NGMonitoring.StorageVolumes, tngm.Spec.NGMonitoring.StorageClassName, v1alpha1.NGMonitoringMemberType) builder.PodTemplateSpecBuilder().ContainerBuilder(nmContainerName).AddVolumeMounts(storageVolMounts...) @@ -386,6 +389,8 @@ func GenerateNGMonitoringStatefulSet(tngm *v1alpha1.TidbNGMonitoring, cm *corev1 // additional volumes and mounts builder.PodTemplateSpecBuilder().ContainerBuilder(nmContainerName).AddVolumeMounts(spec.AdditionalVolumeMounts()...) builder.PodTemplateSpecBuilder().AddVolumes(spec.AdditionalVolumes()...) + // additional containers + builder.PodTemplateSpecBuilder().AddContainers(spec.AdditionalContainers()...) // TODO: TLS return builder.Get(), nil @@ -477,3 +482,22 @@ func GenerateNGMonitoringStartScript(tngm *v1alpha1.TidbNGMonitoring) (string, e return script, nil } + +type FakeNGMonitoringManager struct { + sync func(tngm *v1alpha1.TidbNGMonitoring) error +} + +func NewFakeNGMonitoringManager() *FakeNGMonitoringManager { + return &FakeNGMonitoringManager{} +} + +func (m *FakeNGMonitoringManager) MockSync(sync func(tngm *v1alpha1.TidbNGMonitoring) error) { + m.sync = sync +} + +func (m *FakeNGMonitoringManager) Sync(tngm *v1alpha1.TidbNGMonitoring) error { + if m.sync == nil { + return nil + } + return m.sync(tngm) +} diff --git a/pkg/manager/utils/statefulset_builder.go b/pkg/manager/utils/statefulset_builder.go index 83adfdbeb01..d46cf7aa7c7 100644 --- a/pkg/manager/utils/statefulset_builder.go +++ b/pkg/manager/utils/statefulset_builder.go @@ -64,6 +64,9 @@ func (pb *PodTemplateSpecBuilder) Clone() *corev1.PodTemplateSpec { return pb.prototype.DeepCopy() } +// ContainerBuilder return the specified container builder +// +// NOTE: don't save the builder, it will be outdated if container slice expand func (pb *PodTemplateSpecBuilder) ContainerBuilder(name string) *ContainerBuilder { for i := range pb.prototype.Spec.Containers { if pb.prototype.Spec.Containers[i].Name == name { @@ -73,6 +76,13 @@ func (pb *PodTemplateSpecBuilder) ContainerBuilder(name string) *ContainerBuilde return nil } +// AddContainers add container to pod's spec +// +// NOTE: if container slice expand, old ContainerBuilder reference will be outdated. +func (pb *PodTemplateSpecBuilder) AddContainers(containers ...corev1.Container) { + pb.prototype.Spec.Containers = append(pb.prototype.Spec.Containers, containers...) +} + func (b *PodTemplateSpecBuilder) AddVolumes(volumes ...corev1.Volume) { b.prototype.Spec.Volumes = append(b.prototype.Spec.Volumes, volumes...) } @@ -82,10 +92,11 @@ func (b *PodTemplateSpecBuilder) AddLabels(labels map[string]string) { } func (b *PodTemplateSpecBuilder) AddAnnotations(annos map[string]string) { - b.prototype.Labels = util.CombineStringMap(b.prototype.Annotations, annos) + b.prototype.Annotations = util.CombineStringMap(b.prototype.Annotations, annos) } func (b *PodTemplateSpecBuilder) RunInHostNetwork() { + b.prototype.Spec.HostNetwork = true b.prototype.Spec.DNSPolicy = corev1.DNSClusterFirstWithHostNet for _, container := range b.prototype.Spec.Containers { container.Env = util.AppendEnv(container.Env, []corev1.EnvVar{ From 79259f0fcca8938927ce66976076e400e64797a0 Mon Sep 17 00:00:00 2001 From: Shiori Date: Fri, 10 Dec 2021 21:05:47 +0800 Subject: [PATCH 26/28] use config-file as key in configmap --- pkg/manager/tidbngmonitoring/ng_monitoring_manager.go | 2 +- pkg/manager/utils/config.go | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/pkg/manager/tidbngmonitoring/ng_monitoring_manager.go b/pkg/manager/tidbngmonitoring/ng_monitoring_manager.go index 53c8777aef9..2cb1e0a102a 100644 --- a/pkg/manager/tidbngmonitoring/ng_monitoring_manager.go +++ b/pkg/manager/tidbngmonitoring/ng_monitoring_manager.go @@ -36,7 +36,7 @@ const ( ngmPodConfigVolumeMountDir = "/etc/ng-monitoring" // the dir for ng monitoring config ngmPodConfigFilename = "ng-monitoring.toml" // the filename of config file - ngmConfigMapConfigKey = "ng-monitoring-config" // the key for config data in config map + ngmConfigMapConfigKey = "config-file" // the key for config data in config map ngmServicePort = 12020 ) diff --git a/pkg/manager/utils/config.go b/pkg/manager/utils/config.go index 43a5690d994..35575395d7f 100644 --- a/pkg/manager/utils/config.go +++ b/pkg/manager/utils/config.go @@ -29,11 +29,10 @@ func updateConfigMap(old, new *corev1.ConfigMap) (bool, error) { // check config tomlField := []string{ - "config-file", // pd,tikv,tidb - "pump-config", // pump - "config_templ.toml", // tiflash - "proxy_templ.toml", // tiflash - "ng-monitoring-config", // ng-monitoring + "config-file", // pd,tikv,tidb,ng-monitoring + "pump-config", // pump + "config_templ.toml", // tiflash + "proxy_templ.toml", // tiflash } for _, k := range tomlField { oldData, oldOK := old.Data[k] From c110a637372c6c8a8611604d184ea58397719cd0 Mon Sep 17 00:00:00 2001 From: Shiori Date: Fri, 10 Dec 2021 21:09:10 +0800 Subject: [PATCH 27/28] fix empty line --- pkg/manager/member/dm_master_upgrader_test.go | 13 ++++++------- pkg/manager/member/dm_worker_member_manager_test.go | 9 ++++----- pkg/manager/member/pd_upgrader.go | 5 ++--- pkg/manager/member/pd_upgrader_test.go | 5 ++--- pkg/manager/member/ticdc_upgrader.go | 3 +-- pkg/manager/member/ticdc_upgrader_test.go | 3 +-- pkg/manager/member/tidb_member_manager.go | 3 +-- pkg/manager/member/tidb_member_manager_test.go | 3 +-- pkg/manager/member/tidb_upgrader.go | 3 +-- pkg/manager/member/tidb_upgrader_test.go | 3 +-- pkg/manager/member/tiflash_upgrader.go | 3 +-- pkg/manager/member/tiflash_upgrader_test.go | 3 +-- pkg/manager/member/tikv_upgrader_test.go | 3 +-- 13 files changed, 23 insertions(+), 36 deletions(-) diff --git a/pkg/manager/member/dm_master_upgrader_test.go b/pkg/manager/member/dm_master_upgrader_test.go index 6ec71ac46c2..c3f07ec8ad0 100644 --- a/pkg/manager/member/dm_master_upgrader_test.go +++ b/pkg/manager/member/dm_master_upgrader_test.go @@ -18,18 +18,17 @@ import ( "testing" "github.com/pingcap/tidb-operator/pkg/apis/label" - mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" - + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" + "github.com/pingcap/tidb-operator/pkg/controller" "github.com/pingcap/tidb-operator/pkg/dmapi" - podinformers "k8s.io/client-go/informers/core/v1" + mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" . "github.com/onsi/gomega" - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" - "github.com/pingcap/tidb-operator/pkg/controller" apps "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + podinformers "k8s.io/client-go/informers/core/v1" "k8s.io/utils/pointer" ) diff --git a/pkg/manager/member/dm_worker_member_manager_test.go b/pkg/manager/member/dm_worker_member_manager_test.go index 627b02a0667..d5d94c83ab4 100644 --- a/pkg/manager/member/dm_worker_member_manager_test.go +++ b/pkg/manager/member/dm_worker_member_manager_test.go @@ -20,15 +20,13 @@ import ( "testing" "github.com/pingcap/tidb-operator/pkg/apis/label" + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" + "github.com/pingcap/tidb-operator/pkg/controller" + "github.com/pingcap/tidb-operator/pkg/dmapi" mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" "github.com/google/go-cmp/cmp" - "k8s.io/apimachinery/pkg/util/intstr" - . "github.com/onsi/gomega" - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" - "github.com/pingcap/tidb-operator/pkg/controller" - "github.com/pingcap/tidb-operator/pkg/dmapi" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" v1 "k8s.io/api/core/v1" @@ -36,6 +34,7 @@ import ( "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/intstr" "k8s.io/client-go/tools/cache" "k8s.io/utils/pointer" "sigs.k8s.io/controller-runtime/pkg/client" diff --git a/pkg/manager/member/pd_upgrader.go b/pkg/manager/member/pd_upgrader.go index 33e123f3b28..703205d652d 100644 --- a/pkg/manager/member/pd_upgrader.go +++ b/pkg/manager/member/pd_upgrader.go @@ -16,12 +16,11 @@ package member import ( "fmt" - mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" - - "github.com/pingcap/advanced-statefulset/client/apis/apps/v1/helper" "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" "github.com/pingcap/tidb-operator/pkg/controller" + mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" + "github.com/pingcap/advanced-statefulset/client/apis/apps/v1/helper" apps "k8s.io/api/apps/v1" "k8s.io/klog" ) diff --git a/pkg/manager/member/pd_upgrader_test.go b/pkg/manager/member/pd_upgrader_test.go index 07480fe7549..8839903b45f 100644 --- a/pkg/manager/member/pd_upgrader_test.go +++ b/pkg/manager/member/pd_upgrader_test.go @@ -17,14 +17,13 @@ import ( "fmt" "testing" - mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" - - . "github.com/onsi/gomega" "github.com/pingcap/tidb-operator/pkg/apis/label" "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" "github.com/pingcap/tidb-operator/pkg/controller" + mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" "github.com/pingcap/tidb-operator/pkg/pdapi" + . "github.com/onsi/gomega" apps "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/manager/member/ticdc_upgrader.go b/pkg/manager/member/ticdc_upgrader.go index c4b36615186..644c61743f1 100644 --- a/pkg/manager/member/ticdc_upgrader.go +++ b/pkg/manager/member/ticdc_upgrader.go @@ -16,10 +16,9 @@ package member import ( "fmt" - mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" "github.com/pingcap/tidb-operator/pkg/controller" + mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" "github.com/pingcap/advanced-statefulset/client/apis/apps/v1/helper" apps "k8s.io/api/apps/v1" diff --git a/pkg/manager/member/ticdc_upgrader_test.go b/pkg/manager/member/ticdc_upgrader_test.go index 6883194cac7..219c9bff1da 100644 --- a/pkg/manager/member/ticdc_upgrader_test.go +++ b/pkg/manager/member/ticdc_upgrader_test.go @@ -16,11 +16,10 @@ package member import ( "testing" - mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" - "github.com/pingcap/tidb-operator/pkg/apis/label" "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" "github.com/pingcap/tidb-operator/pkg/controller" + mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" . "github.com/onsi/gomega" apps "k8s.io/api/apps/v1" diff --git a/pkg/manager/member/tidb_member_manager.go b/pkg/manager/member/tidb_member_manager.go index 20a0f10592a..d017d50202d 100644 --- a/pkg/manager/member/tidb_member_manager.go +++ b/pkg/manager/member/tidb_member_manager.go @@ -20,12 +20,11 @@ import ( "strconv" "strings" - mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" - "github.com/pingcap/tidb-operator/pkg/apis/label" "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" "github.com/pingcap/tidb-operator/pkg/controller" "github.com/pingcap/tidb-operator/pkg/manager" + mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" "github.com/pingcap/tidb-operator/pkg/util" "github.com/pingcap/advanced-statefulset/client/apis/apps/v1/helper" diff --git a/pkg/manager/member/tidb_member_manager_test.go b/pkg/manager/member/tidb_member_manager_test.go index 01aa97b6486..13913a9b3b7 100644 --- a/pkg/manager/member/tidb_member_manager_test.go +++ b/pkg/manager/member/tidb_member_manager_test.go @@ -21,12 +21,11 @@ import ( "testing" "time" - mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" - "github.com/pingcap/tidb-operator/pkg/apis/label" "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" "github.com/pingcap/tidb-operator/pkg/apis/util/toml" "github.com/pingcap/tidb-operator/pkg/controller" + mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" "github.com/google/go-cmp/cmp" . "github.com/onsi/gomega" diff --git a/pkg/manager/member/tidb_upgrader.go b/pkg/manager/member/tidb_upgrader.go index 53a1baeafd1..1f0758250b2 100644 --- a/pkg/manager/member/tidb_upgrader.go +++ b/pkg/manager/member/tidb_upgrader.go @@ -16,10 +16,9 @@ package member import ( "fmt" - mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" "github.com/pingcap/tidb-operator/pkg/controller" + mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" "github.com/pingcap/advanced-statefulset/client/apis/apps/v1/helper" apps "k8s.io/api/apps/v1" diff --git a/pkg/manager/member/tidb_upgrader_test.go b/pkg/manager/member/tidb_upgrader_test.go index 1e925d16d9f..3a9091e71c6 100644 --- a/pkg/manager/member/tidb_upgrader_test.go +++ b/pkg/manager/member/tidb_upgrader_test.go @@ -16,11 +16,10 @@ package member import ( "testing" - mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" - "github.com/pingcap/tidb-operator/pkg/apis/label" "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" "github.com/pingcap/tidb-operator/pkg/controller" + mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" . "github.com/onsi/gomega" apps "k8s.io/api/apps/v1" diff --git a/pkg/manager/member/tiflash_upgrader.go b/pkg/manager/member/tiflash_upgrader.go index 8b18113653b..fdc87fd2193 100644 --- a/pkg/manager/member/tiflash_upgrader.go +++ b/pkg/manager/member/tiflash_upgrader.go @@ -16,10 +16,9 @@ package member import ( "fmt" - mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" "github.com/pingcap/tidb-operator/pkg/controller" + mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" "github.com/pingcap/tidb-operator/pkg/tiflashapi" "github.com/Masterminds/semver" diff --git a/pkg/manager/member/tiflash_upgrader_test.go b/pkg/manager/member/tiflash_upgrader_test.go index 95b75dce898..1f60946ca49 100644 --- a/pkg/manager/member/tiflash_upgrader_test.go +++ b/pkg/manager/member/tiflash_upgrader_test.go @@ -26,11 +26,10 @@ import ( podinformers "k8s.io/client-go/informers/core/v1" "k8s.io/utils/pointer" - mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" - "github.com/pingcap/tidb-operator/pkg/apis/label" "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" "github.com/pingcap/tidb-operator/pkg/controller" + mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" "github.com/pingcap/tidb-operator/pkg/pdapi" "github.com/pingcap/tidb-operator/pkg/tiflashapi" ) diff --git a/pkg/manager/member/tikv_upgrader_test.go b/pkg/manager/member/tikv_upgrader_test.go index e7cb22c4f1d..b0ddbe1db41 100644 --- a/pkg/manager/member/tikv_upgrader_test.go +++ b/pkg/manager/member/tikv_upgrader_test.go @@ -19,11 +19,10 @@ import ( "testing" "time" - mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" - "github.com/pingcap/tidb-operator/pkg/apis/label" "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" "github.com/pingcap/tidb-operator/pkg/controller" + mngerutils "github.com/pingcap/tidb-operator/pkg/manager/utils" "github.com/pingcap/tidb-operator/pkg/pdapi" "github.com/pingcap/tidb-operator/pkg/tikvapi" From 72cc5938f3e45dfe16c46561f080751a20800d9c Mon Sep 17 00:00:00 2001 From: Shiori Date: Fri, 10 Dec 2021 21:20:53 +0800 Subject: [PATCH 28/28] validate cluster length --- .../pingcap/v1alpha1/validation/validation.go | 17 +++++++++++++---- .../tidbngmonitoring/ng_monitoring_manager.go | 4 ---- pkg/manager/utils/statefulset_builder.go | 12 ------------ 3 files changed, 13 insertions(+), 20 deletions(-) diff --git a/pkg/apis/pingcap/v1alpha1/validation/validation.go b/pkg/apis/pingcap/v1alpha1/validation/validation.go index 73fad3e23a7..fee33cce106 100644 --- a/pkg/apis/pingcap/v1alpha1/validation/validation.go +++ b/pkg/apis/pingcap/v1alpha1/validation/validation.go @@ -66,10 +66,7 @@ func ValidateDMCluster(dc *v1alpha1.DMCluster) field.ErrorList { func ValidateTiDBNGMonitoring(tngm *v1alpha1.TidbNGMonitoring) field.ErrorList { allErrs := field.ErrorList{} - // spec - fldPath := field.NewPath("spec") - allErrs = append(allErrs, validateComponentSpec(&tngm.Spec.ComponentSpec, fldPath)...) - allErrs = append(allErrs, validateNGMonitoringSpec(&tngm.Spec.NGMonitoring, fldPath.Child("ngMonitoring"))...) + allErrs = append(allErrs, validateTidbNGMonitorinSpec(&tngm.Spec, field.NewPath("spec"))...) return allErrs } @@ -321,6 +318,18 @@ func validateWorkerSpec(spec *v1alpha1.WorkerSpec, fldPath *field.Path) field.Er return allErrs } +func validateTidbNGMonitorinSpec(spec *v1alpha1.TidbNGMonitoringSpec, fldPath *field.Path) field.ErrorList { + allErrs := field.ErrorList{} + + if len(spec.Clusters) < 1 { + allErrs = append(allErrs, field.Invalid(fldPath.Child("clusters"), len(spec.Clusters), "must have at least one item")) + } + allErrs = append(allErrs, validateComponentSpec(&spec.ComponentSpec, fldPath)...) + allErrs = append(allErrs, validateNGMonitoringSpec(&spec.NGMonitoring, fldPath.Child("ngMonitoring"))...) + + return allErrs +} + func validateNGMonitoringSpec(spec *v1alpha1.NGMonitoringSpec, fldPath *field.Path) field.ErrorList { allErrs := field.ErrorList{} diff --git a/pkg/manager/tidbngmonitoring/ng_monitoring_manager.go b/pkg/manager/tidbngmonitoring/ng_monitoring_manager.go index 2cb1e0a102a..98e6a75df59 100644 --- a/pkg/manager/tidbngmonitoring/ng_monitoring_manager.go +++ b/pkg/manager/tidbngmonitoring/ng_monitoring_manager.go @@ -460,10 +460,6 @@ func GenerateNGMonitoringHeadlessService(tngm *v1alpha1.TidbNGMonitoring) *corev } func GenerateNGMonitoringStartScript(tngm *v1alpha1.TidbNGMonitoring) (string, error) { - if len(tngm.Spec.Clusters) < 1 { - return "", fmt.Errorf("tidb cluster ref is empty") - } - tcRef := tngm.Spec.Clusters[0] model := &NGMonitoringStartScriptModel{ diff --git a/pkg/manager/utils/statefulset_builder.go b/pkg/manager/utils/statefulset_builder.go index d46cf7aa7c7..ddff38f696f 100644 --- a/pkg/manager/utils/statefulset_builder.go +++ b/pkg/manager/utils/statefulset_builder.go @@ -98,18 +98,6 @@ func (b *PodTemplateSpecBuilder) AddAnnotations(annos map[string]string) { func (b *PodTemplateSpecBuilder) RunInHostNetwork() { b.prototype.Spec.HostNetwork = true b.prototype.Spec.DNSPolicy = corev1.DNSClusterFirstWithHostNet - for _, container := range b.prototype.Spec.Containers { - container.Env = util.AppendEnv(container.Env, []corev1.EnvVar{ - { - Name: "POD_NAME", - ValueFrom: &corev1.EnvVarSource{ - FieldRef: &corev1.ObjectFieldSelector{ - FieldPath: "metadata.name", - }, - }, - }, - }) - } } type StatefulSetBuilder struct {