diff --git a/website/content/en/docs/Getting Started/latest/configuring-backup-and-restore.md b/website/content/en/docs/Getting Started/latest/configuring-backup-and-restore.md index 4b8dbf48..3fb5f41e 100644 --- a/website/content/en/docs/Getting Started/latest/configuring-backup-and-restore.md +++ b/website/content/en/docs/Getting Started/latest/configuring-backup-and-restore.md @@ -43,45 +43,58 @@ $ kubectl -n create -f pvc.yaml apiVersion: jenkins.io/v1alpha2 kind: Jenkins metadata: - name: - namespace: + name: jenkins-cr spec: + jenkinsAPISettings: + authorizationStrategy: createUser master: securityContext: runAsUser: 1000 fsGroup: 1000 + disableCSRFProtection: false containers: - - name: jenkins-master - image: jenkins/jenkins:2.277.4-lts-alpine - - name: backup # container responsible for the backup and restore - env: - - name: BACKUP_DIR - value: /backup - - name: JENKINS_HOME - value: /jenkins-home - - name: BACKUP_COUNT - value: "3" # keep only the 2 most recent backups - image: virtuslab/jenkins-operator-backup-pvc:v0.1.0 # look at backup/pvc directory - imagePullPolicy: IfNotPresent - volumeMounts: - - mountPath: /jenkins-home # Jenkins home volume - name: jenkins-home - - mountPath: /backup # backup volume - name: backup + - name: jenkins-master + image: jenkins/jenkins:2.277.4-lts-alpine + imagePullPolicy: IfNotPresent + resources: + limits: + cpu: 1500m + memory: 3Gi + requests: + cpu: "1" + memory: 500Mi + - name: backup # container responsible for the backup and restore + env: + - name: BACKUP_DIR + value: /backup + - name: JENKINS_HOME + value: /jenkins-home + - name: BACKUP_COUNT + value: "3" # keep only the 2 most recent backups + image: virtuslab/jenkins-operator-backup-pvc:v0.1.0 # look at backup/pvc directory + imagePullPolicy: IfNotPresent + volumeMounts: + - mountPath: /jenkins-home # Jenkins home volume + name: jenkins-home + - mountPath: /backup # backup volume + name: backup + resources: + limits: + cpu: 1000m + memory: 3Gi + requests: + cpu: "1" + memory: 500Mi volumes: - - name: backup # PVC volume where backups will be stored - persistentVolumeClaim: - claimName: + - name: backup # PVC volume where backups will be stored + persistentVolumeClaim: + claimName: backup: containerName: backup # container name is responsible for backup action: exec: command: - - /home/user/bin/backup.sh # this command is invoked on "backup" container to make backup, for example /home/user/bin/backup.sh , is passed by operator - getLatestAction: - exec: - command: - - /home/user/bin/get-latest.sh # this command is invoked on "backup" container to get last backup number before pod deletion; not having it in the CR may cause loss of data + - /home/user/bin/backup.sh # this command is invoked on "backup" container to make backup, for example /home/user/bin/backup.sh , is passed by operator interval: 30 # how often make backup in seconds makeBackupBeforePodDeletion: true # make a backup before pod deletion restore: @@ -89,6 +102,10 @@ spec: action: exec: command: - - /home/user/bin/restore.sh # this command is invoked on "backup" container to make restore backup, for example /home/user/bin/restore.sh , is passed by operator + - /home/user/bin/restore.sh # this command is invoked on "backup" container to make restore backup, for example /home/user/bin/restore.sh , is passed by operator #recoveryOnce: # if want to restore specific backup configure this field and then Jenkins will be restarted and desired backup will be restored + getLatestAction: + exec: + command: + - /home/user/bin/get-latest.sh # this command is invoked on "backup" container to get last backup number before pod deletion; not having it in the CR may cause loss of data ```