From 9446f94967f6f85d27569da0bba5a12102a8f3a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=9F=E9=85=8C=20=E9=B5=AC=E5=85=84?= Date: Mon, 11 Sep 2023 00:21:39 +0800 Subject: [PATCH] Added more desc --- README.md | 2 ++ create-k8s-secrets.sh | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..cffafa5 --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +## Usage +Read the comments inside each script. Each file only contains ~100 lines of codes. Should be fairly easy to use and understand. diff --git a/create-k8s-secrets.sh b/create-k8s-secrets.sh index 561815d..ef4a2e0 100755 --- a/create-k8s-secrets.sh +++ b/create-k8s-secrets.sh @@ -10,6 +10,47 @@ # Create a secret config for arch_* in secret-name under the # specificed namespace # +# Sample CronJob spec +# apiVersion: batch/v1 +# kind: CronJob +# metadata: +# name: s3-upload +# spec: +# schedule: "0 0 * * *" +# jobTemplate: +# spec: +# template: +# spec: +# restartPolicy: OnFailure +# containers: +# - name: backup +# image: [IMAGE_WITH_OPENSSL_AND_BASH] +# env: +# - name: ARCH_S3_BUCKET_URL +# valueFrom: +# secretKeyRef: +# name: s3-arch-conf +# key: BUCKET_URL +# - name: ARCH_S3_AUTH +# valueFrom: +# secretKeyRef: +# name: s3-arch-conf +# key: AUTH +# command: +# - sh +# - -c +# - | +# cd /tmp; +# _DATE=$( date -u +"%Y%m%dT%H%M%SZ" ); +# bash /s3/arch_upload_aws4.sh blog $_DATE.tar.gz; +# rm -r dump/ $_DATE.tar.gz $_DATE.tar.gz.enc; +# volumeMounts: +# - mountPath: "/s3" +# name: s3-arch-utils +# volumes: +# - name: s3-arch-utils +# secret: +# secretName: [secret-name] # # function _print_files {