Skip to content

Commit 88a7445

Browse files
committed
BUG/MINOR: haproxy: Disable PSP for 1.25+ K8s
Signed-off-by: Dinko Korunic <[email protected]>
1 parent ec89d75 commit 88a7445

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

haproxy/templates/podsecuritypolicy.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/}}
1616

17+
{{- if (semverCompare "<1.25.0-0" .Capabilities.KubeVersion.Version) }}
1718
{{- if and .Values.rbac.create .Values.podSecurityPolicy.enabled -}}
1819
{{- $useHostNetwork := .Values.daemonset.useHostNetwork -}}
1920
{{- $useHostPort := .Values.daemonset.useHostPort -}}
@@ -81,3 +82,4 @@ spec:
8182
{{- toYaml . | nindent 4 }}
8283
{{- end }}
8384
{{- end }}
85+
{{- end }}

haproxy/values.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,10 +363,11 @@ podSecurityContext: {}
363363
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
364364
securityContext: {}
365365
# enabled: true
366+
# runAsNonRoot: true
366367
# runAsUser: 1000
367368
# runAsGroup: 1000
368-
# allowPrivilegeEscalation: true
369-
# runAsNonRoot: true
369+
# fsGroup: 1000
370+
# allowPrivilegeEscalation: false
370371
# capabilities:
371372
# drop:
372373
# - ALL

0 commit comments

Comments
 (0)