Add bootstrapping scripts and nix expressions
This commit is contained in:
33
bootstrap/bin/install-namespace.sh
Executable file
33
bootstrap/bin/install-namespace.sh
Executable file
@@ -0,0 +1,33 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
TOP="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)/.."
|
||||
|
||||
if [ x$1 = x ]; then
|
||||
ehco "usage: install-namespace.sh {namespace}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
namespace=$1
|
||||
tmpfile=/tmp/new-$namespace.$$
|
||||
|
||||
cat << EOF > $tmpfile
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
labels:
|
||||
name: $namespace
|
||||
name: $namespace
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: gitlab-registry-auth
|
||||
namespace: $namespace
|
||||
data:
|
||||
.dockerconfigjson: eyJhdXRocyI6eyJodHRwczovL3JlZ2lzdHJ5Lml0cGFydG5lci5ubyI6eyJ1c2VybmFtZSI6ImpvbmFzIiwicGFzc3dvcmQiOiJTRldwLVk0bkVfdXpNZFJxeHp6SyIsImF1dGgiOiJhbTl1WVhNNlUwWlhjQzFaTkc1RlgzVjZUV1JTY1hoNmVrcz0ifX19
|
||||
type: kubernetes.io/dockerconfigjson
|
||||
EOF
|
||||
|
||||
kubectl apply -f $tmpfile
|
||||
|
||||
rm $tmpfile
|
||||
Reference in New Issue
Block a user