github.com/1aal/kubeblocks@v0.0.0-20231107070852-e1c03e598921/deploy/helm/crds/dataprotection.kubeblocks.io_backuppolicies.yaml (about) 1 apiVersion: apiextensions.k8s.io/v1 2 kind: CustomResourceDefinition 3 metadata: 4 annotations: 5 controller-gen.kubebuilder.io/version: v0.12.1 6 labels: 7 app.kubernetes.io/name: kubeblocks 8 name: backuppolicies.dataprotection.kubeblocks.io 9 spec: 10 group: dataprotection.kubeblocks.io 11 names: 12 categories: 13 - kubeblocks 14 kind: BackupPolicy 15 listKind: BackupPolicyList 16 plural: backuppolicies 17 shortNames: 18 - bp 19 singular: backuppolicy 20 scope: Namespaced 21 versions: 22 - additionalPrinterColumns: 23 - jsonPath: .spec.backupRepoName 24 name: BACKUP-REPO 25 type: string 26 - jsonPath: .status.phase 27 name: STATUS 28 type: string 29 - jsonPath: .metadata.creationTimestamp 30 name: AGE 31 type: date 32 name: v1alpha1 33 schema: 34 openAPIV3Schema: 35 description: BackupPolicy is the Schema for the backuppolicies API. 36 properties: 37 apiVersion: 38 description: 'APIVersion defines the versioned schema of this representation 39 of an object. Servers should convert recognized schemas to the latest 40 internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' 41 type: string 42 kind: 43 description: 'Kind is a string value representing the REST resource this 44 object represents. Servers may infer this from the endpoint the client 45 submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' 46 type: string 47 metadata: 48 type: object 49 spec: 50 description: BackupPolicySpec defines the desired state of BackupPolicy 51 properties: 52 backoffLimit: 53 description: Specifies the number of retries before marking the backup 54 failed. 55 format: int32 56 maximum: 10 57 minimum: 0 58 type: integer 59 backupMethods: 60 description: backupMethods defines the backup methods. 61 items: 62 description: BackupMethod defines the backup method. 63 properties: 64 actionSetName: 65 description: actionSetName refers to the ActionSet object that 66 defines the backup actions. For volume snapshot backup, the 67 actionSet is not required, the controller will use the CSI 68 volume snapshotter to create the snapshot. 69 type: string 70 env: 71 description: env specifies the environment variables for the 72 backup workload. 73 items: 74 description: EnvVar represents an environment variable present 75 in a Container. 76 properties: 77 name: 78 description: Name of the environment variable. Must be 79 a C_IDENTIFIER. 80 type: string 81 value: 82 description: 'Variable references $(VAR_NAME) are expanded 83 using the previously defined environment variables in 84 the container and any service environment variables. 85 If a variable cannot be resolved, the reference in the 86 input string will be unchanged. Double $$ are reduced 87 to a single $, which allows for escaping the $(VAR_NAME) 88 syntax: i.e. "$$(VAR_NAME)" will produce the string 89 literal "$(VAR_NAME)". Escaped references will never 90 be expanded, regardless of whether the variable exists 91 or not. Defaults to "".' 92 type: string 93 valueFrom: 94 description: Source for the environment variable's value. 95 Cannot be used if value is not empty. 96 properties: 97 configMapKeyRef: 98 description: Selects a key of a ConfigMap. 99 properties: 100 key: 101 description: The key to select. 102 type: string 103 name: 104 description: 'Name of the referent. More info: 105 https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names 106 TODO: Add other useful fields. apiVersion, kind, 107 uid?' 108 type: string 109 optional: 110 description: Specify whether the ConfigMap or 111 its key must be defined 112 type: boolean 113 required: 114 - key 115 type: object 116 x-kubernetes-map-type: atomic 117 fieldRef: 118 description: 'Selects a field of the pod: supports 119 metadata.name, metadata.namespace, `metadata.labels[''<KEY>'']`, 120 `metadata.annotations[''<KEY>'']`, spec.nodeName, 121 spec.serviceAccountName, status.hostIP, status.podIP, 122 status.podIPs.' 123 properties: 124 apiVersion: 125 description: Version of the schema the FieldPath 126 is written in terms of, defaults to "v1". 127 type: string 128 fieldPath: 129 description: Path of the field to select in the 130 specified API version. 131 type: string 132 required: 133 - fieldPath 134 type: object 135 x-kubernetes-map-type: atomic 136 resourceFieldRef: 137 description: 'Selects a resource of the container: 138 only resources limits and requests (limits.cpu, 139 limits.memory, limits.ephemeral-storage, requests.cpu, 140 requests.memory and requests.ephemeral-storage) 141 are currently supported.' 142 properties: 143 containerName: 144 description: 'Container name: required for volumes, 145 optional for env vars' 146 type: string 147 divisor: 148 anyOf: 149 - type: integer 150 - type: string 151 description: Specifies the output format of the 152 exposed resources, defaults to "1" 153 pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ 154 x-kubernetes-int-or-string: true 155 resource: 156 description: 'Required: resource to select' 157 type: string 158 required: 159 - resource 160 type: object 161 x-kubernetes-map-type: atomic 162 secretKeyRef: 163 description: Selects a key of a secret in the pod's 164 namespace 165 properties: 166 key: 167 description: The key of the secret to select from. Must 168 be a valid secret key. 169 type: string 170 name: 171 description: 'Name of the referent. More info: 172 https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names 173 TODO: Add other useful fields. apiVersion, kind, 174 uid?' 175 type: string 176 optional: 177 description: Specify whether the Secret or its 178 key must be defined 179 type: boolean 180 required: 181 - key 182 type: object 183 x-kubernetes-map-type: atomic 184 type: object 185 required: 186 - name 187 type: object 188 type: array 189 name: 190 description: the name of backup method. 191 pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ 192 type: string 193 runtimeSettings: 194 description: runtimeSettings specifies runtime settings for 195 the backup workload container. 196 properties: 197 resources: 198 description: 'resources specifies the resource required 199 by container. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' 200 properties: 201 claims: 202 description: "Claims lists the names of resources, defined 203 in spec.resourceClaims, that are used by this container. 204 \n This is an alpha field and requires enabling the 205 DynamicResourceAllocation feature gate. \n This field 206 is immutable. It can only be set for containers." 207 items: 208 description: ResourceClaim references one entry in 209 PodSpec.ResourceClaims. 210 properties: 211 name: 212 description: Name must match the name of one entry 213 in pod.spec.resourceClaims of the Pod where 214 this field is used. It makes that resource available 215 inside a container. 216 type: string 217 required: 218 - name 219 type: object 220 type: array 221 x-kubernetes-list-map-keys: 222 - name 223 x-kubernetes-list-type: map 224 limits: 225 additionalProperties: 226 anyOf: 227 - type: integer 228 - type: string 229 pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ 230 x-kubernetes-int-or-string: true 231 description: 'Limits describes the maximum amount of 232 compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' 233 type: object 234 requests: 235 additionalProperties: 236 anyOf: 237 - type: integer 238 - type: string 239 pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ 240 x-kubernetes-int-or-string: true 241 description: 'Requests describes the minimum amount 242 of compute resources required. If Requests is omitted 243 for a container, it defaults to Limits if that is 244 explicitly specified, otherwise to an implementation-defined 245 value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' 246 type: object 247 type: object 248 type: object 249 snapshotVolumes: 250 default: false 251 description: snapshotVolumes specifies whether to take snapshots 252 of persistent volumes. if true, the BackupScript is not required, 253 the controller will use the CSI volume snapshotter to create 254 the snapshot. 255 type: boolean 256 targetVolumes: 257 description: targetVolumes specifies which volumes from the 258 target should be mounted in the backup workload. 259 properties: 260 volumeMounts: 261 description: volumeMounts specifies the mount for the volumes 262 specified in `Volumes` section. 263 items: 264 description: VolumeMount describes a mounting of a Volume 265 within a container. 266 properties: 267 mountPath: 268 description: Path within the container at which the 269 volume should be mounted. Must not contain ':'. 270 type: string 271 mountPropagation: 272 description: mountPropagation determines how mounts 273 are propagated from the host to container and the 274 other way around. When not set, MountPropagationNone 275 is used. This field is beta in 1.10. 276 type: string 277 name: 278 description: This must match the Name of a Volume. 279 type: string 280 readOnly: 281 description: Mounted read-only if true, read-write 282 otherwise (false or unspecified). Defaults to false. 283 type: boolean 284 subPath: 285 description: Path within the volume from which the 286 container's volume should be mounted. Defaults to 287 "" (volume's root). 288 type: string 289 subPathExpr: 290 description: Expanded path within the volume from 291 which the container's volume should be mounted. 292 Behaves similarly to SubPath but environment variable 293 references $(VAR_NAME) are expanded using the container's 294 environment. Defaults to "" (volume's root). SubPathExpr 295 and SubPath are mutually exclusive. 296 type: string 297 required: 298 - mountPath 299 - name 300 type: object 301 type: array 302 volumes: 303 description: Volumes indicates the list of volumes of targeted 304 application that should be mounted on the backup job. 305 items: 306 type: string 307 type: array 308 type: object 309 required: 310 - name 311 type: object 312 type: array 313 backupRepoName: 314 description: backupRepoName is the name of BackupRepo and the backup 315 data will be stored in this repository. If not set, will be stored 316 in the default backup repository. 317 pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ 318 type: string 319 pathPrefix: 320 description: pathPrefix is the directory inside the backup repository 321 to store the backup content. It is a relative to the path of the 322 backup repository. 323 type: string 324 target: 325 description: target specifies the target information to back up. 326 properties: 327 connectionCredential: 328 description: connectionCredential specifies the connection credential 329 to connect to the target database cluster. 330 properties: 331 hostKey: 332 description: hostKey specifies the map key of the host in 333 the connection credential secret. 334 type: string 335 passwordKey: 336 default: password 337 description: passwordKey specifies the map key of the password 338 in the connection credential secret. This password will 339 be saved in the backup annotation for full backup. You can 340 use the environment variable DP_ENCRYPTION_KEY to specify 341 encryption key. 342 type: string 343 portKey: 344 description: portKey specifies the map key of the port in 345 the connection credential secret. 346 type: string 347 secretName: 348 description: secretName refers to the Secret object that contains 349 the connection credential. 350 pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ 351 type: string 352 usernameKey: 353 default: username 354 description: usernameKey specifies the map key of the user 355 in the connection credential secret. 356 type: string 357 required: 358 - secretName 359 type: object 360 podSelector: 361 description: podSelector is used to find the target pod. The volumes 362 of the target pod will be backed up. 363 properties: 364 matchExpressions: 365 description: matchExpressions is a list of label selector 366 requirements. The requirements are ANDed. 367 items: 368 description: A label selector requirement is a selector 369 that contains values, a key, and an operator that relates 370 the key and values. 371 properties: 372 key: 373 description: key is the label key that the selector 374 applies to. 375 type: string 376 operator: 377 description: operator represents a key's relationship 378 to a set of values. Valid operators are In, NotIn, 379 Exists and DoesNotExist. 380 type: string 381 values: 382 description: values is an array of string values. If 383 the operator is In or NotIn, the values array must 384 be non-empty. If the operator is Exists or DoesNotExist, 385 the values array must be empty. This array is replaced 386 during a strategic merge patch. 387 items: 388 type: string 389 type: array 390 required: 391 - key 392 - operator 393 type: object 394 type: array 395 matchLabels: 396 additionalProperties: 397 type: string 398 description: matchLabels is a map of {key,value} pairs. A 399 single {key,value} in the matchLabels map is equivalent 400 to an element of matchExpressions, whose key field is "key", 401 the operator is "In", and the values array contains only 402 "value". The requirements are ANDed. 403 type: object 404 strategy: 405 default: Any 406 description: 'strategy specifies the strategy to select the 407 target pod when multiple pods are selected. Valid values 408 are: - Any: select any one pod that match the labelsSelector.' 409 enum: 410 - Any 411 type: string 412 type: object 413 x-kubernetes-map-type: atomic 414 resources: 415 description: resources specifies the kubernetes resources to back 416 up. 417 properties: 418 excluded: 419 description: excluded is a slice of namespaced-scoped resource 420 type names to exclude in the kubernetes resources. The default 421 value is empty. 422 items: 423 type: string 424 type: array 425 included: 426 default: 427 - '*' 428 description: included is a slice of namespaced-scoped resource 429 type names to include in the kubernetes resources. The default 430 value is "*", which means all resource types will be included. 431 items: 432 type: string 433 type: array 434 selector: 435 description: selector is a metav1.LabelSelector to filter 436 the target kubernetes resources that need to be backed up. 437 If not set, will do not back up any kubernetes resources. 438 properties: 439 matchExpressions: 440 description: matchExpressions is a list of label selector 441 requirements. The requirements are ANDed. 442 items: 443 description: A label selector requirement is a selector 444 that contains values, a key, and an operator that 445 relates the key and values. 446 properties: 447 key: 448 description: key is the label key that the selector 449 applies to. 450 type: string 451 operator: 452 description: operator represents a key's relationship 453 to a set of values. Valid operators are In, NotIn, 454 Exists and DoesNotExist. 455 type: string 456 values: 457 description: values is an array of string values. 458 If the operator is In or NotIn, the values array 459 must be non-empty. If the operator is Exists or 460 DoesNotExist, the values array must be empty. 461 This array is replaced during a strategic merge 462 patch. 463 items: 464 type: string 465 type: array 466 required: 467 - key 468 - operator 469 type: object 470 type: array 471 matchLabels: 472 additionalProperties: 473 type: string 474 description: matchLabels is a map of {key,value} pairs. 475 A single {key,value} in the matchLabels map is equivalent 476 to an element of matchExpressions, whose key field is 477 "key", the operator is "In", and the values array contains 478 only "value". The requirements are ANDed. 479 type: object 480 type: object 481 x-kubernetes-map-type: atomic 482 type: object 483 serviceAccountName: 484 description: serviceAccountName specifies the service account 485 to run the backup workload. 486 type: string 487 type: object 488 required: 489 - backupMethods 490 - target 491 type: object 492 status: 493 description: BackupPolicyStatus defines the observed state of BackupPolicy 494 properties: 495 message: 496 description: A human-readable message indicating details about why 497 the BackupPolicy is in this phase. 498 type: string 499 observedGeneration: 500 description: observedGeneration is the most recent generation observed 501 for this BackupPolicy. It refers to the BackupPolicy's generation, 502 which is updated on mutation by the API Server. 503 format: int64 504 type: integer 505 phase: 506 description: phase - in list of [Available,Unavailable] 507 enum: 508 - Available 509 - Unavailable 510 type: string 511 type: object 512 type: object 513 served: true 514 storage: true 515 subresources: 516 status: {}