File tree Expand file tree Collapse file tree 6 files changed +29
-5
lines changed Expand file tree Collapse file tree 6 files changed +29
-5
lines changed Original file line number Diff line number Diff line change @@ -1170,7 +1170,13 @@ control_plane_load_balancer_internal: "none"
1170
1170
# fs.inotify.max_user_watches = 100000
1171
1171
sysctl_settings : " "
1172
1172
1173
-
1173
+ # kube-janitor configuration
1174
+ {{if eq .Cluster.Environment "production"}}
1175
+ # This makes kube-janitor opt-in for production clusters
1176
+ kube_janitor_enabled : " false"
1177
+ {{else}}
1178
+ kube_janitor_enabled : " true"
1179
+ {{end}}
1174
1180
1175
1181
# scheduling_controls
1176
1182
teapot_admission_controller_scheduling_controls_enabled : " false"
Original file line number Diff line number Diff line change @@ -330,3 +330,21 @@ post_apply:
330
330
kind : ServiceAccount
331
331
namespace : kube-system
332
332
{{- end }}
333
+ {{- if ne .Cluster.ConfigItems.kube_janitor_enabled "true" }}
334
+ - name : kube-janitor
335
+ kind : Deployment
336
+ namespace : kube-system
337
+ - name : kube-janitor
338
+ kind : ConfigMap
339
+ namespace : kube-system
340
+ - name : kube-janitor
341
+ kind : VerticalPodAutoscaler
342
+ namespace : kube-system
343
+ - name : kube-janitor
344
+ kind : ServiceAccount
345
+ namespace : kube-system
346
+ - name : kube-janitor
347
+ kind : ClusterRole
348
+ - name : kube-janitor
349
+ kind : ClusterRoleBinding
350
+ {{- end }}
Original file line number Diff line number Diff line change 1
- # {{ if ne .Cluster.Environment "production " }}
1
+ # {{ if eq .Cluster.ConfigItems "kube_janitor_enabled" "true " }}
2
2
# {{ $image := "container-registry.zalando.net/teapot/kube-janitor:23.7.0-main-2" }}
3
3
# {{ $version := index (split (index (split $image ":") 1) "-") 0 }}
4
4
apiVersion : apps/v1
Original file line number Diff line number Diff line change 1
- {{ if ne .Cluster.Environment "production " }}
1
+ {{ if eq .Cluster.ConfigItems "kube_janitor_enabled" "true " }}
2
2
apiVersion : v1
3
3
kind : ServiceAccount
4
4
metadata :
Original file line number Diff line number Diff line change 1
- # {{ if ne .Cluster.Environment "production " }}
1
+ # {{ if eq .Cluster.ConfigItems "kube_janitor_enabled" "true " }}
2
2
apiVersion : v1
3
3
kind : ConfigMap
4
4
metadata :
Original file line number Diff line number Diff line change 1
- {{ if ne .Cluster.Environment "production " }}
1
+ {{ if eq .Cluster.ConfigItems "kube_janitor_enabled" "true " }}
2
2
apiVersion : autoscaling.k8s.io/v1
3
3
kind : VerticalPodAutoscaler
4
4
metadata :
You can’t perform that action at this time.
0 commit comments