Browse Source

wip

pull/1/head
Nicolas Massé 3 years ago
parent
commit
5fd2eedf93
  1. 4
      infrastructure/files/cosign-hook/cosign.sh
  2. 20
      infrastructure/files/stackrox-configure-hook/configure.yaml

4
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

20
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:

Loading…
Cancel
Save