From 5fd2eedf93b7dbacc8d88395dae0ba4710f1f107 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Mass=C3=A9?= Date: Tue, 13 Jun 2023 17:55:08 +0200 Subject: [PATCH] wip --- infrastructure/files/cosign-hook/cosign.sh | 4 ++-- .../stackrox-configure-hook/configure.yaml | 20 ++++++++++++++----- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/infrastructure/files/cosign-hook/cosign.sh b/infrastructure/files/cosign-hook/cosign.sh index 6258f11..9c347bf 100644 --- a/infrastructure/files/cosign-hook/cosign.sh +++ b/infrastructure/files/cosign-hook/cosign.sh @@ -7,7 +7,7 @@ curl -sfLo /tmp/bin/cosign https://github.com/sigstore/cosign/releases/download/ chmod 755 /tmp/bin/cosign export PATH="/tmp/bin:$PATH" -if ! oc get secret code-signature -n fruits-dev &>/dev/null; then +if ! oc get secret code-signature -n eshop-dev &>/dev/null; then echo "========================================================================" echo " Generating a keypair" echo "========================================================================" @@ -18,7 +18,7 @@ if ! oc get secret code-signature -n fruits-dev &>/dev/null; then # main.go:74: error during command execution: open cosign.pub: permission denied cd /tmp - COSIGN_PASSWORD=dummy cosign generate-key-pair k8s://fruits-dev/code-signature + COSIGN_PASSWORD=dummy cosign generate-key-pair k8s://eshop-dev/code-signature fi exit 0 diff --git a/infrastructure/files/stackrox-configure-hook/configure.yaml b/infrastructure/files/stackrox-configure-hook/configure.yaml index 43e107e..a49cb60 100644 --- a/infrastructure/files/stackrox-configure-hook/configure.yaml +++ b/infrastructure/files/stackrox-configure-hook/configure.yaml @@ -41,7 +41,7 @@ api_version: v1 kind: Secret name: code-signature - namespace: fruits-dev + namespace: eshop-dev register: cosign_secret failed_when: cosign_secret.resources|length == 0 until: cosign_secret is succeeded @@ -186,13 +186,23 @@ - cluster: label: key: app - value: fruits - namespace: fruits-test + value: eshop-web + namespace: eshop-test - cluster: label: key: app - value: fruits - namespace: fruits-prod + value: eshop-api + namespace: eshop-test + - cluster: + label: + key: app + value: eshop-web + namespace: eshop-prod + - cluster: + label: + key: app + value: eshop-api + namespace: eshop-prod severity: CRITICAL_SEVERITY - set_fact: