Skip to content

Commit fabf624

Browse files
committed
feat: Add sandbox controller
Added the deployment manifest for the sandbox-controller component. A new cluster configuration item, sandbox_controller_enabled, has been introduced to control its deployment. The controller is disabled by default, and setting this config item to "true" is required to enable its deployment in the cluster. A conditional deletion rule was added to ensure the deployment is removed when the configuration item is not set to "true".
1 parent 046ab00 commit fabf624

File tree

3 files changed

+50
-0
lines changed

3 files changed

+50
-0
lines changed

cluster/config-defaults.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1287,3 +1287,6 @@ aws_vpc_cni_network_policy_enforcing_mode: "standard"
12871287
# aws-load-balancer-controller resource settings
12881288
aws_load_balancer_controller_cpu: "100m"
12891289
aws_load_balancer_controller_mem_max: "4Gi"
1290+
1291+
# configure if sandbox-controller should be deployed
1292+
sandbox_controller_enabled: "false"

cluster/manifests/deletions.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,11 @@ post_apply:
297297
kind : Deployment
298298
namespace: wiz
299299
{{- end }}
300+
{{ if ne .Cluster.ConfigItems.sandbox_controller_enabled "true" }}
301+
- name: sandbox-controller
302+
namespace: kube-system
303+
kind: Deployment
304+
{{ end }}
300305
{{- if and (ne .Cluster.ConfigItems.wiz_enable_runtime_connector_broker "true") (ne .Cluster.ConfigItems.wiz_enable_runtime_connector "true") }}
301306
- name: wiz-connector-connector
302307
kind : Secret
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# {{ $image := "container-registry.zalando.net/gwproxy/sandbox-controller:main-8" }}
2+
# {{ $version := index (split $image ":") 1 }}
3+
4+
apiVersion: apps/v1
5+
kind: Deployment
6+
metadata:
7+
name: sandbox-controller
8+
namespace: kube-system
9+
labels:
10+
application: sandbox-controller
11+
version: "{{ $version }}"
12+
spec:
13+
replicas: 1
14+
selector:
15+
matchLabels:
16+
application: sandbox-controller
17+
template:
18+
metadata:
19+
labels:
20+
application: sandbox-controller
21+
version: "{{ $version }}"
22+
annotations:
23+
kubernetes-log-watcher/scalyr-parser: |
24+
[{"container": "controller", "parser": "keyValue"}]
25+
logging/destination: "{{ .Cluster.ConfigItems.log_destination_both }}"
26+
# no metrics exposed so far
27+
# prometheus.io/path: /metrics
28+
# prometheus.io/port: "7979"
29+
# prometheus.io/scrape: "true"
30+
spec:
31+
priorityClassName: "{{ .Cluster.ConfigItems.system_priority_class }}"
32+
serviceAccountName: sandbox-controller
33+
containers:
34+
- name: controller
35+
image: "{{ $image }}"
36+
resources:
37+
limits:
38+
cpu: 50m
39+
memory: 0.3Gi
40+
requests:
41+
cpu: 50m
42+
memory: 0.3Gi

0 commit comments

Comments
 (0)