initially working

This commit is contained in:
2025-02-19 17:48:56 +01:00
commit 26528365e7
6 changed files with 97 additions and 0 deletions

41
deployment/install.sh Executable file
View File

@ -0,0 +1,41 @@
#!/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