Skip to content

Commit

Permalink
Add support to set resources for controller pods
Browse files Browse the repository at this point in the history
  • Loading branch information
Guilherme Oki authored and Dean-Coakley committed Jul 30, 2019
1 parent 9739593 commit ec6ef50
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions deployments/helm-chart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ Parameter | Description | Default
`controller.terminationGracePeriodSeconds` | The termination grace period of the Ingress controller pod. | 30
`controller.tolerations` | The tolerations of the Ingress controller pods. | []
`controller.affinity` | The affinity of the Ingress controller pods. | {}
`controller.resources` | The resources of the Ingress controller pods. | {}
`controller.replicaCount` | The number of replicas of the Ingress controller deployment. | 1
`controller.ingressClass` | A class of the Ingress controller. The Ingress controller only processes Ingress resources that belong to its class - i.e. have the annotation `"kubernetes.io/ingress.class"` equal to the class. Additionally, the Ingress controller processes Ingress resources that do not have that annotation which can be disabled by setting the "-use-ingress-class-only" flag. | nginx
`controller.useIngressClassOnly` | Ignore Ingress resources without the `"kubernetes.io/ingress.class"` annotation. | false
Expand Down
2 changes: 2 additions & 0 deletions deployments/helm-chart/templates/controller-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.name
resources:
{{ toYaml .Values.controller.resources | indent 10 }}
args:
- -nginx-plus={{ .Values.controller.nginxplus }}
- -nginx-configmaps=$(POD_NAMESPACE)/{{ include "nginx-ingress.configName" . }}
Expand Down
2 changes: 2 additions & 0 deletions deployments/helm-chart/templates/controller-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ spec:
- name: prometheus
containerPort: {{ .Values.prometheus.port }}
{{- end }}
resources:
{{ toYaml .Values.controller.resources | indent 10 }}
env:
- name: POD_NAMESPACE
valueFrom:
Expand Down
9 changes: 9 additions & 0 deletions deployments/helm-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,15 @@ controller:
## The termination grace period of the Ingress controller pod.
terminationGracePeriodSeconds: 30

## The resources of the Ingress controller pods.
resources: {}
# limits:
# cpu: 100m
# memory: 64Mi
# requests:
# cpu: 100m
# memory: 64Mi

## The tolerations of the Ingress controller pods.
tolerations: []

Expand Down

0 comments on commit ec6ef50

Please sign in to comment.