Skip to content

Commit

Permalink
Changes 'k8up.syn.tools/' to 'k8up.io/' for k8s annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
cimnine committed Sep 17, 2021
1 parent 106657f commit 9173a65
Show file tree
Hide file tree
Showing 40 changed files with 101 additions and 81 deletions.
4 changes: 3 additions & 1 deletion api/v1alpha1/common_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ const (
ReasonWaiting ConditionReason = "Waiting"

// LabelK8upType is the label key that identifies the job type
LabelK8upType = "k8up.syn.tools/type"
LabelK8upType = "k8up.io/type"
// Deprecated: LegacyLabelK8upType is the former label key that identified the job type
LegacyLabelK8upType = "k8up.syn.tools/type"
// LabelManagedBy identifies the tool being used to manage the operation of a resource
LabelManagedBy = "app.kubernetes.io/managed-by"
)
Expand Down
4 changes: 3 additions & 1 deletion api/v1alpha1/schedule_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ type ScheduleList struct {

const (
// ScheduleFinalizerName is a Finalizer added to resources that need cleanup cron schedules before deleting them.
ScheduleFinalizerName = "k8up.syn.tools/schedule"
ScheduleFinalizerName = "k8up.io/schedule"
// Deprecated: LegacyScheduleFinalizerName is a Finalizer added to resources that need cleanup cron schedules before deleting them.
LegacyScheduleFinalizerName = "k8up.syn.tools/schedule"
)

func init() {
Expand Down
6 changes: 3 additions & 3 deletions cmd/operator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ var (
Description: "Start k8up in operator mode",
Action: operatorMain,
Flags: []cli.Flag{
&cli.StringFlag{Destination: &cfg.Config.BackupAnnotation, Name: "annotation", EnvVars: []string{"BACKUP_ANNOTATION"}, Value: "k8up.syn.tools/backup", Usage: "the annotation to be used for filtering"},
&cli.StringFlag{Destination: &cfg.Config.BackupCommandAnnotation, Name: "backupcommandannotation", EnvVars: []string{"BACKUP_BACKUPCOMMANDANNOTATION"}, Value: "k8up.syn.tools/backupcommand", Usage: "set the annotation name that identify the backup commands on Pods"},
&cli.StringFlag{Destination: &cfg.Config.FileExtensionAnnotation, Name: "fileextensionannotation", EnvVars: []string{"BACKUP_FILEEXTENSIONANNOTATION"}, Value: "k8up.syn.tools/file-extension", Usage: "set the annotation name where the file extension is stored for backup commands"},
&cli.StringFlag{Destination: &cfg.Config.BackupAnnotation, Name: "annotation", EnvVars: []string{"BACKUP_ANNOTATION"}, Value: "k8up.io/backup", Usage: "the annotation to be used for filtering"},
&cli.StringFlag{Destination: &cfg.Config.BackupCommandAnnotation, Name: "backupcommandannotation", EnvVars: []string{"BACKUP_BACKUPCOMMANDANNOTATION"}, Value: "k8up.io/backupcommand", Usage: "set the annotation name that identify the backup commands on Pods"},
&cli.StringFlag{Destination: &cfg.Config.FileExtensionAnnotation, Name: "fileextensionannotation", EnvVars: []string{"BACKUP_FILEEXTENSIONANNOTATION"}, Value: "k8up.io/file-extension", Usage: "set the annotation name where the file extension is stored for backup commands"},

&cli.IntFlag{Destination: &cfg.Config.GlobalKeepJobs, Hidden: true, Name: "globalkeepjobs", EnvVars: []string{"BACKUP_GLOBALKEEPJOBS"}, Value: -1, DefaultText: "unlimited", Usage: "set the number of old jobs to keep when cleaning up, applies to all job types"},
&cli.IntFlag{Destination: &cfg.Config.GlobalFailedJobsHistoryLimit, Name: "global-failed-jobs-history-limit", EnvVars: []string{"BACKUP_GLOBAL_FAILED_JOBS_HISTORY_LIMIT"}, Value: 3, Usage: "set the number of old, failed jobs to keep when cleaning up, applies to all job types"},
Expand Down
2 changes: 1 addition & 1 deletion config/crd/patches/cainjection_in_archives.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ kind: CustomResourceDefinition
metadata:
annotations:
cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
name: archives.k8up.syn.tools
name: archives.k8up.io
2 changes: 1 addition & 1 deletion config/crd/patches/cainjection_in_backups.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ kind: CustomResourceDefinition
metadata:
annotations:
cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
name: backups.k8up.syn.tools
name: backups.k8up.io
2 changes: 1 addition & 1 deletion config/crd/patches/cainjection_in_checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ kind: CustomResourceDefinition
metadata:
annotations:
cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
name: checks.k8up.syn.tools
name: checks.k8up.io
2 changes: 1 addition & 1 deletion config/crd/patches/cainjection_in_prebackuppods.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ kind: CustomResourceDefinition
metadata:
annotations:
cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
name: prebackuppods.k8up.syn.tools
name: prebackuppods.k8up.io
2 changes: 1 addition & 1 deletion config/crd/patches/cainjection_in_prunes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ kind: CustomResourceDefinition
metadata:
annotations:
cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
name: prunes.k8up.syn.tools
name: prunes.k8up.io
2 changes: 1 addition & 1 deletion config/crd/patches/cainjection_in_restores.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ kind: CustomResourceDefinition
metadata:
annotations:
cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
name: restores.k8up.syn.tools
name: restores.k8up.io
2 changes: 1 addition & 1 deletion config/crd/patches/cainjection_in_schedules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ kind: CustomResourceDefinition
metadata:
annotations:
cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
name: schedules.k8up.syn.tools
name: schedules.k8up.io
2 changes: 1 addition & 1 deletion config/crd/patches/cainjection_in_snapshots.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ kind: CustomResourceDefinition
metadata:
annotations:
cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
name: snapshots.k8up.syn.tools
name: snapshots.k8up.io
2 changes: 1 addition & 1 deletion config/crd/patches/webhook_in_archives.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: archives.k8up.syn.tools
name: archives.k8up.io
spec:
conversion:
strategy: Webhook
Expand Down
2 changes: 1 addition & 1 deletion config/crd/patches/webhook_in_backups.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: backups.k8up.syn.tools
name: backups.k8up.io
spec:
conversion:
strategy: Webhook
Expand Down
2 changes: 1 addition & 1 deletion config/crd/patches/webhook_in_checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: checks.k8up.syn.tools
name: checks.k8up.io
spec:
conversion:
strategy: Webhook
Expand Down
2 changes: 1 addition & 1 deletion config/crd/patches/webhook_in_prebackuppods.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: prebackuppods.k8up.syn.tools
name: prebackuppods.k8up.io
spec:
conversion:
strategy: Webhook
Expand Down
2 changes: 1 addition & 1 deletion config/crd/patches/webhook_in_prunes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: prunes.k8up.syn.tools
name: prunes.k8up.io
spec:
conversion:
strategy: Webhook
Expand Down
2 changes: 1 addition & 1 deletion config/crd/patches/webhook_in_restores.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: restores.k8up.syn.tools
name: restores.k8up.io
spec:
conversion:
strategy: Webhook
Expand Down
2 changes: 1 addition & 1 deletion config/crd/patches/webhook_in_schedules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: schedules.k8up.syn.tools
name: schedules.k8up.io
spec:
conversion:
strategy: Webhook
Expand Down
2 changes: 1 addition & 1 deletion config/crd/patches/webhook_in_snapshots.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: snapshots.k8up.syn.tools
name: snapshots.k8up.io
spec:
conversion:
strategy: Webhook
Expand Down
2 changes: 1 addition & 1 deletion config/samples/deployments/galera.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spec:
app: mysql
annotations:
pod.alpha.kubernetes.io/initialized: "true"
k8up.syn.tools/backupcommand: mysqldump -uroot -psecure --all-databases
k8up.io/backupcommand: mysqldump -uroot -psecure --all-databases
spec:
securityContext:
runAsUser: 27
Expand Down
2 changes: 1 addition & 1 deletion config/samples/deployments/mariadb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ spec:
labels:
app: mariadb
annotations:
k8up.syn.tools/backupcommand: mysqldump -uroot -psecure --all-databases
k8up.io/backupcommand: mysqldump -uroot -psecure --all-databases
spec:
containers:
- env:
Expand Down
2 changes: 1 addition & 1 deletion config/samples/deployments/mongodb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
k8up.syn.tools/backupcommand: mongodump --archive -uroot -pexample
k8up.io/backupcommand: mongodump --archive -uroot -pexample
labels:
app: mongodb
name: mongodb
Expand Down
2 changes: 1 addition & 1 deletion config/samples/deployments/pvc-example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: v1
metadata:
name: myclaim
annotations:
k8up.syn.tools/backup: 'true'
k8up.io/backup: 'true'
namespace: myproject
spec:
accessModes:
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/assets/attachments/slides_embedded.html
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@
<span class="tok-l tok-l-Scalar tok-l-Scalar-Plain">labels</span><span class="tok-p tok-p-Indicator">:</span>
<span class="tok-l tok-l-Scalar tok-l-Scalar-Plain">app</span><span class="tok-p tok-p-Indicator">:</span> <span class="tok-l tok-l-Scalar tok-l-Scalar-Plain">mariadb</span>
<span class="tok-l tok-l-Scalar tok-l-Scalar-Plain">annotations</span><span class="tok-p tok-p-Indicator">:</span>
<span class="tok-l tok-l-Scalar tok-l-Scalar-Plain">k8up.syn.tools/backupcommand</span><span class="tok-p tok-p-Indicator">:</span> <span class="tok-l tok-l-Scalar tok-l-Scalar-Plain">mysqldump -uroot -psecure --all-databases</span>
<span class="tok-l tok-l-Scalar tok-l-Scalar-Plain">k8up.io/backupcommand</span><span class="tok-p tok-p-Indicator">:</span> <span class="tok-l tok-l-Scalar tok-l-Scalar-Plain">mysqldump -uroot -psecure --all-databases</span>
<span class="tok-l tok-l-Scalar tok-l-Scalar-Plain">&lt;SNIP&gt;</span>
<span class="tok-nn">---</span></code></pre>
<aside class="notes"><div class="paragraph"><p>With this annotation the operator will trigger that command inside the the container and capture the stdout to a backup.</p></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
app: wordpress
tier: mariadb
annotations:
k8up.syn.tools/backupcommand: /bin/bash -c 'mysqldump -uroot -p"${MARIADB_ROOT_PASSWORD}" --all-databases'
k8up.io/backupcommand: /bin/bash -c 'mysqldump -uroot -p"${MARIADB_ROOT_PASSWORD}" --all-databases'
spec:
containers:
- image: mariadb:10.4
Expand Down
4 changes: 2 additions & 2 deletions docs/modules/ROOT/examples/tutorial/wordpress/pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
labels:
app: wordpress
annotations:
k8up.syn.tools/backup: "true"
k8up.io/backup: "true"
spec:
accessModes:
- ReadWriteOnce
Expand All @@ -21,7 +21,7 @@ metadata:
labels:
app: wordpress
annotations:
k8up.syn.tools/backup: "true"
k8up.io/backup: "true"
spec:
accessModes:
- ReadWriteOnce
Expand Down
6 changes: 3 additions & 3 deletions docs/modules/ROOT/examples/usage/operator.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ DESCRIPTION:
Start k8up in operator mode

OPTIONS:
--annotation value the annotation to be used for filtering (default: "k8up.syn.tools/backup") [$BACKUP_ANNOTATION]
--backupcommandannotation value set the annotation name that identify the backup commands on Pods (default: "k8up.syn.tools/backupcommand") [$BACKUP_BACKUPCOMMANDANNOTATION]
--fileextensionannotation value set the annotation name where the file extension is stored for backup commands (default: "k8up.syn.tools/file-extension") [$BACKUP_FILEEXTENSIONANNOTATION]
--annotation value the annotation to be used for filtering (default: "k8up.io/backup") [$BACKUP_ANNOTATION]
--backupcommandannotation value set the annotation name that identify the backup commands on Pods (default: "k8up.io/backupcommand") [$BACKUP_BACKUPCOMMANDANNOTATION]
--fileextensionannotation value set the annotation name where the file extension is stored for backup commands (default: "k8up.io/file-extension") [$BACKUP_FILEEXTENSIONANNOTATION]
--global-failed-jobs-history-limit value set the number of old, failed jobs to keep when cleaning up, applies to all job types (default: 3) [$BACKUP_GLOBAL_FAILED_JOBS_HISTORY_LIMIT]
--global-successful-jobs-history-limit value set the number of old, successful jobs to keep when cleaning up, applies to all job types (default: 3) [$BACKUP_GLOBAL_SUCCESSFUL_JOBS_HISTORY_LIMIT]
--global-concurrent-archive-jobs-limit value set the limit of concurrent archive jobs (default: unlimited) [$BACKUP_GLOBAL_CONCURRENT_ARCHIVE_JOBS_LIMIT]
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/explanations/architecture.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ It uses the same Docker image as the `k8up operator`.
While `k8up operator` is usually running for a long time, `k8up restic` will do the job it is tasked to do and then exit.
It also does not modify any resources in the Kubernetes cluster or leave permanent traces.
But it will look for `Pod` resources xref:references/annotations.adoc[that are annotated].
And it will also create one-off containers in the `Pod` resources it finds that are annotated with `k8up.syn.tools/backupcommand` in order to run the respective backup command and collect it's output.
And it will also create one-off containers in the `Pod` resources it finds that are annotated with `k8up.io/backupcommand` in order to run the respective backup command and collect it's output.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ template:
labels:
app: mariadb
annotations:
k8up.syn.tools/backupcommand: mysqldump -uroot -psecure --all-databases
k8up.io/backupcommand: mysqldump -uroot -psecure --all-databases
<SNIP>
----

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/how-tos/check-status.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ I1332 25:61:61.000009 1 utils.go:51] wrestic/unlock/restic "level"=0 "msg"
I1332 25:61:61.000010 1 wait.go:37] wrestic/WaitForLocks "level"=0 "msg"="checking for any exclusive locks"
I1332 25:61:61.000011 1 wait.go:43] wrestic/WaitForLocks "level"=0 "msg"="getting a list of active locks"
I1332 25:61:61.000012 1 wait.go:62] wrestic/WaitForLocks "level"=0 "msg"="no more exclusive locks found"
I1332 25:61:61.000013 1 pod_list.go:50] wrestic/k8sClient "level"=0 "msg"="listing all pods" "annotation"="k8up.syn.tools/backupcommand" "namespace"="default"
I1332 25:61:61.000013 1 pod_list.go:50] wrestic/k8sClient "level"=0 "msg"="listing all pods" "annotation"="k8up.io/backupcommand" "namespace"="default"
I1332 25:61:61.000014 1 main.go:174] wrestic "level"=0 "msg"="all pod commands have finished successfully"
I1332 25:61:61.000015 1 backup.go:64] wrestic/backup "level"=0 "msg"="starting backup"
I1332 25:61:61.000016 1 backup.go:67] wrestic/backup "level"=0 "msg"="backupdir does not exist, skipping" "dirname"="/data"
Expand Down
4 changes: 2 additions & 2 deletions docs/modules/ROOT/pages/how-tos/prebackuppod.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ You can also add it to any pods that are running in the namespace:
[source,title="via kubectl"]
--
kubectl -n ${YOUR_NAMESPACE} annotate pods ${YOUR_POD_NAME} "k8up.syn.tools/backupcommand=/bin/bash -c 'mysqldump -uroot -p\"\${MARIADB_ROOT_PASSWORD}\" --all-databases'" --overwrite
kubectl -n ${YOUR_NAMESPACE} annotate pods ${YOUR_POD_NAME} "k8up.io/backupcommand=/bin/bash -c 'mysqldump -uroot -p\"\${MARIADB_ROOT_PASSWORD}\" --all-databases'" --overwrite
--
[source,title="in the manifest"]
Expand All @@ -67,7 +67,7 @@ spec:
labels:
app: mariadb
annotations:
k8up.syn.tools/backupcommand: /bin/bash -c 'mysqldump -uroot -p "${MARIADB_ROOT_PASSWORD}" --all-databases'
k8up.io/backupcommand: /bin/bash -c 'mysqldump -uroot -p "${MARIADB_ROOT_PASSWORD}" --all-databases'
--
====

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/how-tos/restore.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ metadata:
#namespace: snapshot-test
annotations:
# set to "true" to include in future backups
k8up.syn.tools/backup: "false"
k8up.io/backup: "false"
# Optional:
#labels:
# app: multi-file-writer
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/how-tos/schedules.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ The file above will instruct the Operator to do backups every 5 minute, prune th

Feel free to adjust the frequencies to your liking. To help you with the crontab syntax, we recommend to check out https://crontab.guru[crontab.guru].

TIP: You can always check the state and configuration of your backup by using `kubectl describe schedule`. By default, all PVCs are backed up automatically. Adding the annotation `k8up.syn.tools/backup=false` to a PVC object will excluded it from all following backup.
TIP: You can always check the state and configuration of your backup by using `kubectl describe schedule`. By default, all PVCs are backed up automatically. Adding the annotation `k8up.io/backup=false` to a PVC object will excluded it from all following backup.
6 changes: 3 additions & 3 deletions docs/modules/ROOT/pages/references/annotations.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ See xref:references/operator-config-reference.adoc[Operator Configuration refere
|===
|Annotation |Description |Accepted Values |Applicable Resources |xref:references/operator-config-reference.adoc[Configuration Option]

|`k8up.syn.tools/backup`
|`k8up.io/backup`
|If defined, this influences whether this pod shall be backed up (`true`) or not (`false`)
|Either `'true'` or `'false'`
|`Pod`, `PersistentVolumeClaim`
|`BACKUP_ANNOTATION`

|`k8up.syn.tools/backupcommand`
|`k8up.io/backupcommand`
|If defined, this command is invoked in the context of this `Pod` on the beginning of a backup.
|A string that represents a command (and its arguments) to execute, e.g. `mysqldump -uroot -psecure --all-databases`.
See xref:how-tos/application-aware-backups.adoc[Application Aware Backups] for more information and an example.
|`Pod`
|`BACKUP_BACKUPCOMMANDANNOTATION`

|`k8up.syn.tools/file-extension`
|`k8up.io/file-extension`
|The output of the `k8up.syn.tool/backupcommand` annotation is written to a file in order for it to be backed up.
This annotation defines the file extension of that string.
|A string which is valid file-extension on the source system, e.g. `.sql`.
Expand Down
4 changes: 2 additions & 2 deletions docs/modules/ROOT/pages/tutorials/tutorial.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ irrecoverably lost.
Removing locks...
created new cache in /root/.cache/restic
successfully removed locks
Listing all pods with annotation k8up.syn.tools/backupcommand in namespace default
Listing all pods with annotation k8up.io/backupcommand in namespace default
Listing snapshots
snapshots command:
0 Snapshots
Expand Down Expand Up @@ -305,7 +305,7 @@ spec:
template:
metadata:
annotations:
k8up.syn.tools/backupcommand: appuio.ch/backupcommand: /bin/bash -c 'mysqldump -uroot -p"${MARIADB_ROOT_PASSWORD}" --all-databases'
k8up.io/backupcommand: appuio.ch/backupcommand: /bin/bash -c 'mysqldump -uroot -p"${MARIADB_ROOT_PASSWORD}" --all-databases'
....

Thus the restoration procedure is different.
Expand Down
4 changes: 2 additions & 2 deletions e2e/definitions/annotated-subject/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ spec:
labels:
app: subject
annotations:
k8up.syn.tools/backupcommand: '/tmp/test.sh'
k8up.syn.tools/file-extension: '.txt'
k8up.io/backupcommand: '/tmp/test.sh'
k8up.io/file-extension: '.txt'
spec:
containers:
- name: subject-container
Expand Down
6 changes: 3 additions & 3 deletions envtest/envsuite.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,9 @@ func (ts *Suite) IsResourceExisting(ctx context.Context, obj client.Object) bool
func defaultConfiguration() *cfg.Configuration {
return &cfg.Configuration{
MountPath: "/data",
BackupAnnotation: "k8up.syn.tools/backup",
BackupCommandAnnotation: "k8up.syn.tools/backupcommand",
FileExtensionAnnotation: "k8up.syn.tools/file-extension",
BackupAnnotation: "k8up.io/backup",
BackupCommandAnnotation: "k8up.io/backupcommand",
FileExtensionAnnotation: "k8up.io/file-extension",
ServiceAccount: "pod-executor",
BackupCheckSchedule: "0 0 * * 0",
GlobalFailedJobsHistoryLimit: 3,
Expand Down
6 changes: 3 additions & 3 deletions operator/executor/prebackup_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ func (b *BackupExecutor) generateDeployments(templates []k8upv1alpha1.PreBackupP
}

podLabels := map[string]string{
"k8up.syn.tools/backupCommandPod": "true",
"k8up.syn.tools/preBackupPod": template.Name,
"k8up.io/backupCommandPod": "true",
"k8up.io/preBackupPod": template.Name,
}

template.Spec.Pod.PodTemplateSpec.ObjectMeta.Labels = podLabels
Expand All @@ -51,7 +51,7 @@ func (b *BackupExecutor) generateDeployments(templates []k8upv1alpha1.PreBackupP
Name: template.GetName(),
Namespace: b.Obj.GetMetaObject().GetNamespace(),
Labels: labels.Set{
"k8up.syn.tools/preBackupPod": template.Name,
"k8up.io/preBackupPod": template.Name,
},
},
Spec: appsv1.DeploymentSpec{
Expand Down
Loading

0 comments on commit 9173a65

Please sign in to comment.