Skip to content

Commit

Permalink
extract to values.yaml file hard-coded nginx-ingress configuration va…
Browse files Browse the repository at this point in the history
…lues

Signed-off-by: Vladica Obojevic <obojevic@gmail.com>
  • Loading branch information
vladica committed Sep 6, 2023
1 parent 93a94bb commit c81c2b7
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 8 deletions.
16 changes: 8 additions & 8 deletions deployment/helm/ditto/templates/nginx-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -539,18 +539,18 @@ metadata:
name: nginx-ingress-controller
namespace: "{{ .Values.ingress.controller.namespace }}"
spec:
replicas: 1
replicas: {{ .Values.ingress.controller.replicaCount }}
selector:
matchLabels:
app.kubernetes.io/name: "{{ .Values.ingress.controller.namespace }}"
app.kubernetes.io/part-of: "{{ .Values.ingress.controller.namespace }}"
strategy:
type: RollingUpdate
type: {{ .Values.ingress.controller.updateStrategy.type }}
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
minReadySeconds: 10
revisionHistoryLimit: 5
maxSurge: {{ .Values.ingress.controller.updateStrategy.rollingUpdate.maxSurge }}
maxUnavailable: {{ .Values.ingress.controller.updateStrategy.rollingUpdate.maxUnavailable }}
minReadySeconds: {{ .Values.ingress.controller.minReadySeconds }}
revisionHistoryLimit: {{ .Values.ingress.controller.revisionHistoryLimit }}
template:
metadata:
labels:
Expand Down Expand Up @@ -692,8 +692,8 @@ spec:
successThreshold: 1
resources:
requests:
cpu: "0.75"
memory: "1024Mi"
cpu: {{ mulf .Values.ingress.controller.resources.cpu 1000 }}m
memory: {{ .Values.ingress.controller.resources.memoryMi }}Mi
volumeMounts:
- mountPath: /usr/local/certificates/
name: webhook-cert
Expand Down
20 changes: 20 additions & 0 deletions deployment/helm/ditto/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,26 @@ ingress:
controller:
# enabled whether Ingress controller should be enabled
enabled: false
# replicaCount configuration for the ingress controller
replicaCount: 1
updateStrategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
# minReadySeconds configures the minimum number of seconds for which a newly created Pod should be ready without any
# of its containers crashing, for it to be considered available
# ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#min-ready-seconds
minReadySeconds: 10
# specify how many old ReplicaSets for ingress controller deployment will be retained
# ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#clean-up-policy
revisionHistoryLimit: 5
# resources configures the resources available/to use for the policies service
resources:
# cpu defines the "required" CPU of a node so that the service is placed there
cpu: 0.75
# memoryMi defines the memory in mebibyte (MiB) used as "required" and "limit" in k8s
memoryMi: 1024
# namespace for ingress controller, managed by helm, should not be created manually
namespace: ingress-nginx
# Ingress-NGINX version. Check Supported Versions table from https://github.com/kubernetes/ingress-nginx to match k8s version.
Expand Down

0 comments on commit c81c2b7

Please sign in to comment.