deploy/config/k8s/secrets-access-role-binding.sh.yml
#!/bin/bash
set -euo pipefail
cat << EOL
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: ${APP_NAMESPACE_NAME}-sa
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
namespace: ${APP_NAMESPACE_NAME}
name: secrets-access-role-binding
subjects:
- kind: ServiceAccount
name: ${APP_NAMESPACE_NAME}-sa
namespace: ${APP_NAMESPACE_NAME}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: secrets-access-${UNIQUE_TEST_ID}
EOL