Added create-k8s-secrets.sh
This commit is contained in:
parent
087e896be0
commit
f536681e9a
29
create-k8s-secrets.sh
Executable file
29
create-k8s-secrets.sh
Executable 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__
|
@ -1,2 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
Loading…
Reference in New Issue
Block a user