From 9722f743a638abfffe7630171e8e8839c99a498b Mon Sep 17 00:00:00 2001 From: Frederick Lahde Date: Fri, 19 Apr 2024 11:32:11 +0200 Subject: [PATCH] project: Alter docs for new cronjob mode --- project-template/README.md | 45 +++++++++++++------------------------- 1 file changed, 15 insertions(+), 30 deletions(-) diff --git a/project-template/README.md b/project-template/README.md index f8cf593..9aa8f47 100644 --- a/project-template/README.md +++ b/project-template/README.md @@ -286,36 +286,6 @@ and add the buildtype's for the stages, where the crawling should be disabled. > **OPTIONAL** - Default: Crawling on each stage -#### mysqlBackup - -If set a [k8s CronJob](https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/) will be created. -It will backup each database and sends the backup to the `sshStorageUrl`. - -The [mysql-scp-backup](https://github.com/worldiety/mysql-scp-backup) Docker Container will be used in this cronjob. -This container supports multiple MySQL versions, e.g. 5.7 and 8+ (update-to-date). -Choose your `containerImageTag` variable according to the information in the [mysql-scp-backup](https://github.com/worldiety/mysql-scp-backup) README. -You use [this script](https://github.com/worldiety/mysql-scp-backup/blob/main/create-keys.sh) to create a new ssh keypair and persist it on your storage provider. - - mysqlBackup: - # cron string: https://crontab.guru/#30_4_*_*_* - schedule: "30 4 * * *" - # for mysql 5.7 this might be changed according to: https://github.com/worldiety/mysql-scp-backup - containerImageTag: "0.0.5" - # db host will be created automatically, e.g. SERVICE.NAMESPACE.svc.cluster.local - dbPort: 3306 - dbUser: backup-username - dbPassword: "${DB_PASSWORD}" - dbNames: database1,database2 - backupsToKeep: 2 - sshStorageUrl: USER@USER.your-storagebox.de - sshBase64PrivateKey: "${SSH_BASE64_PRIVATE_KEY}" - sshBase64PPublicKey: "${SSH_BASE64_PUBLIC_KEY}" - skipBackupOnBuildTypes: - - dev - - stage - -> **OPTIONAL** - Default: No CronJob (e.g. backup) will be created. - #### priorityClasses In situations when the cluster or this namespace runs out of CPU/RAM ressources, @@ -329,3 +299,18 @@ setting the `priorityClasses` in your `deployment-values.yaml` file. prod: wdy-production > **OPTIONAL** - Default: The mappings from above will be applied. + +#### cronjob + +Normally, this chart deploys your application with a deployment. Thus it will run forever. +If you instead want to deploy a short, repeating and planned task, this option is for you. + +For deploying a cronjob you need to provide a cron schedule: + +```yaml +cronjob: + schedule: "0 4 * * *" +```` + +This config will deploy a CronJob API object instead of a deployment. In addition, no service, ingress and pod disruption budget will be deployed. +TOOD: Document more flags