Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions charts/parca/templates/agent-podsecuritypolicy.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.agent.enabled -}}
{{- if and .Values.agent.enabled .Values.agent.podSecurityPolicy.enabled -}}
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
Expand Down Expand Up @@ -36,4 +36,4 @@ spec:
- downwardAPI
- persistentVolumeClaim
- hostPath
{{- end }}
{{- end }}
18 changes: 18 additions & 0 deletions charts/parca/templates/agent-role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{{- if and .Values.agent.enabled .Values.agent.podSecurityPolicy.enabled -}}
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
labels:
{{- include "parca.labels.agent" . | nindent 4 }}
name: {{ include "parca.fullname" . }}-agent
namespace: {{ .Release.Namespace }}
rules:
- apiGroups:
- policy
resourceNames:
- {{ include "parca.fullname" . }}-agent
resources:
- podsecuritypolicies
verbs:
- use
{{- end }}
4 changes: 2 additions & 2 deletions charts/parca/templates/agent-rolebinding.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.agent.enabled -}}
{{- if and .Values.agent.enabled .Values.agent.podSecurityPolicy.enabled -}}
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
Expand All @@ -13,4 +13,4 @@ roleRef:
subjects:
- kind: ServiceAccount
name: {{ include "parca.fullname" . }}-agent
{{- end }}
{{- end }}
3 changes: 3 additions & 0 deletions charts/parca/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ agent:
operator: Exists
# -- resource limits and requests
resources: {}
# -- podSecurityPolicy for agent
podSecurityPolicy:
enabled: true

server:
# -- Allows disabling parca server
Expand Down