deploy/config/openshift/secrets-access-role.sh.yml
#!/bin/bash
set -euo pipefail
# Test cases can modify following variable from outside:
SECRET_CLUSTER_ROLE_VERBS_VALUE=${SECRET_CLUSTER_ROLE_VERBS_VALUE:-"[ \"get\", \"update\" ]"}
cat << EOL
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: secrets-access-${UNIQUE_TEST_ID}
rules:
- apiGroups: [""] # "" indicates the core API group
resources: ["secrets"]
verbs: ${SECRET_CLUSTER_ROLE_VERBS_VALUE}
EOL