Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@ kubeconfig*.yaml
bin/
# Added by goreleaser init:
dist/

# Go workspace files (developer-specific, not committed)
go.work
go.work.sum
76 changes: 52 additions & 24 deletions charts/rancher-backup-crd/templates/backup.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.21.0
name: backups.resources.cattle.io
spec:
group: resources.cattle.io
names:
kind: Backup
listKind: BackupList
plural: backups
singular: backup
scope: Cluster
Expand Down Expand Up @@ -33,25 +37,40 @@ spec:
schema:
openAPIV3Schema:
properties:
apiVersion:
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
spec:
properties:
encryptionConfigSecretName:
description: Name of the Secret containing the encryption config
nullable: true
type: string
resourceSetName:
description: Name of the ResourceSet CR to use for backup
nullable: true
type: string
retentionCount:
format: int64
minimum: 1
type: integer
schedule:
description: Cron schedule for recurring backups
example:
example: |-
Descriptors: '@midnight'
Standard crontab specs: 0 0 * * *
nullable: true
type: string
storageLocation:
nullable: true
Expand All @@ -60,38 +79,39 @@ spec:
nullable: true
properties:
bucketName:
nullable: true
type: string
clientConfig:
description: |-
ClientConfig allows configuration of more advanced minio client settings
any provider specific settings will be grouped accordingly, otherwise settings apply to all S3 providres.
nullable: true
properties:
aws:
nullable: true
properties:
dualStack:
default: true
type: boolean
type: object
type: object
credentialSecretName:
nullable: true
type: string
credentialSecretNamespace:
nullable: true
type: string
endpoint:
nullable: true
type: string
endpointCA:
nullable: true
type: string
folder:
nullable: true
type: string
insecureTLSSkipVerify:
type: boolean
region:
nullable: true
type: string
required:
- bucketName
- credentialSecretName
- endpoint
type: object
type: object
required:
Expand All @@ -100,50 +120,58 @@ spec:
status:
properties:
backupType:
nullable: true
description: BackupType enforces the valid registration modes
enum:
- One-time
- Recurring
type: string
conditions:
items:
properties:
lastTransitionTime:
nullable: true
description: Last time the condition transitioned from one status
to another.
type: string
lastUpdateTime:
nullable: true
description: The last time this condition was updated.
type: string
message:
nullable: true
description: Human-readable message indicating details about
last transition
type: string
reason:
nullable: true
description: The reason for the condition's last transition.
type: string
status:
nullable: true
description: Status of the condition, one of True, False, Unknown.
type: string
type:
nullable: true
description: Type of cluster condition.
type: string
required:
- status
- type
type: object
nullable: true
type: array
x-kubernetes-list-map-keys:
- type
x-kubernetes-list-type: map
filename:
nullable: true
type: string
lastSnapshotTs:
nullable: true
type: string
nextSnapshotAt:
nullable: true
type: string
observedGeneration:
format: int64
type: integer
storageLocation:
nullable: true
type: string
summary:
nullable: true
type: string
type: object
required:
- spec
type: object
served: true
storage: true
Expand Down
99 changes: 69 additions & 30 deletions charts/rancher-backup-crd/templates/resourceset.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.21.0
name: resourcesets.resources.cattle.io
spec:
group: resources.cattle.io
names:
kind: ResourceSet
listKind: ResourceSetList
plural: resourcesets
singular: resourceset
scope: Cluster
Expand All @@ -14,107 +18,142 @@ spec:
schema:
openAPIV3Schema:
properties:
apiVersion:
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
controllerReferences:
default: []
items:
properties:
apiVersion:
nullable: true
type: string
name:
nullable: true
type: string
namespace:
nullable: true
type: string
replicas:
format: int32
type: integer
resource:
nullable: true
type: string
required:
- apiVersion
- name
- namespace
- replicas
- resource
type: object
nullable: true
type: array
x-kubernetes-list-type: atomic
kind:
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
resourceSelectors:
default: []
items:
description: regex+list = OR //separate fields :AND
properties:
apiVersion:
nullable: true
type: string
excludeKinds:
items:
nullable: true
type: string
nullable: true
type: array
x-kubernetes-list-type: set
excludeResourceNameRegexp:
nullable: true
type: string
fieldSelectors:
additionalProperties:
nullable: true
type: string
nullable: true
description: Set is a map of field:value. It implements Fields.
type: object
kinds:
items:
nullable: true
type: string
nullable: true
type: array
x-kubernetes-list-type: set
kindsRegexp:
nullable: true
type: string
labelSelectors:
description: |-
A label selector is a label query over a set of resources. The result of matchLabels and
matchExpressions are ANDed. An empty label selector matches all objects. A null
label selector matches no objects.
nullable: true
properties:
matchExpressions:
description: matchExpressions is a list of label selector requirements.
The requirements are ANDed.
items:
description: |-
A label selector requirement is a selector that contains values, a key, and an operator that
relates the key and values.
properties:
key:
nullable: true
description: key is the label key that the selector applies
to.
type: string
operator:
nullable: true
description: |-
operator represents a key's relationship to a set of values.
Valid operators are In, NotIn, Exists and DoesNotExist.
type: string
values:
description: |-
values is an array of string values. If the operator is In or NotIn,
the values array must be non-empty. If the operator is Exists or DoesNotExist,
the values array must be empty. This array is replaced during a strategic
merge patch.
items:
nullable: true
type: string
nullable: true
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
nullable: true
type: array
x-kubernetes-list-type: atomic
matchLabels:
additionalProperties:
nullable: true
type: string
nullable: true
description: |-
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
map is equivalent to an element of matchExpressions, whose key field is "key", the
operator is "In", and the values array contains only "value". The requirements are ANDed.
type: object
type: object
x-kubernetes-map-type: atomic
namespaceRegexp:
nullable: true
type: string
namespaces:
items:
nullable: true
type: string
nullable: true
type: array
x-kubernetes-list-type: set
resourceNameRegexp:
nullable: true
type: string
resourceNames:
items:
nullable: true
type: string
nullable: true
type: array
x-kubernetes-list-type: set
required:
- apiVersion
type: object
nullable: true
required:
- apiVersion
type: array
x-kubernetes-list-type: atomic
required:
- resourceSelectors
type: object
Expand Down
Loading
Loading