trivy-server/install.sh
Wolfgang Hottgenroth f43634cf41
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful
trivy token
2025-02-03 13:46:17 +01:00

32 lines
693 B
Bash
Executable File

#!/bin/bash
ARG1=$1
NAMESPACE=$(cat namespace)
TRIVY_VERSION=0.11.0
HOME=/home/`id -nu`
kubectl create namespace $NAMESPACE \
--dry-run=client \
-o yaml | \
kubectl -f - apply
eval "`cat secrets.asc | /usr/local/bin/decrypt-secrets.sh`"
kubectl create secret generic trivy-secret \
--dry-run=client \
-o yaml \
--save-config \
--from-literal="TRIVY_TOKEN=$TRIVY_TOKEN" | \
kubectl apply -f - -n $NAMESPACE
helm repo add aquasecurity https://aquasecurity.github.io/helm-charts/
helm repo update
helm upgrade --install \
trivy-server aquasecurity/trivy \
-f values.yml \
--version $TRIVY_VERSION \
--namespace=$NAMESPACE
kubectl apply -f ingress.yml -n $NAMESPACE