Allow custom service names for controller and backend (#6457)

This commit is contained in:
Andrew Konrath 2020-11-12 13:17:51 -06:00
parent 6052e9dc23
commit 603e2c5ee8
4 changed files with 15 additions and 3 deletions

View file

@ -4,6 +4,10 @@ This file documents all notable changes to [ingress-nginx](https://github.com/ku
### Unreleased ### Unreleased
### 3.14.0
- [X] [#6469](https://github.com/kubernetes/ingress-nginx/pull/6469) Allow custom service names for controller and backend
### 3.13.0 ### 3.13.0
- [X] [#6544](https://github.com/kubernetes/ingress-nginx/pull/6544) Fix default backend HPA name variable - [X] [#6544](https://github.com/kubernetes/ingress-nginx/pull/6544) Fix default backend HPA name variable

View file

@ -21,4 +21,4 @@ annotations:
# List of changes for the release in artifacthub.io # List of changes for the release in artifacthub.io
# https://artifacthub.io/packages/helm/ingress-nginx/ingress-nginx?modal=changelog # https://artifacthub.io/packages/helm/ingress-nginx/ingress-nginx?modal=changelog
artifacthub.io/changes: | artifacthub.io/changes: |
- Fix default backend HPA name variable - Allow custom service names for controller and backend

View file

@ -35,7 +35,7 @@ Create a default fully qualified controller name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}} */}}
{{- define "ingress-nginx.controller.fullname" -}} {{- define "ingress-nginx.controller.fullname" -}}
{{- printf "%s-%s" (include "ingress-nginx.fullname" .) "controller" | trunc 63 | trimSuffix "-" -}} {{- printf "%s-%s" (include "ingress-nginx.fullname" .) .Values.controller.name | trunc 63 | trimSuffix "-" -}}
{{- end -}} {{- end -}}
{{/* {{/*
@ -58,7 +58,7 @@ Create a default fully qualified default backend name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}} */}}
{{- define "ingress-nginx.defaultBackend.fullname" -}} {{- define "ingress-nginx.defaultBackend.fullname" -}}
{{- printf "%s-%s" (include "ingress-nginx.fullname" .) "defaultbackend" | trunc 63 | trimSuffix "-" -}} {{- printf "%s-%s" (include "ingress-nginx.fullname" .) .Values.defaultBackend.name | trunc 63 | trimSuffix "-" -}}
{{- end -}} {{- end -}}
{{/* {{/*

View file

@ -1,7 +1,14 @@
## nginx configuration ## nginx configuration
## Ref: https://github.com/kubernetes/ingress-nginx/blob/master/controllers/nginx/configuration.md ## Ref: https://github.com/kubernetes/ingress-nginx/blob/master/controllers/nginx/configuration.md
## ##
## Overrides for generated resource names
# See templates/_helpers.tpl
# nameOverride:
# fullnameOverride:
controller: controller:
name: controller
image: image:
repository: k8s.gcr.io/ingress-nginx/controller repository: k8s.gcr.io/ingress-nginx/controller
tag: "v0.41.2" tag: "v0.41.2"
@ -584,6 +591,7 @@ defaultBackend:
## ##
enabled: false enabled: false
name: defaultbackend
image: image:
repository: k8s.gcr.io/defaultbackend-amd64 repository: k8s.gcr.io/defaultbackend-amd64
tag: "1.5" tag: "1.5"