Skip to content

Commit

Permalink
chore: add requests and limits to initContainer
Browse files Browse the repository at this point in the history
Avoids issues with Gatekeeper policies rejecting workloads that do not
specify resource requests.
  • Loading branch information
pintohutch committed May 14, 2024
1 parent 775bdde commit 5504f6b
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 5 deletions.
1 change: 1 addition & 0 deletions charts/operator/templates/alertmanager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ spec:
drop:
- all
privileged: false
resources: {{- toYaml $.Values.resources.bash | nindent 10}}
containers:
- name: alertmanager
image: {{.Values.images.alertmanager.image}}:{{.Values.images.alertmanager.tag}}
Expand Down
5 changes: 3 additions & 2 deletions charts/operator/templates/collector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ spec:
drop:
- all
privileged: false
resources: {{- toYaml $.Values.resources.bash | nindent 10}}
containers:
- name: config-reloader
image: {{.Values.images.configReloader.image}}:{{.Values.images.configReloader.tag}}
Expand All @@ -72,7 +73,7 @@ spec:
fieldRef:
apiVersion: v1
fieldPath: spec.nodeName
resources: {{- toYaml $.Values.resources.bash | nindent 10}}
resources: {{- toYaml $.Values.resources.configReloader | nindent 10}}
volumeMounts:
- name: config
readOnly: true
Expand Down Expand Up @@ -117,7 +118,7 @@ spec:
env:
- name: GOGC
value: "25"
resources: {{- toYaml $.Values.resources.collector | nindent 10 }}
resources: {{- toYaml $.Values.resources.prometheus | nindent 10 }}
volumeMounts:
- name: storage
mountPath: /prometheus/data
Expand Down
1 change: 1 addition & 0 deletions charts/operator/templates/rule-evaluator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ spec:
drop:
- all
privileged: false
resources: {{- toYaml $.Values.resources.bash | nindent 10 }}
containers:
- name: config-reloader
image: {{.Values.images.configReloader.image}}:{{.Values.images.configReloader.tag}}
Expand Down
6 changes: 3 additions & 3 deletions charts/values.global.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ resources:
memory: 16M
bash:
limits:
memory: 32M
memory: 6M
requests:
cpu: 1m
memory: 4M
collector:
memory: 6M
prometheus:
limits:
memory: 2G
requests:
Expand Down
18 changes: 18 additions & 0 deletions manifests/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,12 @@ spec:
drop:
- all
privileged: false
resources:
limits:
memory: 6M
requests:
cpu: 1m
memory: 6M
containers:
- name: config-reloader
image: gke.gcr.io/prometheus-engine/config-reloader:v0.9.0-gke.1
Expand Down Expand Up @@ -634,6 +640,12 @@ spec:
drop:
- all
privileged: false
resources:
limits:
memory: 6M
requests:
cpu: 1m
memory: 6M
containers:
- name: config-reloader
image: gke.gcr.io/prometheus-engine/config-reloader:v0.9.0-gke.1
Expand Down Expand Up @@ -800,6 +812,12 @@ spec:
drop:
- all
privileged: false
resources:
limits:
memory: 6M
requests:
cpu: 1m
memory: 6M
containers:
- name: alertmanager
image: gke.gcr.io/prometheus-engine/alertmanager:v0.25.1-gmp.2-gke.0
Expand Down

0 comments on commit 5504f6b

Please sign in to comment.