mirror of https://git.rancher.io/charts
fix: psp usage for kube 1.25 and higher
ref https://github.com/rancher/rancher/issues/39858pull/2247/head
parent
d5b1974699
commit
d6ebecef8c
|
@ -1,4 +1,5 @@
|
|||
{{- if .Values.serviceAccount.create -}}
|
||||
{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" -}}
|
||||
{{- if .Values.serviceAccount.create }}
|
||||
{{- if .Values.global.rbac.pspEnabled }}
|
||||
|
||||
---
|
||||
|
@ -80,5 +81,6 @@ subjects:
|
|||
name: {{ .Values.serviceAccount.name | quote }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" -}}
|
||||
{{- if .Values.global.rbac.pspEnabled }}
|
||||
|
||||
apiVersion: v1
|
||||
|
@ -86,3 +87,4 @@ subjects:
|
|||
namespace: {{ .Release.Namespace }}
|
||||
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- charts-original/templates/server.yaml
|
||||
+++ charts/templates/server.yaml
|
||||
@@ -30,6 +30,13 @@
|
||||
@@ -30,6 +30,15 @@
|
||||
labels:
|
||||
{{- include "epinio-ui.labels" . | nindent 8 }}
|
||||
spec:
|
||||
|
@ -8,8 +8,10 @@
|
|||
+ {{- include "linux-node-selector" . | nindent 8 }}
|
||||
+ tolerations:
|
||||
+ {{- include "linux-node-tolerations" . | nindent 8 }}
|
||||
+{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }}
|
||||
+{{- if .Values.global.rbac.pspEnabled }}
|
||||
+ serviceAccountName: epinio-ui
|
||||
+{{- end }}
|
||||
+{{- end }}
|
||||
containers:
|
||||
- name: epinio-ui
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" -}}
|
||||
{{- if .Values.global.rbac.pspEnabled }}
|
||||
|
||||
apiVersion: policy/v1beta1
|
||||
|
@ -79,3 +80,4 @@ subjects:
|
|||
namespace: {{ .Release.Namespace }}
|
||||
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{{- if .Values.serviceAccount.create -}}
|
||||
{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" -}}
|
||||
{{- if .Values.serviceAccount.create }}
|
||||
{{- if .Values.global.rbac.pspEnabled }}
|
||||
|
||||
---
|
||||
|
@ -80,5 +81,6 @@ subjects:
|
|||
name: {{ include "kubed.serviceAccountName" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{{- if .Values.serviceAccount.create -}}
|
||||
{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" -}}
|
||||
{{- if .Values.serviceAccount.create }}
|
||||
{{- if .Values.global.rbac.pspEnabled }}
|
||||
|
||||
---
|
||||
|
@ -80,5 +81,6 @@ subjects:
|
|||
name: {{ .Values.serviceAccount.name | quote }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
|
Loading…
Reference in New Issue