Skip to content

Commit

Permalink
Bump chart with regard to recent changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
sgielen committed Jul 29, 2024
1 parent feaaca5 commit 376a005
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 39 deletions.
8 changes: 6 additions & 2 deletions chart/bump.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}')"
Expand Down
32 changes: 20 additions & 12 deletions chart/templates/crd/backsnap.skyb.it_pvcbackups.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -56,6 +61,9 @@ spec:
- Succeeded
- Failed
type: string
startedAt:
format: date-time
type: string
type: object
type: object
served: true
Expand Down
45 changes: 26 additions & 19 deletions chart/templates/crd/backsnap.skyb.it_pvcrestores.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -20,46 +20,53 @@ 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
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
Expand Down
4 changes: 2 additions & 2 deletions chart/templates/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -157,4 +157,4 @@ spec:
{{- toYaml .Values.resources | nindent 10 }}

serviceAccountName: controller-manager
terminationGracePeriodSeconds: 10
terminationGracePeriodSeconds: 10
2 changes: 1 addition & 1 deletion chart/templates/rbac/leader_election_role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion chart/templates/rbac/leader_election_role_binding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion chart/templates/rbac/role_binding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion chart/templates/service_account.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

0 comments on commit 376a005

Please sign in to comment.