commit 9446f94967f6f85d27569da0bba5a12102a8f3a4
| author | 斟酌 鵬兄 <tgckpg@gmail.com> |
| date | 2023-09-10T16:21:39Z |
| subject | Added more desc |
commit 9446f94967f6f85d27569da0bba5a12102a8f3a4
Author: 斟酌 鵬兄 <tgckpg@gmail.com>
Date: 2023-09-10T16:21:39Z
Added more desc
---
README.md | 2 ++
create-k8s-secrets.sh | 41 +++++++++++++++++++++++++++++++++++++++++
2 files changed, 43 insertions(+)
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 {