42 lines
1.1 KiB
Bash
42 lines
1.1 KiB
Bash
|
#!/bin/bash
|
||
|
|
||
|
NAMESPACE=$(cat namespace)
|
||
|
DEFECTDOJO_VERSION=1.6.174
|
||
|
|
||
|
kubectl create namespace $NAMESPACE \
|
||
|
--dry-run=client \
|
||
|
-o yaml | \
|
||
|
kubectl -f - apply
|
||
|
|
||
|
SECRETS_FILE=`mktemp`
|
||
|
gpg --decrypt --passphrase $GPG_PASSPHRASE --yes --batch --homedir /tmp/.gnupg --output $SECRETS_FILE secrets.asc
|
||
|
. $SECRETS_FILE
|
||
|
rm $SECRETS_FILE
|
||
|
# eval "`cat secrets.asc | /usr/local/bin/decrypt-secrets.sh`"
|
||
|
|
||
|
kubectl create secret generic defectdojo-postgresql-specific \
|
||
|
--dry-run=client \
|
||
|
-o yaml \
|
||
|
--save-config \
|
||
|
--from-literal=postgresql-password="$PGPASSWORD" | \
|
||
|
kubectl apply -f - -n $NAMESPACE
|
||
|
|
||
|
kubectl create secret generic defectdojo-redis-specific \
|
||
|
--dry-run=client \
|
||
|
-o yaml \
|
||
|
--save-config \
|
||
|
--from-literal=redis-password="" | \
|
||
|
kubectl apply -f - -n $NAMESPACE
|
||
|
|
||
|
|
||
|
helm repo add defectdojo 'https://raw.githubusercontent.com/DefectDojo/django-DefectDojo/helm-charts'
|
||
|
helm repo update
|
||
|
helm upgrade --install \
|
||
|
defectdojo defectdojo/defectdojo \
|
||
|
-f values.yml \
|
||
|
--version=$DEFECTDOJO_VERSION \
|
||
|
--namespace=$NAMESPACE
|
||
|
|
||
|
|
||
|
kubectl apply -f ingress.yml -n $NAMESPACE
|