Added create-k8s-secrets.sh

This commit is contained in:
斟酌 鵬兄 2022-03-30 14:12:54 +09:00
parent 087e896be0
commit f536681e9a
2 changed files with 29 additions and 2 deletions

29
create-k8s-secrets.sh Executable file
View File

@ -0,0 +1,29 @@
#!/bin/bash
# Copyleft https://git.k8s.astropenguin.net/penguin/s3-arch-utils
# ##
#
# Usage
# create-k8s-secrets.sh namespace secret-name
#
# Description
# Create a secret config for arch_* in secret-name under the
# specificed namespace
#
# #
function _print_files {
for i in $( ls arch_*.sh ); do
echo " $i: $( base64 -w0 $i )"
done
}
cat<<__SECRET__
apiVersion: v1
data:
`_print_files`
kind: Secret
metadata:
name: $2
namespace: $1
__SECRET__

View File

@ -1,2 +0,0 @@
#!/bin/bash