From 376a00516b7d5593d7bc0708d9ffb7f9eb7939b3 Mon Sep 17 00:00:00 2001 From: Sjors Gielen Date: Mon, 29 Jul 2024 23:16:42 +0200 Subject: [PATCH] Bump chart with regard to recent changes. --- chart/bump.sh | 8 +++- .../crd/backsnap.skyb.it_pvcbackups.yaml | 32 ++++++++----- .../crd/backsnap.skyb.it_pvcrestores.yaml | 45 +++++++++++-------- chart/templates/manager.yaml | 4 +- .../templates/rbac/leader_election_role.yaml | 2 +- .../rbac/leader_election_role_binding.yaml | 2 +- chart/templates/rbac/role_binding.yaml | 2 +- chart/templates/service_account.yaml | 2 +- 8 files changed, 58 insertions(+), 39 deletions(-) diff --git a/chart/bump.sh b/chart/bump.sh index 02b058d..585e8a7 100755 --- a/chart/bump.sh +++ b/chart/bump.sh @@ -24,8 +24,12 @@ cp ../config/rbac/leader_election_role* templates/rbac cp ../config/rbac/role* templates/rbac cp ../config/rbac/service_account.yaml templates -# Replace the namespaces -find templates -type f -exec gsed -i 's/namespace: backsnap/namespace: {{ .Release.Namespace }}/' {} \; +# Replace the namespaces and managed-by +find templates -type f -exec gsed -i \ + -e 's/namespace: backsnap/namespace: {{ .Release.Namespace }}/' \ + -e 's/managed-by: kustomize/managed-by: Helm/' \ + \ + {} \; # Figure out the versioning CURRENT_VERSION="$(cat Chart.yaml | grep APP_VERSION: | awk '{print $3}')" diff --git a/chart/templates/crd/backsnap.skyb.it_pvcbackups.yaml b/chart/templates/crd/backsnap.skyb.it_pvcbackups.yaml index 3c8cf12..d2c0741 100644 --- a/chart/templates/crd/backsnap.skyb.it_pvcbackups.yaml +++ b/chart/templates/crd/backsnap.skyb.it_pvcbackups.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.13.0 + controller-gen.kubebuilder.io/version: v0.15.0 name: pvcbackups.backsnap.skyb.it spec: group: backsnap.skyb.it @@ -20,14 +20,19 @@ spec: description: PVCBackup is the Schema for the pvcbackups API properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + 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' + 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 @@ -37,11 +42,11 @@ spec: description: Name of the PVC to back up. Must be in the same namespace. type: string ttl: - description: How long will the backup object be retained after the - backup completes. If not set, the object will be retained for at - least one day. The controller will also always keep the last PVCBackup - for a particular PVC around, so that it knows when the last backup - was completed. + description: |- + How long will the backup object be retained after the backup completes. + If not set, the object will be retained for at least one day. The + controller will also always keep the last PVCBackup for a particular PVC + around, so that it knows when the last backup was completed. type: string required: - pvc @@ -56,6 +61,9 @@ spec: - Succeeded - Failed type: string + startedAt: + format: date-time + type: string type: object type: object served: true diff --git a/chart/templates/crd/backsnap.skyb.it_pvcrestores.yaml b/chart/templates/crd/backsnap.skyb.it_pvcrestores.yaml index 2188cc5..7143a03 100644 --- a/chart/templates/crd/backsnap.skyb.it_pvcrestores.yaml +++ b/chart/templates/crd/backsnap.skyb.it_pvcrestores.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.13.0 + controller-gen.kubebuilder.io/version: v0.15.0 name: pvcrestores.backsnap.skyb.it spec: group: backsnap.skyb.it @@ -20,14 +20,19 @@ spec: description: PVCRestore is the Schema for the pvcrestores API properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + 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' + 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 @@ -35,31 +40,33 @@ spec: description: PVCRestoreSpec defines the desired state of PVCRestore properties: sourceNamespace: - description: The namespace that the source PVC used to exist in. If - empty, assume that the source namespace is the same as the namespace - where this PVCRestore object exists. + description: |- + The namespace that the source PVC used to exist in. If empty, assume that + the source namespace is the same as the namespace where this PVCRestore + object exists. type: string sourcePvc: - description: The name of the source PVC that will be restored. The - source PVC does not need to exist anymore, this is just for finding - its data. + description: |- + The name of the source PVC that will be restored. The source PVC does not + need to exist anymore, this is just for finding its data. type: string sourceSnapshot: description: The snapshot to restore, or empty to restore the latest snapshot. type: string targetPvc: - description: The name of the new PVC where the source contents will - be restored into. The PVC must not exist, and will be created. If - empty, assume that the target PVC is the same name as the source - PVC. + description: |- + The name of the new PVC where the source contents will be restored into. + The PVC must not exist, and will be created. If empty, assume that the + target PVC is the same name as the source PVC. type: string targetPvcSize: anyOf: - type: integer - type: string - description: The size of the target PVC. Must be large enough to contain - the backup's contents. + description: |- + The size of the target PVC. Must be large enough to contain the backup's + contents. 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 diff --git a/chart/templates/manager.yaml b/chart/templates/manager.yaml index aeaa030..173a7bb 100644 --- a/chart/templates/manager.yaml +++ b/chart/templates/manager.yaml @@ -17,7 +17,7 @@ metadata: app.kubernetes.io/component: manager app.kubernetes.io/created-by: backsnap app.kubernetes.io/part-of: backsnap - app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/managed-by: Helm spec: selector: matchLabels: @@ -157,4 +157,4 @@ spec: {{- toYaml .Values.resources | nindent 10 }} serviceAccountName: controller-manager - terminationGracePeriodSeconds: 10 \ No newline at end of file + terminationGracePeriodSeconds: 10 diff --git a/chart/templates/rbac/leader_election_role.yaml b/chart/templates/rbac/leader_election_role.yaml index 809f7c6..838d158 100644 --- a/chart/templates/rbac/leader_election_role.yaml +++ b/chart/templates/rbac/leader_election_role.yaml @@ -8,7 +8,7 @@ metadata: app.kubernetes.io/component: rbac app.kubernetes.io/created-by: backsnap app.kubernetes.io/part-of: backsnap - app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/managed-by: Helm name: leader-election-role namespace: {{ .Release.Namespace }} rules: diff --git a/chart/templates/rbac/leader_election_role_binding.yaml b/chart/templates/rbac/leader_election_role_binding.yaml index dcc1b41..7ff3db3 100644 --- a/chart/templates/rbac/leader_election_role_binding.yaml +++ b/chart/templates/rbac/leader_election_role_binding.yaml @@ -7,7 +7,7 @@ metadata: app.kubernetes.io/component: rbac app.kubernetes.io/created-by: backsnap app.kubernetes.io/part-of: backsnap - app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/managed-by: Helm name: leader-election-rolebinding namespace: {{ .Release.Namespace }} roleRef: diff --git a/chart/templates/rbac/role_binding.yaml b/chart/templates/rbac/role_binding.yaml index 5ad6922..8a47b46 100644 --- a/chart/templates/rbac/role_binding.yaml +++ b/chart/templates/rbac/role_binding.yaml @@ -7,7 +7,7 @@ metadata: app.kubernetes.io/component: rbac app.kubernetes.io/created-by: backsnap app.kubernetes.io/part-of: backsnap - app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/managed-by: Helm name: manager-rolebinding namespace: {{ .Release.Namespace }} roleRef: diff --git a/chart/templates/service_account.yaml b/chart/templates/service_account.yaml index f5126b2..9a9e4b7 100644 --- a/chart/templates/service_account.yaml +++ b/chart/templates/service_account.yaml @@ -7,6 +7,6 @@ metadata: app.kubernetes.io/component: rbac app.kubernetes.io/created-by: backsnap app.kubernetes.io/part-of: backsnap - app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/managed-by: Helm name: controller-manager namespace: {{ .Release.Namespace }}