Skip to content

Commit

Permalink
SLK-79184 - Fix namespaceSelector for KE admission controller
Browse files Browse the repository at this point in the history
  • Loading branch information
semyonmor committed Mar 6, 2024
1 parent e35f9da commit 20af075
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 15 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ This repository includes the following charts; they can be deployed separately:
| [Server](server/) | Deploys the Console, Database, and Gateway components; optionally deploys Envoy component | 2022.4.23 |
| [Enforcer](enforcer/) | Deploys the Aqua Enforcer daemonset | 2022.4.20 |
| [Scanner](scanner/) | Deploys the Aqua Scanner deployment | 2022.4.6 |
| [KubeEnforcer](kube-enforcer/) | Deploys Aqua KubeEnforcer | 2022.4.41 |
| [KubeEnforcer](kube-enforcer/) | Deploys Aqua KubeEnforcer | 2022.4.42 |
| [Gateway](gateway) | Deploys the Aqua Standalone Gateway | 2022.4.12 |
| [Tenant-Manager](tenant-manager/) | Deploys the Aqua Tenant Manager | 2022.4.0 |
| [Cyber Center](cyber-center/) | Deploys Aqua CyberCenter offline for air-gap environment | 2022.4.3 |
Expand Down Expand Up @@ -81,7 +81,7 @@ aqua-helm/codesec-agent 1.2.7 2022.4 A Helm chart for
aqua-helm/cloud-connector 2022.4.4 2022.4 A Helm chart for Aqua Cloud-Connector
aqua-helm/cyber-center 2022.4.3 2022.4 A Helm chart for Aqua CyberCenter
aqua-helm/enforcer 2022.4.20 2022.4 A Helm chart for the Aqua Enforcer
aqua-helm/kube-enforcer 2022.4.41 2022.4 A Helm chart for the Aqua KubeEnforcer Starboard
aqua-helm/kube-enforcer 2022.4.42 2022.4 A Helm chart for the Aqua KubeEnforcer Starboard
aqua-helm/gateway 2022.4.12 2022.4 A Helm chart for the Aqua Gateway
aqua-helm/scanner 2022.4.6 2022.4 A Helm chart for the Aqua Scanner CLI component
aqua-helm/server 2022.4.23 2022.4 A Helm chart for the Aqua Console components
Expand Down
3 changes: 3 additions & 0 deletions kube-enforcer/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Changelog
All notable changes to this project will be documented in this file.

## 2022.4.42 ( Feb 19th, 2024 )
* Fix namespaceSelector for KE admission controller

## 2022.4.41 ( Feb 19th, 2024 )
* Add a new environment variable AQUA_HEALTH_MONITOR_PORT
* Add namespaceSelector to KE admission controller
Expand Down
2 changes: 1 addition & 1 deletion kube-enforcer/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
appVersion: "2022.4"
description: A Helm chart for the Aqua KubeEnforcer
name: kube-enforcer
version: "2022.4.41"
version: "2022.4.42"
dependencies:
- name: enforcer
version: "2022.4.20"
Expand Down
9 changes: 3 additions & 6 deletions kube-enforcer/templates/mutating-webhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,9 @@ webhooks:
timeoutSeconds: {{ .Values.webhooks.mutatingWebhook.timeout }}
admissionReviewVersions: ["v1beta1"]
sideEffects: "None"
{{- with .Values.webhooks.mutatingWebhook.namespaceSelector }}
namespaceSelector:
matchExpressions:
- key: kubernetes.io/metadata.name
operator: NotIn
values:
- kube-system
- kube-node-lease
{{ toYaml . | nindent 8 }}
{{ end }}
{{- end }}
{{- end }}
9 changes: 3 additions & 6 deletions kube-enforcer/templates/validating-webhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,9 @@ webhooks:
timeoutSeconds: {{ .Values.webhooks.validatingWebhook.timeout }}
admissionReviewVersions: ["v1beta1"]
sideEffects: "None"
{{- with .Values.webhooks.validatingWebhook.namespaceSelector }}
namespaceSelector:
matchExpressions:
- key: kubernetes.io/metadata.name
operator: NotIn
values:
- kube-system
- kube-node-lease
{{ toYaml . | nindent 8 }}
{{ end }}
{{- end }}
{{- end }}
14 changes: 14 additions & 0 deletions kube-enforcer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,27 @@ webhooks:
name: "kube-enforcer-admission-hook-config"
timeout: 2
annotations: {}
namespaceSelector: {}
# matchExpressions:
# - key: kubernetes.io/metadata.name
# operator: NotIn
# values:
# - kube-system
# - kube-node-lease
mutatingWebhook:
enabled: true
name: "kube-enforcer-me-injection-hook-config"
timeout: 2
annotations: {}
# cert-manager.io/inject-ca-from: < namespace >/< certsSecret.name >
# If you are using webhooks.certManager=true, so need to add cert-manager annotations
namespaceSelector: { }
# matchExpressions:
# - key: kubernetes.io/metadata.name
# operator: NotIn
# values:
# - kube-system
# - kube-node-lease

securityContext:
runAsUser: 11431
Expand Down

0 comments on commit 20af075

Please sign in to comment.