Files
helm-charts-hardened/charts/spire/charts/spire-agent/templates/roles.yaml
T
kfox1111 03db6bb5fe Namespace override
This patch makes it possible to install the subcharts in different
namespaces as needed.

Signed-off-by: Kevin Fox <[email protected]>
2023-03-13 15:03:16 -07:00

27 lines
741 B
YAML

# Required cluster role to allow spire-agent to query k8s API server
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: {{ include "spire-agent.fullname" . }}
rules:
- apiGroups: [""]
resources:
- pods
- nodes
- nodes/proxy
verbs: ["get"]
---
# Binds above cluster role to spire-agent service account
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: {{ include "spire-agent.fullname" . }}
subjects:
- kind: ServiceAccount
name: {{ include "spire-agent.serviceAccountName" . }}
namespace: {{ include "spire-agent.namespace" . }}
roleRef:
kind: ClusterRole
name: {{ include "spire-agent.fullname" . }}
apiGroup: rbac.authorization.k8s.io