Skip to content
This repository has been archived by the owner on Jul 18, 2019. It is now read-only.

First pass at adding resource requests to foreman. #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions helm_charts/foreman/templates/foreman-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ spec:
- name: {{ .Chart.Name }}
image: "{{ .Values.foreman.image.repository }}:{{ .Values.foreman.image.tag }}"
imagePullPolicy: {{ .Values.foreman.image.pullPolicy }}
resources:
request:
cpu: 1000m
memory: 1024Mi
ports:
- name: http
containerPort: {{ .Values.foreman.service.internalPort }}
Expand Down
4 changes: 4 additions & 0 deletions helm_charts/foreman/templates/postgres-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ spec:
- name: {{ .Chart.Name }}
image: "{{ .Values.postgres.image.repository }}:{{ .Values.postgres.image.tag }}"
imagePullPolicy: {{ .Values.postgres.image.pullPolicy }}
resources:
request:
cpu: 100m
memory: 1024Mi
ports:
- name: postgres
containerPort: {{ .Values.postgres.service.internalPort }}
Expand Down
4 changes: 4 additions & 0 deletions helm_charts/foreman/templates/puppet-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ spec:
- name: puppet
image: "{{ .Values.puppet.image.repository }}:{{ .Values.puppet.image.tag }}"
imagePullPolicy: {{ .Values.puppet.image.pullPolicy }}
resources:
request:
cpu: 1000m
memory: 1024Mi
ports:
- name: puppet
containerPort: {{ .Values.puppet.service.internalPort }}
Expand Down
4 changes: 4 additions & 0 deletions helm_charts/foreman/templates/puppetboard-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ spec:
- name: puppetboard
image: "{{ .Values.puppetboard.image.repository }}:{{ .Values.puppetboard.image.tag }}"
imagePullPolicy: {{ .Values.puppetboard.image.pullPolicy }}
resources:
request:
cpu: 1000m
memory: 1024Mi
ports:
- name: puppetboard
containerPort: {{ .Values.puppetboard.service.internalPort }}
Expand Down
4 changes: 4 additions & 0 deletions helm_charts/foreman/templates/puppetdb-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ spec:
- name: {{ .Chart.Name }}-postgres-puppetdb
image: "{{ .Values.puppetdb.postgres.image.repository }}:{{ .Values.puppetdb.postgres.image.tag }}"
imagePullPolicy: {{ .Values.puppetdb.postgres.image.pullPolicy }}
resources:
request:
cpu: 1000m
memory: 1024Mi
env:
- name: POSTGRES_USER
value: {{ .Values.puppetdb.postgres.username }}
Expand Down
4 changes: 4 additions & 0 deletions helm_charts/foreman/templates/utility-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ spec:
- name: {{ .Chart.Name }}
image: "{{ .Values.utilitypod.image.repository }}:{{ .Values.utilitypod.image.tag }}"
imagePullPolicy: Always
resources:
request:
cpu: 10m
Copy link

@kr3cj kr3cj Aug 19, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may have already seen this but I believe 10m means ten millicpu: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#meaning-of-cpu

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct. The default value is 2m, and sysdig says it's not even using that.

I don't like giving containers such tiny numbers. That's a great way to shoot yourself in the foot later, when a deployment needs to actually do something. I generally don't like going below 50m without a lot of history, but this one shows no CPU pulled for the whole 2 weeks visible in sysdig.

memory: 1024Mi
command: [ "/bin/bash", "-c", "--" ]
args: [ "while true; do sleep 30; done;" ]
volumeMounts:
Expand Down