mirror of https://git.rancher.io/charts
[rancher-tracing] Replace global.rbac.pspEnabled flag.
* Replace previous global.rbac.pspEnabled flag with global.cattle.psp.enabled. * Add new flag to values.yaml. * Include validation in validate-psp-install.yaml.pull/2379/head
parent
609e8972e7
commit
aed199798c
|
@ -68,7 +68,7 @@ spec:
|
||||||
affinity:
|
affinity:
|
||||||
{{- include "nodeAffinity" . | indent 6 }}
|
{{- include "nodeAffinity" . | indent 6 }}
|
||||||
{{- include "podAntiAffinity" . | indent 6 }}
|
{{- include "podAntiAffinity" . | indent 6 }}
|
||||||
{{- if .Values.global.rbac.pspEnabled }}
|
{{- if .Values.global.cattle.psp.enabled }}
|
||||||
securityContext:
|
securityContext:
|
||||||
runAsNonRoot: true
|
runAsNonRoot: true
|
||||||
runAsUser: 1000
|
runAsUser: 1000
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{{- if .Values.global.rbac.pspEnabled }}
|
{{- if .Values.global.cattle.psp.enabled }}
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ServiceAccount
|
kind: ServiceAccount
|
||||||
metadata:
|
metadata:
|
||||||
|
@ -9,7 +9,6 @@ metadata:
|
||||||
heritage: {{ .Release.Service }}
|
heritage: {{ .Release.Service }}
|
||||||
release: {{ .Release.Name }}
|
release: {{ .Release.Name }}
|
||||||
---
|
---
|
||||||
{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }}
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
kind: RoleBinding
|
kind: RoleBinding
|
||||||
metadata:
|
metadata:
|
||||||
|
@ -85,4 +84,3 @@ spec:
|
||||||
- secret
|
- secret
|
||||||
- persistentVolumeClaim
|
- persistentVolumeClaim
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
|
||||||
|
|
7
packages/rancher-istio/1.15/rancher-tracing/charts/templates/validate-psp-install.yaml
vendored
Normal file
7
packages/rancher-istio/1.15/rancher-tracing/charts/templates/validate-psp-install.yaml
vendored
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
#{{- if gt (len (lookup "rbac.authorization.k8s.io/v1" "ClusterRole" "" "")) 0 -}}
|
||||||
|
#{{- if .Values.global.cattle.psp.enabled }}
|
||||||
|
#{{- if not (.Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy") }}
|
||||||
|
#{{- fail "The target cluster does not have the PodSecurityPolicy API resource. Please disable PSPs in this chart before proceeding." -}}
|
||||||
|
#{{- end }}
|
||||||
|
#{{- end }}
|
||||||
|
#{{- end }}
|
|
@ -14,6 +14,8 @@ fullnameOverride: ""
|
||||||
global:
|
global:
|
||||||
cattle:
|
cattle:
|
||||||
systemDefaultRegistry: ""
|
systemDefaultRegistry: ""
|
||||||
|
psp:
|
||||||
|
enabled: false
|
||||||
defaultResources: {}
|
defaultResources: {}
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
imagePullSecrets: []
|
imagePullSecrets: []
|
||||||
|
|
Loading…
Reference in New Issue