Skip to content

Commit

Permalink
do not hash nginx configmap name
Browse files Browse the repository at this point in the history
The nginx controller pods automatically watch their configmap for changes, so we don't need to force the pods to restart. This should eliminate downtime during upgrades.
  • Loading branch information
Marshall Cottrell committed Apr 8, 2021
1 parent ad0f988 commit d54c510
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 28 deletions.
17 changes: 1 addition & 16 deletions ingress-nginx/custom-config/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ configurations:
configMapGenerator:
# https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/
- name: ingress-nginx-controller
behavior: create
behavior: merge
literals:
- add-headers=$(HEADERS_CONFIGMAP_NAMESPACE)/$(HEADERS_CONFIGMAP_NAME)
- enable-vts-status="true"
Expand All @@ -14,22 +14,7 @@ configMapGenerator:
behavior: create
literals:
- X-Powered-By="appdat"
patches:
- patch: |-
- op: replace
path: /spec/template/spec/containers/0/args/4
value: --configmap=$(POD_NAMESPACE)/$(CUSTOM_CONFIGMAP_NAME)
target:
kind: Deployment
name: ingress-nginx-controller
vars:
- name: CUSTOM_CONFIGMAP_NAME
fieldref:
fieldpath: metadata.name
objref:
name: ingress-nginx-controller
apiVersion: v1
kind: ConfigMap
- name: HEADERS_CONFIGMAP_NAME
fieldref:
fieldpath: metadata.name
Expand Down
25 changes: 13 additions & 12 deletions ingress-nginx/upstream/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,19 @@ metadata:
automountServiceAccountToken: true
---
# Source: ingress-nginx/templates/controller-configmap.yaml
# apiVersion: v1
# kind: ConfigMap
# metadata:
# labels:
# helm.sh/chart: ingress-nginx-3.23.0
# app.kubernetes.io/name: ingress-nginx
# app.kubernetes.io/instance: ingress-nginx
# app.kubernetes.io/version: 0.44.0
# app.kubernetes.io/managed-by: Helm
# app.kubernetes.io/component: controller
# name: ingress-nginx-controller
# ---
apiVersion: v1
kind: ConfigMap
metadata:
labels:
helm.sh/chart: ingress-nginx-3.27.0
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/instance: ingress-nginx
app.kubernetes.io/version: 0.45.0
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/component: controller
name: ingress-nginx-controller
data:
---
# Source: ingress-nginx/templates/clusterrole.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
Expand Down

0 comments on commit d54c510

Please sign in to comment.