mirror of https://git.rancher.io/charts
psp changes for pushprox
parent
d6d67f4d33
commit
9859369453
|
@ -6,10 +6,12 @@ metadata:
|
|||
name: {{ template "pushProxy.client.name" . }}
|
||||
labels: {{ include "pushProxy.client.labels" . | nindent 4 }}
|
||||
rules:
|
||||
{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicies" }}
|
||||
- apiGroups: ['policy']
|
||||
resources: ['podsecuritypolicies']
|
||||
verbs: ['use']
|
||||
resourceNames:
|
||||
{{- end }}
|
||||
- {{ template "pushProxy.client.name" . }}
|
||||
{{- if and .Values.clients.https.enabled .Values.clients.https.useServiceAccountCredentials }}
|
||||
- nonResourceURLs: ["/metrics"]
|
||||
|
@ -40,6 +42,7 @@ metadata:
|
|||
namespace: {{ include "pushprox.namespace" . }}
|
||||
labels: {{ include "pushProxy.client.labels" . | nindent 4 }}
|
||||
---
|
||||
{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicies" }}
|
||||
apiVersion: policy/v1beta1
|
||||
kind: PodSecurityPolicy
|
||||
metadata:
|
||||
|
@ -78,4 +81,5 @@ spec:
|
|||
- pathPrefix: {{ required "Need access to volume on host with the SSL cert files to use HTTPs" .Values.clients.https.certDir }}
|
||||
readOnly: true
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}{{- end }}
|
|
@ -6,10 +6,12 @@ metadata:
|
|||
name: {{ template "pushProxy.proxy.name" . }}
|
||||
labels: {{ include "pushProxy.proxy.labels" . | nindent 4 }}
|
||||
rules:
|
||||
{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicies" }}
|
||||
- apiGroups: ['policy']
|
||||
resources: ['podsecuritypolicies']
|
||||
verbs: ['use']
|
||||
resourceNames:
|
||||
{{- end }}
|
||||
- {{ template "pushProxy.proxy.name" . }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
|
@ -33,6 +35,7 @@ metadata:
|
|||
namespace: {{ include "pushprox.namespace" . }}
|
||||
labels: {{ include "pushProxy.proxy.labels" . | nindent 4 }}
|
||||
---
|
||||
{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicies" }}
|
||||
apiVersion: policy/v1beta1
|
||||
kind: PodSecurityPolicy
|
||||
metadata:
|
||||
|
@ -62,3 +65,4 @@ spec:
|
|||
volumes:
|
||||
- 'secret'
|
||||
{{- end }}{{- end }}
|
||||
{{- end }}
|
||||
|
|
Loading…
Reference in New Issue