Skip to content

Commit

Permalink
Replace PSP installation condition (#95)
Browse files Browse the repository at this point in the history
* replace PSP installation condition

* replace PSP installation condition

* replace PSP installation condition
  • Loading branch information
njuettner authored Oct 10, 2023
1 parent c0eb0cf commit e6469a8
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- Replace condition for PSP CR installation.

## [0.13.0] - 2023-09-26

### Added
Expand Down
2 changes: 1 addition & 1 deletion helm/cilium/templates/cilium-agent/podsecuritypolicy.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }}
{{- if not .Values.global.podSecurityStandards.enforced }}
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }}
{{- if not .Values.global.podSecurityStandards.enforced }}
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and (or .Values.defaultPolicies.enabled .Values.defaultPolicies.remove) (.Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy") -}}
{{- if and (or .Values.defaultPolicies.enabled .Values.defaultPolicies.remove) (not .Values.global.podSecurityStandards.enforced) -}}
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if or .Values.extraPolicies.allowEgressToCoreDNS.enabled .Values.extraPolicies.allowEgressToProxy.enabled -}}
{{- if and (or .Values.extraPolicies.allowEgressToCoreDNS.enabled .Values.extraPolicies.allowEgressToProxy.enabled) (not .Values.global.podSecurityStandards.enforced) -}}
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
Expand Down
2 changes: 1 addition & 1 deletion helm/cilium/templates/hubble-relay/podsecuritypolicy.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }}
{{- if not .Values.global.podSecurityStandards.enforced }}
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
Expand Down
2 changes: 1 addition & 1 deletion helm/cilium/templates/hubble-ui/podsecuritypolicy.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }}
{{- if not .Values.global.podSecurityStandards.enforced }}
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
Expand Down
13 changes: 13 additions & 0 deletions helm/cilium/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1118,6 +1118,19 @@
}
}
},
"global": {
"type": "object",
"properties": {
"podSecurityStandards": {
"type": "object",
"properties": {
"enforced": {
"type": "boolean"
}
}
}
}
},
"healthChecking": {
"type": "boolean"
},
Expand Down
4 changes: 4 additions & 0 deletions helm/cilium/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2592,3 +2592,7 @@ extraPolicies:
# If true, it adds an initContainer to cilium-agent pods that cleans up any legacy kube-proxy iptables rules from the node before running cilium.
# Only makes sense when `kubeProxyReplacement` is enabled (i.e. not set to 'disabled').
cleanupKubeProxy: false

global:
podSecurityStandards:
enforced: false

0 comments on commit e6469a8

Please sign in to comment.