From b9e5b772ba95768f1ee043d2b0d85de9dd4679d1 Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez Hernandez Date: Mon, 3 Sep 2018 13:57:01 +0000 Subject: [PATCH 1/6] Nginx Ingress Controller chart --- bitnami/nginx-ingress-controller/.helmignore | 1 + bitnami/nginx-ingress-controller/Chart.yaml | 18 + bitnami/nginx-ingress-controller/README.md | 177 ++++++++ .../templates/NOTES.txt | 64 +++ .../templates/_helpers.tpl | 72 ++++ .../templates/clusterrole.yaml | 69 ++++ .../templates/clusterrolebinding.yaml | 19 + .../templates/controller-configmap.yaml | 18 + .../templates/controller-daemonset.yaml | 205 ++++++++++ .../templates/controller-deployment.yaml | 199 +++++++++ .../templates/controller-hpa.yaml | 30 ++ .../templates/controller-metrics-service.yaml | 38 ++ .../controller-poddisruptionbudget.yaml | 17 + .../templates/controller-service.yaml | 72 ++++ .../templates/controller-stats-service.yaml | 38 ++ .../templates/default-backend-deployment.yaml | 74 ++++ .../default-backend-poddisruptionbudget.yaml | 17 + .../templates/default-backend-service.yaml | 39 ++ .../templates/headers-configmap.yaml | 14 + .../templates/podsecuritypolicy.yaml | 47 +++ .../templates/role.yaml | 89 ++++ .../templates/rolebinding.yaml | 19 + .../templates/serviceaccount.yaml | 11 + .../templates/tcp-configmap.yaml | 14 + .../templates/udp-configmap.yaml | 14 + bitnami/nginx-ingress-controller/values.yaml | 383 ++++++++++++++++++ 26 files changed, 1758 insertions(+) create mode 100644 bitnami/nginx-ingress-controller/.helmignore create mode 100644 bitnami/nginx-ingress-controller/Chart.yaml create mode 100644 bitnami/nginx-ingress-controller/README.md create mode 100644 bitnami/nginx-ingress-controller/templates/NOTES.txt create mode 100644 bitnami/nginx-ingress-controller/templates/_helpers.tpl create mode 100644 bitnami/nginx-ingress-controller/templates/clusterrole.yaml create mode 100644 bitnami/nginx-ingress-controller/templates/clusterrolebinding.yaml create mode 100644 bitnami/nginx-ingress-controller/templates/controller-configmap.yaml create mode 100644 bitnami/nginx-ingress-controller/templates/controller-daemonset.yaml create mode 100644 bitnami/nginx-ingress-controller/templates/controller-deployment.yaml create mode 100644 bitnami/nginx-ingress-controller/templates/controller-hpa.yaml create mode 100644 bitnami/nginx-ingress-controller/templates/controller-metrics-service.yaml create mode 100644 bitnami/nginx-ingress-controller/templates/controller-poddisruptionbudget.yaml create mode 100644 bitnami/nginx-ingress-controller/templates/controller-service.yaml create mode 100644 bitnami/nginx-ingress-controller/templates/controller-stats-service.yaml create mode 100644 bitnami/nginx-ingress-controller/templates/default-backend-deployment.yaml create mode 100644 bitnami/nginx-ingress-controller/templates/default-backend-poddisruptionbudget.yaml create mode 100644 bitnami/nginx-ingress-controller/templates/default-backend-service.yaml create mode 100644 bitnami/nginx-ingress-controller/templates/headers-configmap.yaml create mode 100644 bitnami/nginx-ingress-controller/templates/podsecuritypolicy.yaml create mode 100644 bitnami/nginx-ingress-controller/templates/role.yaml create mode 100644 bitnami/nginx-ingress-controller/templates/rolebinding.yaml create mode 100644 bitnami/nginx-ingress-controller/templates/serviceaccount.yaml create mode 100644 bitnami/nginx-ingress-controller/templates/tcp-configmap.yaml create mode 100644 bitnami/nginx-ingress-controller/templates/udp-configmap.yaml create mode 100644 bitnami/nginx-ingress-controller/values.yaml diff --git a/bitnami/nginx-ingress-controller/.helmignore b/bitnami/nginx-ingress-controller/.helmignore new file mode 100644 index 000000000..6b8710a71 --- /dev/null +++ b/bitnami/nginx-ingress-controller/.helmignore @@ -0,0 +1 @@ +.git diff --git a/bitnami/nginx-ingress-controller/Chart.yaml b/bitnami/nginx-ingress-controller/Chart.yaml new file mode 100644 index 000000000..e9353a8b2 --- /dev/null +++ b/bitnami/nginx-ingress-controller/Chart.yaml @@ -0,0 +1,18 @@ +name: nginx-ingress-controller +version: 0.18.0 +appVersion: 0.0.1 +description: Chart for the nginx Ingress controller +keywords: +- ingress +- nginx +- http +- web +- www +- reverse proxy +home: http://www.nginx.org +sources: +- https://github.com/bitnami/bitnami-docker-nginx-ingress-controller +maintainers: +- name: Bitnami + email: containers@bitnami.com +engine: gotpl diff --git a/bitnami/nginx-ingress-controller/README.md b/bitnami/nginx-ingress-controller/README.md new file mode 100644 index 000000000..dabca0227 --- /dev/null +++ b/bitnami/nginx-ingress-controller/README.md @@ -0,0 +1,177 @@ +# Nginx Ingress Controller + +[nginx-ingress](https://github.com/kubernetes/ingress-nginx) is an Ingress controller that uses ConfigMap to store the Nginx configuration. + +## TL;DR; + +```bash +$ helm install bitnami/nginx-ingress-controller +``` + +## Introduction + +Bitnami charts for Helm are carefully engineered, actively maintained and are the quickest and easiest way to deploy containers on a Kubernetes cluster that are ready to handle production workloads. + +This chart bootstraps a [nginx-ingress](https://github.com/kubernetes/ingress-nginx) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. + +## Prerequisites + +- Kubernetes 1.6+ + +## Installing the Chart + +To install the chart with the release name `my-release`: + +```bash +$ helm install --name my-release bitnami/nginx-ingress-controller +``` + +The command deploys nginx-ingress-controller on the Kubernetes cluster in the default configuration. + +> **Tip**: List all releases using `helm list` + +## Uninstalling the Chart + +To uninstall/delete the `my-release` deployment: + +```bash +$ helm delete my-release +``` + +The command removes all the Kubernetes components associated with the chart and deletes the release. + +## Configuration + +The following tables lists the configurable parameters of the nginx-ingress-controller chart and their default values. + +Parameter | Description | Default +--- | --- | --- +`controller.name` | name of the controller component | `controller` +`controller.image.registry` | name of the container image registry | `docker.io` +`controller.image.repository` | controller container image repository | `bitnami/nginx-ingress-controller` +`controller.image.tag` | controller container image tag | `0.18.0-debian-9` +`controller.image.pullPolicy` | controller container image pull policy | `IfNotPresent` +`controller.config` | nginx ConfigMap entries | none +`controller.hostNetwork` | If the nginx deployment / daemonset should run on the host's network namespace. Do not set this when `controller.service.externalIPs` is set and `kube-proxy` is used as there will be a port-conflict for port `80` | false +`controller.defaultBackendService` | default 404 backend service; required only if `defaultBackend.enabled = false` | `""` +`controller.electionID` | election ID to use for the status update | `ingress-controller-leader` +`controller.extraEnvs` | any additional environment variables to set in the pods | `{}` +`controller.extraContainers` | Sidecar containers to add to the controller pod. See [LemonLDAP::NG controller](https://github.com/lemonldap-ng-controller/lemonldap-ng-controller) as example | `{}` +`controller.extraVolumeMounts` | Additional volumeMounts to the controller main container | `{}` +`controller.extraVolumes` | Additional volumes to the controller pod | `{}` +`controller.extraInitContainers` | Containers, which are run before the app containers are started | `[]` +`controller.ingressClass` | name of the ingress class to route through this controller | `nginx` +`controller.scope.enabled` | limit the scope of the ingress controller | `false` (watch all namespaces) +`controller.scope.namespace` | namespace to watch for ingress | `""` (use the release namespace) +`controller.extraArgs` | Additional controller container arguments | `{}` +`controller.kind` | install as Deployment or DaemonSet | `Deployment` +`controller.daemonset.useHostPort` | If `controller.kind` is `DaemonSet`, this will enable `hostPort` for TCP/80 and TCP/443 | false +`controller.daemonset.hostPorts.http` | If `controller.daemonset.useHostPort` is `true` and this is non-empty, it sets the hostPort | `"80"` +`controller.daemonset.hostPorts.https` | If `controller.daemonset.useHostPort` is `true` and this is non-empty, it sets the hostPort | `"443"` +`controller.tolerations` | node taints to tolerate (requires Kubernetes >=1.6) | `[]` +`controller.affinity` | node/pod affinities (requires Kubernetes >=1.6) | `{}` +`controller.minReadySeconds` | how many seconds a pod needs to be ready before killing the next, during update | `0` +`controller.nodeSelector` | node labels for pod assignment | `{}` +`controller.podAnnotations` | annotations to be added to pods | `{}` +`controller.podLabels` | labels to add to the pod container metadata | `{}` +`controller.replicaCount` | desired number of controller pods | `1` +`controller.minAvailable` | minimum number of available controller pods for PodDisruptionBudget | `1` +`controller.resources` | controller pod resource requests & limits | `{}` +`controller.priorityClassName` | controller priorityClassName | `nil` +`controller.lifecycle` | controller pod lifecycle hooks | `{}` +`controller.service.annotations` | annotations for controller service | `{}` +`controller.service.labels` | labels for controller service | `{}` +`controller.publishService.enabled` | if true, the controller will set the endpoint records on the ingress objects to reflect those on the service | `false` +`controller.publishService.pathOverride` | override of the default publish-service name | `""` +`controller.service.clusterIP` | internal controller cluster service IP | `""` +`controller.service.externalIPs` | controller service external IP addresses. Do not set this when `controller.hostNetwork` is set to `true` and `kube-proxy` is used as there will be a port-conflict for port `80` | `[]` +`controller.service.externalTrafficPolicy` | If `controller.service.type` is `NodePort` or `LoadBalancer`, set this to `Local` to enable [source IP preservation](https://kubernetes.io/docs/tutorials/services/source-ip/#source-ip-for-services-with-typenodeport) | `"Cluster"` +`controller.service.healthCheckNodePort` | If `controller.service.type` is `NodePort` or `LoadBalancer` and `controller.service.externalTrafficPolicy` is set to `Local`, set this to [the managed health-check port the kube-proxy will expose](https://kubernetes.io/docs/tutorials/services/source-ip/#source-ip-for-services-with-typenodeport). If blank, a random port in the `NodePort` range will be assigned | `""` +`controller.service.loadBalancerIP` | IP address to assign to load balancer (if supported) | `""` +`controller.service.loadBalancerSourceRanges` | list of IP CIDRs allowed access to load balancer (if supported) | `[]` +`controller.service.enableHttp` | if port 80 should be opened for service | `true` +`controller.service.enableHttps` | if port 443 should be opened for service | `true` +`controller.service.targetPorts.http` | Sets the targetPort that maps to the Ingress' port 80 | `80` +`controller.service.targetPorts.https` | Sets the targetPort that maps to the Ingress' port 443 | `443` +`controller.service.type` | type of controller service to create | `LoadBalancer` +`controller.service.nodePorts.http` | If `controller.service.type` is `NodePort` and this is non-empty, it sets the nodePort that maps to the Ingress' port 80 | `""` +`controller.service.nodePorts.https` | If `controller.service.type` is `NodePort` and this is non-empty, it sets the nodePort that maps to the Ingress' port 443 | `""` +`controller.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated | 10 +`controller.livenessProbe.periodSeconds` | How often to perform the probe | 10 +`controller.livenessProbe.timeoutSeconds` | When the probe times out | 5 +`controller.livenessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed. | 1 +`controller.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | 3 +`controller.livenessProbe.port` | The port number that the liveness probe will listen on. | 10254 +`controller.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated | 10 +`controller.readinessProbe.periodSeconds` | How often to perform the probe | 10 +`controller.readinessProbe.timeoutSeconds` | When the probe times out | 1 +`controller.readinessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed. | 1 +`controller.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | 3 +`controller.readinessProbe.port` | The port number that the readiness probe will listen on. | 10254 +`controller.stats.enabled` | if `true`, enable "vts-status" page | `false` +`controller.stats.service.annotations` | annotations for controller stats service | `{}` +`controller.stats.service.clusterIP` | internal controller stats cluster service IP | `""` +`controller.stats.service.externalIPs` | controller service stats external IP addresses | `[]` +`controller.stats.service.loadBalancerIP` | IP address to assign to load balancer (if supported) | `""` +`controller.stats.service.loadBalancerSourceRanges` | list of IP CIDRs allowed access to load balancer (if supported) | `[]` +`controller.stats.service.type` | type of controller stats service to create | `ClusterIP` +`controller.metrics.enabled` | if `true`, enable Prometheus metrics (`controller.stats.enabled` must be `true` as well) | `false` +`controller.metrics.service.annotations` | annotations for Prometheus metrics service | `{}` +`controller.metrics.service.clusterIP` | cluster IP address to assign to service | `""` +`controller.metrics.service.externalIPs` | Prometheus metrics service external IP addresses | `[]` +`controller.metrics.service.loadBalancerIP` | IP address to assign to load balancer (if supported) | `""` +`controller.metrics.service.loadBalancerSourceRanges` | list of IP CIDRs allowed access to load balancer (if supported) | `[]` +`controller.metrics.service.servicePort` | Prometheus metrics service port | `9913` +`controller.metrics.service.type` | type of Prometheus metrics service to create | `ClusterIP` +`controller.customTemplate.configMapName` | configMap containing a custom nginx template | `""` +`controller.customTemplate.configMapKey` | configMap key containing the nginx template | `""` +`controller.headers` | configMap key:value pairs containing the [custom headers](https://github.com/kubernetes/ingress-nginx/tree/master/docs/examples/customization/custom-headers) for Nginx | `{}` +`controller.updateStrategy` | allows setting of RollingUpdate strategy | `{}` +`defaultBackend.enabled` | If false, controller.defaultBackendService must be provided | `true` +`defaultBackend.name` | name of the default backend component | `default-backend` +`defaultBackend.image.repository` | default backend container image repository | `k8s.gcr.io/defaultbackend` +`defaultBackend.image.tag` | default backend container image tag | `1.4` +`defaultBackend.image.pullPolicy` | default backend container image pull policy | `IfNotPresent` +`defaultBackend.extraArgs` | Additional default backend container arguments | `{}` +`defaultBackend.port` | Http port number | `8080` +`defaultBackend.tolerations` | node taints to tolerate (requires Kubernetes >=1.6) | `[]` +`defaultBackend.affinity` | node/pod affinities (requires Kubernetes >=1.6) | `{}` +`defaultBackend.nodeSelector` | node labels for pod assignment | `{}` +`defaultBackend.podAnnotations` | annotations to be added to pods | `{}` +`defaultBackend.podLabels` | labels to add to the pod container metadata | `{}` +`defaultBackend.replicaCount` | desired number of default backend pods | `1` +`defaultBackend.minAvailable` | minimum number of available default backend pods for PodDisruptionBudget | `1` +`defaultBackend.resources` | default backend pod resource requests & limits | `{}` +`defaultBackend.priorityClassName` | default backend priorityClassName | `nil` +`defaultBackend.service.annotations` | annotations for default backend service | `{}` +`defaultBackend.service.clusterIP` | internal default backend cluster service IP | `""` +`defaultBackend.service.externalIPs` | default backend service external IP addresses | `[]` +`defaultBackend.service.loadBalancerIP` | IP address to assign to load balancer (if supported) | `""` +`defaultBackend.service.loadBalancerSourceRanges` | list of IP CIDRs allowed access to load balancer (if supported) | `[]` +`defaultBackend.service.type` | type of default backend service to create | `ClusterIP` +`imagePullSecrets` | name of Secret resource containing private registry credentials | `nil` +`rbac.create` | if `true`, create & use RBAC resources | `true` +`podSecurityPolicy.enabled` | if `true`, create & use Pod Security Policy resources | `false` +`serviceAccount.create` | if `true`, create a service account | `` +`serviceAccount.name` | The name of the service account to use. If not set and `create` is `true`, a name is generated using the fullname template. | `` +`revisionHistoryLimit` | The number of old history to retain to allow rollback. | `10` +`tcp` | TCP service key:value pairs | `{}` +`udp` | UDP service key:value pairs | `{}` | + +Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, + +```bash +$ helm install --name my-release \ + --set controller.image.pullPolicy=Always \ + bitnami/nginx-ingress-controller +``` + +The above command sets the `controller.image.pullPolicy` to `Always`. + +Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, + +```bash +$ helm install --name my-release -f values.yaml bitnami/nginx-ingress-controller +``` + +> **Tip**: You can use the default [values.yaml](values.yaml) diff --git a/bitnami/nginx-ingress-controller/templates/NOTES.txt b/bitnami/nginx-ingress-controller/templates/NOTES.txt new file mode 100644 index 000000000..2b73f8767 --- /dev/null +++ b/bitnami/nginx-ingress-controller/templates/NOTES.txt @@ -0,0 +1,64 @@ +The nginx-ingress controller has been installed. + +{{- if contains "NodePort" .Values.controller.service.type }} +Get the application URL by running these commands: + +{{- if (not (empty .Values.controller.service.nodePorts.http)) }} + export HTTP_NODE_PORT={{ .Values.controller.service.nodePorts.http }} +{{- else }} + export HTTP_NODE_PORT=$(kubectl --namespace {{ .Release.Namespace }} get services -o jsonpath="{.spec.ports[0].nodePort}" {{ template "nginx-ingress.controller.fullname" . }}) +{{- end }} +{{- if (not (empty .Values.controller.service.nodePorts.https)) }} + export HTTPS_NODE_PORT={{ .Values.controller.service.nodePorts.https }} +{{- else }} + export HTTPS_NODE_PORT=$(kubectl --namespace {{ .Release.Namespace }} get services -o jsonpath="{.spec.ports[1].nodePort}" {{ template "nginx-ingress.controller.fullname" . }}) +{{- end }} + export NODE_IP=$(kubectl --namespace {{ .Release.Namespace }} get nodes -o jsonpath="{.items[0].status.addresses[1].address}") + + echo "Visit http://$NODE_IP:$HTTP_NODE_PORT to access your application via HTTP." + echo "Visit https://$NODE_IP:$HTTPS_NODE_PORT to access your application via HTTPS." +{{- else if contains "LoadBalancer" .Values.controller.service.type }} +It may take a few minutes for the LoadBalancer IP to be available. +You can watch the status by running 'kubectl --namespace {{ .Release.Namespace }} get services -o wide -w {{ template "nginx-ingress.controller.fullname" . }}' +{{- else if contains "ClusterIP" .Values.controller.service.type }} +Get the application URL by running these commands: + export POD_NAME=$(kubectl --namespace {{ .Release.Namespace }} get pods -o jsonpath="{.items[0].metadata.name}" -l "app={{ template "nginx-ingress.name" . }},component={{ .Values.controller.name }},release={{ .Release.Name }}") + kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80 + echo "Visit http://127.0.0.1:8080 to access your application." +{{- end }} + +An example Ingress that makes use of the controller: + + apiVersion: extensions/v1beta1 + kind: Ingress + metadata: + annotations: + kubernetes.io/ingress.class: {{ .Values.controller.ingressClass }} + name: example + namespace: foo + spec: + rules: + - host: www.example.com + http: + paths: + - backend: + serviceName: exampleService + servicePort: 80 + path: / + # This section is only required if TLS is to be enabled for the Ingress + tls: + - hosts: + - www.example.com + secretName: example-tls + +If TLS is enabled for the Ingress, a Secret containing the certificate and key must also be provided: + + apiVersion: v1 + kind: Secret + metadata: + name: example-tls + namespace: foo + data: + tls.crt: + tls.key: + type: kubernetes.io/tls diff --git a/bitnami/nginx-ingress-controller/templates/_helpers.tpl b/bitnami/nginx-ingress-controller/templates/_helpers.tpl new file mode 100644 index 000000000..c2ba89282 --- /dev/null +++ b/bitnami/nginx-ingress-controller/templates/_helpers.tpl @@ -0,0 +1,72 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "nginx-ingress.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +*/}} +{{- define "nginx-ingress.fullname" -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} + +{{/* +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). +*/}} +{{- define "nginx-ingress.controller.fullname" -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- printf "%s-%s" .Release.Name .Values.controller.name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s-%s" .Release.Name $name .Values.controller.name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} + +{{/* +Construct the path for the publish-service. + +By convention this will simply use the / to match the name of the +service generated. + +Users can provide an override for an explicit service they want bound via `.Values.controller.publishService.pathOverride` + +*/}} +{{- define "nginx-ingress.controller.publishServicePath" -}} +{{- $defServiceName := printf "%s/%s" .Release.Namespace (include "nginx-ingress.controller.fullname" .) -}} +{{- $servicePath := default $defServiceName .Values.controller.publishService.pathOverride }} +{{- print $servicePath | trimSuffix "-" -}} +{{- end -}} + +{{/* +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). +*/}} +{{- define "nginx-ingress.defaultBackend.fullname" -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- printf "%s-%s" .Release.Name .Values.defaultBackend.name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s-%s" .Release.Name $name .Values.defaultBackend.name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} + +{{/* +Create the name of the service account to use +*/}} +{{- define "nginx-ingress.serviceAccountName" -}} +{{- if .Values.serviceAccount.create -}} + {{ default (include "nginx-ingress.fullname" .) .Values.serviceAccount.name }} +{{- else -}} + {{ default "default" .Values.serviceAccount.name }} +{{- end -}} +{{- end -}} diff --git a/bitnami/nginx-ingress-controller/templates/clusterrole.yaml b/bitnami/nginx-ingress-controller/templates/clusterrole.yaml new file mode 100644 index 000000000..ec8de0540 --- /dev/null +++ b/bitnami/nginx-ingress-controller/templates/clusterrole.yaml @@ -0,0 +1,69 @@ +{{- if and .Values.rbac.create (not .Values.controller.scope.enabled) -}} +apiVersion: rbac.authorization.k8s.io/v1beta1 +kind: ClusterRole +metadata: + labels: + app: {{ template "nginx-ingress.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version }} + heritage: {{ .Release.Service }} + release: {{ .Release.Name }} + name: {{ template "nginx-ingress.fullname" . }} +rules: + - apiGroups: + - "" + resources: + - configmaps + - endpoints + - nodes + - pods + - secrets + verbs: + - list + - watch +{{- if and .Values.controller.scope.enabled .Values.controller.scope.namespace }} + - apiGroups: + - "" + resources: + - namespaces + resourceNames: + - "{{ .Values.controller.scope.namespace }}" + verbs: + - get +{{- end }} + - apiGroups: + - "" + resources: + - nodes + verbs: + - get + - apiGroups: + - "" + resources: + - services + verbs: + - get + - list + - update + - watch + - apiGroups: + - extensions + resources: + - ingresses + verbs: + - get + - list + - watch + - apiGroups: + - "" + resources: + - events + verbs: + - create + - patch + - apiGroups: + - extensions + resources: + - ingresses/status + verbs: + - update +{{- end -}} diff --git a/bitnami/nginx-ingress-controller/templates/clusterrolebinding.yaml b/bitnami/nginx-ingress-controller/templates/clusterrolebinding.yaml new file mode 100644 index 000000000..080d948db --- /dev/null +++ b/bitnami/nginx-ingress-controller/templates/clusterrolebinding.yaml @@ -0,0 +1,19 @@ +{{- if and .Values.rbac.create (not .Values.controller.scope.enabled) -}} +apiVersion: rbac.authorization.k8s.io/v1beta1 +kind: ClusterRoleBinding +metadata: + labels: + app: {{ template "nginx-ingress.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version }} + heritage: {{ .Release.Service }} + release: {{ .Release.Name }} + name: {{ template "nginx-ingress.fullname" . }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: {{ template "nginx-ingress.fullname" . }} +subjects: + - kind: ServiceAccount + name: {{ template "nginx-ingress.serviceAccountName" . }} + namespace: {{ .Release.Namespace }} +{{- end -}} diff --git a/bitnami/nginx-ingress-controller/templates/controller-configmap.yaml b/bitnami/nginx-ingress-controller/templates/controller-configmap.yaml new file mode 100644 index 000000000..ef9372f14 --- /dev/null +++ b/bitnami/nginx-ingress-controller/templates/controller-configmap.yaml @@ -0,0 +1,18 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + app: {{ template "nginx-ingress.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version }} + component: "{{ .Values.controller.name }}" + heritage: {{ .Release.Service }} + release: {{ .Release.Name }} + name: {{ template "nginx-ingress.controller.fullname" . }} +data: + enable-vts-status: "{{ .Values.controller.stats.enabled }}" +{{- if .Values.controller.headers }} + proxy-set-headers: {{ .Release.Namespace }}/{{ template "nginx-ingress.fullname" . }}-custom-headers +{{- end }} +{{- if .Values.controller.config }} +{{ toYaml .Values.controller.config | indent 2 }} +{{- end }} diff --git a/bitnami/nginx-ingress-controller/templates/controller-daemonset.yaml b/bitnami/nginx-ingress-controller/templates/controller-daemonset.yaml new file mode 100644 index 000000000..b945f4f46 --- /dev/null +++ b/bitnami/nginx-ingress-controller/templates/controller-daemonset.yaml @@ -0,0 +1,205 @@ +{{- if eq .Values.controller.kind "DaemonSet" }} +apiVersion: extensions/v1beta1 +kind: DaemonSet +metadata: + labels: + app: {{ template "nginx-ingress.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version }} + component: "{{ .Values.controller.name }}" + heritage: {{ .Release.Service }} + release: {{ .Release.Name }} + name: {{ template "nginx-ingress.controller.fullname" . }} +spec: + revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} + updateStrategy: +{{ toYaml .Values.controller.updateStrategy | indent 4 }} + minReadySeconds: {{ .Values.controller.minReadySeconds }} + template: + metadata: + annotations: + checksum/config: {{ include (print $.Template.BasePath "/controller-configmap.yaml") . | sha256sum }} + {{- if .Values.controller.podAnnotations }} +{{ toYaml .Values.controller.podAnnotations | indent 8}} + {{- end }} + labels: + app: {{ template "nginx-ingress.name" . }} + component: "{{ .Values.controller.name }}" + release: {{ .Release.Name }} + {{- if .Values.controller.podLabels }} +{{ toYaml .Values.controller.podLabels | indent 8}} + {{- end }} + spec: + dnsPolicy: {{ .Values.controller.dnsPolicy }} + {{- if .Values.imagePullSecrets }} + imagePullSecrets: +{{ toYaml .Values.imagePullSecrets | indent 8 }} + {{- end }} +{{- if .Values.controller.priorityClassName }} + priorityClassName: "{{ .Values.controller.priorityClassName }}" +{{- end }} + containers: + - name: {{ template "nginx-ingress.name" . }}-{{ .Values.controller.name }} + image: "{{ .Values.controller.image.repository }}:{{ .Values.controller.image.tag }}" + imagePullPolicy: "{{ .Values.controller.image.pullPolicy }}" + {{- if .Values.controller.lifecycle }} + lifecycle: +{{ toYaml .Values.controller.lifecycle | indent 12 }} + {{- end }} + args: + - /nginx-ingress-controller + - --default-backend-service={{ if .Values.defaultBackend.enabled }}{{ .Release.Namespace }}/{{ template "nginx-ingress.defaultBackend.fullname" . }}{{ else }}{{ .Values.controller.defaultBackendService }}{{ end }} + {{- if and (semverCompare ">=0.9.0-beta.1" .Values.controller.image.tag) .Values.controller.publishService.enabled }} + - --publish-service={{ template "nginx-ingress.controller.publishServicePath" . }} + {{- end }} + {{- if (semverCompare ">=0.9.0-beta.1" .Values.controller.image.tag) }} + - --election-id={{ .Values.controller.electionID }} + {{- end }} + {{- if (semverCompare ">=0.9.0-beta.1" .Values.controller.image.tag) }} + - --ingress-class={{ .Values.controller.ingressClass }} + {{- end }} + {{- if (semverCompare ">=0.9.0-beta.1" .Values.controller.image.tag) }} + - --configmap={{ .Release.Namespace }}/{{ template "nginx-ingress.controller.fullname" . }} + {{- else }} + - --nginx-configmap={{ .Release.Namespace }}/{{ template "nginx-ingress.controller.fullname" . }} + {{- end }} + {{- if .Values.tcp }} + - --tcp-services-configmap={{ .Release.Namespace }}/{{ template "nginx-ingress.fullname" . }}-tcp + {{- end }} + {{- if .Values.udp }} + - --udp-services-configmap={{ .Release.Namespace }}/{{ template "nginx-ingress.fullname" . }}-udp + {{- end }} + {{- if .Values.controller.scope.enabled }} + - --watch-namespace={{ default .Release.Namespace .Values.controller.scope.namespace }} + {{- end }} + {{- range $key, $value := .Values.controller.extraArgs }} + {{- if $value }} + - --{{ $key }}={{ $value }} + {{- else }} + - --{{ $key }} + {{- end }} + {{- end }} + {{- if (semverCompare ">=0.16.0" .Values.controller.image.tag) }} + securityContext: + capabilities: + drop: + - ALL + add: + - NET_BIND_SERVICE + # www-data -> 33 + runAsUser: 33 + {{- end }} + env: + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + {{- if .Values.controller.extraEnvs }} +{{ toYaml .Values.controller.extraEnvs | indent 12 }} + {{- end }} + livenessProbe: + httpGet: + path: /healthz + port: {{ .Values.controller.livenessProbe.port }} + scheme: HTTP + initialDelaySeconds: {{ .Values.controller.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.controller.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.controller.livenessProbe.timeoutSeconds }} + successThreshold: {{ .Values.controller.livenessProbe.successThreshold }} + failureThreshold: {{ .Values.controller.livenessProbe.failureThreshold }} + ports: + - name: http + containerPort: 80 + protocol: TCP + {{- if .Values.controller.daemonset.useHostPort }} + hostPort: {{ .Values.controller.daemonset.hostPorts.http }} + {{- end }} + - name: https + containerPort: 443 + protocol: TCP + {{- if .Values.controller.daemonset.useHostPort }} + hostPort: {{ .Values.controller.daemonset.hostPorts.https }} + {{- end }} + {{- if .Values.controller.stats.enabled }} + - name: stats + containerPort: 18080 + protocol: TCP + {{- if .Values.controller.metrics.enabled }} + - name: metrics + containerPort: 10254 + protocol: TCP + {{- end }} + {{- end }} + {{- range $key, $value := .Values.tcp }} + - name: "{{ $key }}-tcp" + containerPort: {{ $key }} + protocol: TCP + {{- end }} + {{- range $key, $value := .Values.udp }} + - name: "{{ $key }}-udp" + containerPort: {{ $key }} + protocol: UDP + {{- end }} + readinessProbe: + httpGet: + path: /healthz + port: {{ .Values.controller.readinessProbe.port }} + scheme: HTTP + initialDelaySeconds: {{ .Values.controller.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.controller.readinessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.controller.readinessProbe.timeoutSeconds }} + successThreshold: {{ .Values.controller.readinessProbe.successThreshold }} + failureThreshold: {{ .Values.controller.readinessProbe.failureThreshold }} +{{- if (or .Values.controller.customTemplate.configMapName .Values.controller.extraVolumeMounts) }} + volumeMounts: +{{- end }} +{{- if .Values.controller.customTemplate.configMapName }} + - mountPath: /etc/nginx/template + name: nginx-template-volume + readOnly: true +{{- end }} +{{- if .Values.controller.extraVolumeMounts }} +{{ toYaml .Values.controller.extraVolumeMounts | indent 10}} +{{- end }} + resources: +{{ toYaml .Values.controller.resources | indent 12 }} +{{- if .Values.controller.extraContainers }} +{{ toYaml .Values.controller.extraContainers | indent 8}} +{{- end }} +{{- if .Values.controller.extraInitContainers }} + initContainers: +{{ toYaml .Values.controller.extraInitContainers | indent 8}} +{{- end }} + hostNetwork: {{ .Values.controller.hostNetwork }} + {{- if .Values.controller.nodeSelector }} + nodeSelector: +{{ toYaml .Values.controller.nodeSelector | indent 8 }} + {{- end }} + {{- if .Values.controller.tolerations }} + tolerations: +{{ toYaml .Values.controller.tolerations | indent 8 }} + {{- end }} + {{- if .Values.controller.affinity }} + affinity: +{{ toYaml .Values.controller.affinity | indent 8 }} + {{- end }} + serviceAccountName: {{ template "nginx-ingress.serviceAccountName" . }} + terminationGracePeriodSeconds: 60 +{{- if (or .Values.controller.customTemplate.configMapName .Values.controller.extraVolumes) }} + volumes: +{{- end }} +{{- if .Values.controller.customTemplate.configMapName }} + - name: nginx-template-volume + configMap: + name: {{ .Values.controller.customTemplate.configMapName }} + items: + - key: {{ .Values.controller.customTemplate.configMapKey }} + path: nginx.tmpl +{{- end }} +{{- if .Values.controller.extraVolumes }} +{{ toYaml .Values.controller.extraVolumes | indent 6}} +{{- end }} +{{- end }} diff --git a/bitnami/nginx-ingress-controller/templates/controller-deployment.yaml b/bitnami/nginx-ingress-controller/templates/controller-deployment.yaml new file mode 100644 index 000000000..384e826ff --- /dev/null +++ b/bitnami/nginx-ingress-controller/templates/controller-deployment.yaml @@ -0,0 +1,199 @@ +{{- if eq .Values.controller.kind "Deployment" }} +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + labels: + app: {{ template "nginx-ingress.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version }} + component: "{{ .Values.controller.name }}" + heritage: {{ .Release.Service }} + release: {{ .Release.Name }} + name: {{ template "nginx-ingress.controller.fullname" . }} +spec: + replicas: {{ .Values.controller.replicaCount }} + revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} + strategy: +{{ toYaml .Values.controller.updateStrategy | indent 4 }} + minReadySeconds: {{ .Values.controller.minReadySeconds }} + template: + metadata: + {{- if .Values.controller.podAnnotations }} + annotations: +{{ toYaml .Values.controller.podAnnotations | indent 8}} + {{- end }} + labels: + app: {{ template "nginx-ingress.name" . }} + component: "{{ .Values.controller.name }}" + release: {{ .Release.Name }} + {{- if .Values.controller.podLabels }} +{{ toYaml .Values.controller.podLabels | indent 8 }} + {{- end }} + spec: + dnsPolicy: {{ .Values.controller.dnsPolicy }} + {{- if .Values.imagePullSecrets }} + imagePullSecrets: +{{ toYaml .Values.imagePullSecrets | indent 8 }} + {{- end }} +{{- if .Values.controller.priorityClassName }} + priorityClassName: "{{ .Values.controller.priorityClassName }}" +{{- end }} + containers: + - name: {{ template "nginx-ingress.name" . }}-{{ .Values.controller.name }} + image: "{{ .Values.controller.image.repository }}:{{ .Values.controller.image.tag }}" + imagePullPolicy: "{{ .Values.controller.image.pullPolicy }}" + {{- if .Values.controller.lifecycle }} + lifecycle: +{{ toYaml .Values.controller.lifecycle | indent 12 }} + {{- end }} + args: + - /nginx-ingress-controller + - --default-backend-service={{ if .Values.defaultBackend.enabled }}{{ .Release.Namespace }}/{{ template "nginx-ingress.defaultBackend.fullname" . }}{{ else }}{{ .Values.controller.defaultBackendService }}{{ end }} + {{- if and (semverCompare ">=0.9.0-beta.1" .Values.controller.image.tag) .Values.controller.publishService.enabled }} + - --publish-service={{ template "nginx-ingress.controller.publishServicePath" . }} + {{- end }} + {{- if (semverCompare ">=0.9.0-beta.1" .Values.controller.image.tag) }} + - --election-id={{ .Values.controller.electionID }} + {{- end }} + {{- if (semverCompare ">=0.9.0-beta.1" .Values.controller.image.tag) }} + - --ingress-class={{ .Values.controller.ingressClass }} + {{- end }} + {{- if (semverCompare ">=0.9.0-beta.1" .Values.controller.image.tag) }} + - --configmap={{ .Release.Namespace }}/{{ template "nginx-ingress.controller.fullname" . }} + {{- else }} + - --nginx-configmap={{ .Release.Namespace }}/{{ template "nginx-ingress.controller.fullname" . }} + {{- end }} + {{- if .Values.tcp }} + - --tcp-services-configmap={{ .Release.Namespace }}/{{ template "nginx-ingress.fullname" . }}-tcp + {{- end }} + {{- if .Values.udp }} + - --udp-services-configmap={{ .Release.Namespace }}/{{ template "nginx-ingress.fullname" . }}-udp + {{- end }} + {{- if .Values.controller.scope.enabled }} + - --watch-namespace={{ default .Release.Namespace .Values.controller.scope.namespace }} + {{- end }} + {{- range $key, $value := .Values.controller.extraArgs }} + {{- if $value }} + - --{{ $key }}={{ $value }} + {{- else }} + - --{{ $key }} + {{- end }} + {{- end }} + {{- if (semverCompare ">=0.16.0" .Values.controller.image.tag) }} + securityContext: + capabilities: + drop: + - ALL + add: + - NET_BIND_SERVICE + # www-data -> 33 + runAsUser: 33 + {{- end }} + env: + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + {{- if .Values.controller.extraEnvs }} +{{ toYaml .Values.controller.extraEnvs | indent 12 }} + {{- end }} + livenessProbe: + httpGet: + path: /healthz + port: {{ .Values.controller.livenessProbe.port }} + scheme: HTTP + initialDelaySeconds: {{ .Values.controller.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.controller.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.controller.livenessProbe.timeoutSeconds }} + successThreshold: {{ .Values.controller.livenessProbe.successThreshold }} + failureThreshold: {{ .Values.controller.livenessProbe.failureThreshold }} + ports: + - name: http + containerPort: 80 + protocol: TCP + - name: https + containerPort: 443 + protocol: TCP + {{- if .Values.controller.stats.enabled }} + - name: stats + containerPort: 18080 + protocol: TCP + {{- if .Values.controller.metrics.enabled }} + - name: metrics + containerPort: 10254 + protocol: TCP + {{- end }} + {{- end }} + {{- range $key, $value := .Values.tcp }} + - name: "{{ $key }}-tcp" + containerPort: {{ $key }} + protocol: TCP + {{- end }} + {{- range $key, $value := .Values.udp }} + - name: "{{ $key }}-udp" + containerPort: {{ $key }} + protocol: UDP + {{- end }} + readinessProbe: + httpGet: + path: /healthz + port: {{ .Values.controller.readinessProbe.port }} + scheme: HTTP + initialDelaySeconds: {{ .Values.controller.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.controller.readinessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.controller.readinessProbe.timeoutSeconds }} + successThreshold: {{ .Values.controller.readinessProbe.successThreshold }} + failureThreshold: {{ .Values.controller.readinessProbe.failureThreshold }} +{{- if (or .Values.controller.customTemplate.configMapName .Values.controller.extraVolumeMounts) }} + volumeMounts: +{{- end }} +{{- if .Values.controller.customTemplate.configMapName }} + - mountPath: /etc/nginx/template + name: nginx-template-volume + readOnly: true +{{- end }} +{{- if .Values.controller.extraVolumeMounts }} +{{ toYaml .Values.controller.extraVolumeMounts | indent 12}} +{{- end }} + resources: +{{ toYaml .Values.controller.resources | indent 12 }} +{{- if .Values.controller.extraContainers }} +{{ toYaml .Values.controller.extraContainers | indent 8}} +{{- end }} +{{- if .Values.controller.extraInitContainers }} + initContainers: +{{ toYaml .Values.controller.extraInitContainers | indent 8}} +{{- end }} + hostNetwork: {{ .Values.controller.hostNetwork }} + {{- if .Values.controller.nodeSelector }} + nodeSelector: +{{ toYaml .Values.controller.nodeSelector | indent 8 }} + {{- end }} + {{- if .Values.controller.tolerations }} + tolerations: +{{ toYaml .Values.controller.tolerations | indent 8 }} + {{- end }} + {{- if .Values.controller.affinity }} + affinity: +{{ toYaml .Values.controller.affinity | indent 8 }} + {{- end }} + serviceAccountName: {{ template "nginx-ingress.serviceAccountName" . }} + terminationGracePeriodSeconds: 60 +{{- if (or .Values.controller.customTemplate.configMapName .Values.controller.extraVolumes) }} + volumes: +{{- end }} +{{- if .Values.controller.customTemplate.configMapName }} + - name: nginx-template-volume + configMap: + name: {{ .Values.controller.customTemplate.configMapName }} + items: + - key: {{ .Values.controller.customTemplate.configMapKey }} + path: nginx.tmpl +{{- end }} +{{- if .Values.controller.extraVolumes }} +{{ toYaml .Values.controller.extraVolumes | indent 8}} +{{- end }} +{{- end }} diff --git a/bitnami/nginx-ingress-controller/templates/controller-hpa.yaml b/bitnami/nginx-ingress-controller/templates/controller-hpa.yaml new file mode 100644 index 000000000..9c7f8af23 --- /dev/null +++ b/bitnami/nginx-ingress-controller/templates/controller-hpa.yaml @@ -0,0 +1,30 @@ +{{- if eq .Values.controller.kind "Deployment" }} +{{- if .Values.controller.autoscaling.enabled }} +apiVersion: autoscaling/v2beta1 +kind: HorizontalPodAutoscaler +metadata: + labels: + app: {{ template "nginx-ingress.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version }} + component: "{{ .Values.controller.name }}" + heritage: {{ .Release.Service }} + release: {{ .Release.Name }} + name: {{ template "nginx-ingress.controller.fullname" . }} +spec: + scaleTargetRef: + apiVersion: apps/v1beta1 + kind: Deployment + name: {{ template "nginx-ingress.controller.fullname" . }} + minReplicas: {{ .Values.controller.autoscaling.minReplicas }} + maxReplicas: {{ .Values.controller.autoscaling.maxReplicas }} + metrics: + - type: Resource + resource: + name: cpu + targetAverageUtilization: {{ .Values.controller.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: memory + targetAverageUtilization: {{ .Values.controller.autoscaling.targetMemoryUtilizationPercentage }} +{{- end }} +{{- end }} diff --git a/bitnami/nginx-ingress-controller/templates/controller-metrics-service.yaml b/bitnami/nginx-ingress-controller/templates/controller-metrics-service.yaml new file mode 100644 index 000000000..eeaf2976a --- /dev/null +++ b/bitnami/nginx-ingress-controller/templates/controller-metrics-service.yaml @@ -0,0 +1,38 @@ +{{- if and .Values.controller.stats.enabled .Values.controller.metrics.enabled }} +apiVersion: v1 +kind: Service +metadata: +{{- if .Values.controller.metrics.service.annotations }} + annotations: +{{ toYaml .Values.controller.metrics.service.annotations | indent 4 }} +{{- end }} + labels: + app: {{ template "nginx-ingress.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version }} + component: "{{ .Values.controller.name }}" + heritage: {{ .Release.Service }} + release: {{ .Release.Name }} + name: {{ template "nginx-ingress.controller.fullname" . }}-metrics +spec: + clusterIP: "{{ .Values.controller.metrics.service.clusterIP }}" +{{- if .Values.controller.metrics.service.externalIPs }} + externalIPs: +{{ toYaml .Values.controller.metrics.service.externalIPs | indent 4 }} +{{- end }} +{{- if .Values.controller.metrics.service.loadBalancerIP }} + loadBalancerIP: "{{ .Values.controller.metrics.service.loadBalancerIP }}" +{{- end }} +{{- if .Values.controller.metrics.service.loadBalancerSourceRanges }} + loadBalancerSourceRanges: +{{ toYaml .Values.controller.metrics.service.loadBalancerSourceRanges | indent 4 }} +{{- end }} + ports: + - name: metrics + port: {{ .Values.controller.metrics.service.servicePort }} + targetPort: metrics + selector: + app: {{ template "nginx-ingress.name" . }} + component: "{{ .Values.controller.name }}" + release: {{ .Release.Name }} + type: "{{ .Values.controller.metrics.service.type }}" +{{- end }} diff --git a/bitnami/nginx-ingress-controller/templates/controller-poddisruptionbudget.yaml b/bitnami/nginx-ingress-controller/templates/controller-poddisruptionbudget.yaml new file mode 100644 index 000000000..f2922f237 --- /dev/null +++ b/bitnami/nginx-ingress-controller/templates/controller-poddisruptionbudget.yaml @@ -0,0 +1,17 @@ +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + labels: + app: {{ template "nginx-ingress.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version }} + component: "{{ .Values.controller.name }}" + heritage: {{ .Release.Service }} + release: {{ .Release.Name }} + name: {{ template "nginx-ingress.controller.fullname" . }} +spec: + selector: + matchLabels: + app: {{ template "nginx-ingress.name" . }} + release: {{ .Release.Name }} + component: "{{ .Values.controller.name }}" + minAvailable: {{ .Values.controller.minAvailable }} diff --git a/bitnami/nginx-ingress-controller/templates/controller-service.yaml b/bitnami/nginx-ingress-controller/templates/controller-service.yaml new file mode 100644 index 000000000..23de6d5d4 --- /dev/null +++ b/bitnami/nginx-ingress-controller/templates/controller-service.yaml @@ -0,0 +1,72 @@ +apiVersion: v1 +kind: Service +metadata: +{{- if .Values.controller.service.annotations }} + annotations: +{{ toYaml .Values.controller.service.annotations | indent 4 }} +{{- end }} + labels: +{{- if .Values.controller.service.labels }} +{{ toYaml .Values.controller.service.labels | indent 4 }} +{{- end }} + app: {{ template "nginx-ingress.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version }} + component: "{{ .Values.controller.name }}" + heritage: {{ .Release.Service }} + release: {{ .Release.Name }} + name: {{ template "nginx-ingress.controller.fullname" . }} +spec: + clusterIP: "{{ .Values.controller.service.clusterIP }}" +{{- if .Values.controller.service.externalIPs }} + externalIPs: +{{ toYaml .Values.controller.service.externalIPs | indent 4 }} +{{- end }} +{{- if .Values.controller.service.loadBalancerIP }} + loadBalancerIP: "{{ .Values.controller.service.loadBalancerIP }}" +{{- end }} +{{- if .Values.controller.service.loadBalancerSourceRanges }} + loadBalancerSourceRanges: +{{ toYaml .Values.controller.service.loadBalancerSourceRanges | indent 4 }} +{{- end }} +{{- if and (semverCompare ">=1.7-0" .Capabilities.KubeVersion.GitVersion) (.Values.controller.service.externalTrafficPolicy) }} + externalTrafficPolicy: "{{ .Values.controller.service.externalTrafficPolicy }}" +{{- end }} +{{- if and (semverCompare ">=1.7-0" .Capabilities.KubeVersion.GitVersion) (.Values.controller.service.healthCheckNodePort) }} + healthCheckNodePort: {{ .Values.controller.service.healthCheckNodePort }} +{{- end }} + ports: + {{- if .Values.controller.service.enableHttp }} + - name: http + port: 80 + protocol: TCP + targetPort: {{ .Values.controller.service.targetPorts.http }} + {{- if (and (eq .Values.controller.service.type "NodePort") (not (empty .Values.controller.service.nodePorts.http))) }} + nodePort: {{ .Values.controller.service.nodePorts.http }} + {{- end }} + {{- end }} + {{- if .Values.controller.service.enableHttps }} + - name: https + port: 443 + protocol: TCP + targetPort: {{ .Values.controller.service.targetPorts.https }} + {{- if (and (eq .Values.controller.service.type "NodePort") (not (empty .Values.controller.service.nodePorts.https))) }} + nodePort: {{ .Values.controller.service.nodePorts.https }} + {{- end }} + {{- end }} + {{- range $key, $value := .Values.tcp }} + - name: "{{ $key }}-tcp" + port: {{ $key }} + protocol: TCP + targetPort: "{{ $key }}-tcp" + {{- end }} + {{- range $key, $value := .Values.udp }} + - name: "{{ $key }}-udp" + port: {{ $key }} + protocol: UDP + targetPort: "{{ $key }}-udp" + {{- end }} + selector: + app: {{ template "nginx-ingress.name" . }} + component: "{{ .Values.controller.name }}" + release: {{ .Release.Name }} + type: "{{ .Values.controller.service.type }}" diff --git a/bitnami/nginx-ingress-controller/templates/controller-stats-service.yaml b/bitnami/nginx-ingress-controller/templates/controller-stats-service.yaml new file mode 100644 index 000000000..cfa19220e --- /dev/null +++ b/bitnami/nginx-ingress-controller/templates/controller-stats-service.yaml @@ -0,0 +1,38 @@ +{{- if .Values.controller.stats.enabled }} +apiVersion: v1 +kind: Service +metadata: +{{- if .Values.controller.stats.service.annotations }} + annotations: +{{ toYaml .Values.controller.stats.service.annotations | indent 4 }} +{{- end }} + labels: + app: {{ template "nginx-ingress.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version }} + component: "{{ .Values.controller.name }}" + heritage: {{ .Release.Service }} + release: {{ .Release.Name }} + name: {{ template "nginx-ingress.controller.fullname" . }}-stats +spec: + clusterIP: "{{ .Values.controller.stats.service.clusterIP }}" +{{- if .Values.controller.stats.service.externalIPs }} + externalIPs: +{{ toYaml .Values.controller.stats.service.externalIPs | indent 4 }} +{{- end }} +{{- if .Values.controller.stats.service.loadBalancerIP }} + loadBalancerIP: "{{ .Values.controller.stats.service.loadBalancerIP }}" +{{- end }} +{{- if .Values.controller.stats.service.loadBalancerSourceRanges }} + loadBalancerSourceRanges: +{{ toYaml .Values.controller.stats.service.loadBalancerSourceRanges | indent 4 }} +{{- end }} + ports: + - name: stats + port: {{ .Values.controller.stats.service.servicePort }} + targetPort: stats + selector: + app: {{ template "nginx-ingress.name" . }} + component: "{{ .Values.controller.name }}" + release: {{ .Release.Name }} + type: "{{ .Values.controller.stats.service.type }}" +{{- end }} diff --git a/bitnami/nginx-ingress-controller/templates/default-backend-deployment.yaml b/bitnami/nginx-ingress-controller/templates/default-backend-deployment.yaml new file mode 100644 index 000000000..de5d80ec1 --- /dev/null +++ b/bitnami/nginx-ingress-controller/templates/default-backend-deployment.yaml @@ -0,0 +1,74 @@ +{{- if .Values.defaultBackend.enabled }} +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + labels: + app: {{ template "nginx-ingress.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version }} + component: "{{ .Values.defaultBackend.name }}" + heritage: {{ .Release.Service }} + release: {{ .Release.Name }} + name: {{ template "nginx-ingress.defaultBackend.fullname" . }} +spec: + replicas: {{ .Values.defaultBackend.replicaCount }} + revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} + template: + metadata: + {{- if .Values.defaultBackend.podAnnotations }} + annotations: +{{ toYaml .Values.defaultBackend.podAnnotations | indent 8 }} + {{- end }} + labels: + app: {{ template "nginx-ingress.name" . }} + component: "{{ .Values.defaultBackend.name }}" + release: {{ .Release.Name }} + {{- if .Values.defaultBackend.podLabels }} +{{ toYaml .Values.defaultBackend.podLabels | indent 8 }} + {{- end }} + spec: + {{- if .Values.imagePullSecrets }} + imagePullSecrets: +{{ toYaml .Values.imagePullSecrets | indent 8 }} + {{- end }} +{{- if .Values.defaultBackend.priorityClassName }} + priorityClassName: "{{ .Values.defaultBackend.priorityClassName }}" +{{- end }} + containers: + - name: {{ template "nginx-ingress.name" . }}-{{ .Values.defaultBackend.name }} + image: "{{ .Values.defaultBackend.image.repository }}:{{ .Values.defaultBackend.image.tag }}" + imagePullPolicy: "{{ .Values.defaultBackend.image.pullPolicy }}" + args: + {{- range $key, $value := .Values.defaultBackend.extraArgs }} + {{- if $value }} + - --{{ $key }}={{ $value }} + {{- else }} + - --{{ $key }} + {{- end }} + {{- end }} + livenessProbe: + httpGet: + path: /healthz + port: {{ .Values.defaultBackend.port }} + scheme: HTTP + initialDelaySeconds: 30 + timeoutSeconds: 5 + ports: + - name: http + containerPort: {{ .Values.defaultBackend.port }} + protocol: TCP + resources: +{{ toYaml .Values.defaultBackend.resources | indent 12 }} + {{- if .Values.defaultBackend.nodeSelector }} + nodeSelector: +{{ toYaml .Values.defaultBackend.nodeSelector | indent 8 }} + {{- end }} + {{- if .Values.defaultBackend.tolerations }} + tolerations: +{{ toYaml .Values.defaultBackend.tolerations | indent 8 }} + {{- end }} + {{- if .Values.defaultBackend.affinity }} + affinity: +{{ toYaml .Values.defaultBackend.affinity | indent 8 }} + {{- end }} + terminationGracePeriodSeconds: 60 +{{- end }} diff --git a/bitnami/nginx-ingress-controller/templates/default-backend-poddisruptionbudget.yaml b/bitnami/nginx-ingress-controller/templates/default-backend-poddisruptionbudget.yaml new file mode 100644 index 000000000..5350595a3 --- /dev/null +++ b/bitnami/nginx-ingress-controller/templates/default-backend-poddisruptionbudget.yaml @@ -0,0 +1,17 @@ +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + labels: + app: {{ template "nginx-ingress.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version }} + component: "{{ .Values.defaultBackend.name }}" + heritage: {{ .Release.Service }} + release: {{ .Release.Name }} + name: {{ template "nginx-ingress.defaultBackend.fullname" . }} +spec: + selector: + matchLabels: + app: {{ template "nginx-ingress.name" . }} + release: {{ .Release.Name }} + component: "{{ .Values.defaultBackend.name }}" + minAvailable: {{ .Values.defaultBackend.minAvailable }} diff --git a/bitnami/nginx-ingress-controller/templates/default-backend-service.yaml b/bitnami/nginx-ingress-controller/templates/default-backend-service.yaml new file mode 100644 index 000000000..8508ef059 --- /dev/null +++ b/bitnami/nginx-ingress-controller/templates/default-backend-service.yaml @@ -0,0 +1,39 @@ +{{- if .Values.defaultBackend.enabled }} +apiVersion: v1 +kind: Service +metadata: +{{- if .Values.defaultBackend.service.annotations }} + annotations: +{{ toYaml .Values.defaultBackend.service.annotations | indent 4 }} +{{- end }} + labels: + app: {{ template "nginx-ingress.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version }} + component: "{{ .Values.defaultBackend.name }}" + heritage: {{ .Release.Service }} + release: {{ .Release.Name }} + name: {{ template "nginx-ingress.defaultBackend.fullname" . }} +spec: + clusterIP: "{{ .Values.defaultBackend.service.clusterIP }}" +{{- if .Values.defaultBackend.service.externalIPs }} + externalIPs: +{{ toYaml .Values.defaultBackend.service.externalIPs | indent 4 }} +{{- end }} +{{- if .Values.defaultBackend.service.loadBalancerIP }} + loadBalancerIP: "{{ .Values.defaultBackend.service.loadBalancerIP }}" +{{- end }} +{{- if .Values.defaultBackend.service.loadBalancerSourceRanges }} + loadBalancerSourceRanges: +{{ toYaml .Values.defaultBackend.service.loadBalancerSourceRanges | indent 4 }} +{{- end }} + ports: + - name: http + port: {{ .Values.defaultBackend.service.servicePort }} + protocol: TCP + targetPort: http + selector: + app: {{ template "nginx-ingress.name" . }} + component: "{{ .Values.defaultBackend.name }}" + release: {{ .Release.Name }} + type: "{{ .Values.defaultBackend.service.type }}" +{{- end }} diff --git a/bitnami/nginx-ingress-controller/templates/headers-configmap.yaml b/bitnami/nginx-ingress-controller/templates/headers-configmap.yaml new file mode 100644 index 000000000..c85f00883 --- /dev/null +++ b/bitnami/nginx-ingress-controller/templates/headers-configmap.yaml @@ -0,0 +1,14 @@ +{{- if .Values.controller.headers }} +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + app: {{ template "nginx-ingress.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version }} + component: "{{ .Values.controller.name }}" + heritage: {{ .Release.Service }} + release: {{ .Release.Name }} + name: {{ template "nginx-ingress.fullname" . }}-custom-headers +data: +{{ toYaml .Values.controller.headers | indent 2 }} +{{- end }} diff --git a/bitnami/nginx-ingress-controller/templates/podsecuritypolicy.yaml b/bitnami/nginx-ingress-controller/templates/podsecuritypolicy.yaml new file mode 100644 index 000000000..c51d21623 --- /dev/null +++ b/bitnami/nginx-ingress-controller/templates/podsecuritypolicy.yaml @@ -0,0 +1,47 @@ +{{- if .Values.podSecurityPolicy.enabled}} +apiVersion: extensions/v1beta1 +kind: PodSecurityPolicy +metadata: + name: {{ template "nginx-ingress.fullname" . }} + labels: + app: {{ template "nginx-ingress.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version }} + heritage: {{ .Release.Service }} + release: {{ .Release.Name }} +spec: + allowedCapabilities: + - NET_BIND_SERVICE + privileged: false + allowPrivilegeEscalation: true + # Allow core volume types. + volumes: + - 'configMap' + #- 'emptyDir' + #- 'projected' + - 'secret' + #- 'downwardAPI' + hostNetwork: false + hostIPC: false + hostPID: false + runAsUser: + # Require the container to run without root privileges. + rule: 'MustRunAsNonRoot' + supplementalGroups: + rule: 'MustRunAs' + ranges: + # Forbid adding the root group. + - min: 1 + max: 65535 + fsGroup: + rule: 'MustRunAs' + ranges: + # Forbid adding the root group. + - min: 1 + max: 65535 + readOnlyRootFilesystem: false + seLinux: + rule: 'RunAsAny' + hostPorts: + - max: 65535 + min: 1 +{{- end }} diff --git a/bitnami/nginx-ingress-controller/templates/role.yaml b/bitnami/nginx-ingress-controller/templates/role.yaml new file mode 100644 index 000000000..64c47ca22 --- /dev/null +++ b/bitnami/nginx-ingress-controller/templates/role.yaml @@ -0,0 +1,89 @@ +{{- if .Values.rbac.create -}} +apiVersion: rbac.authorization.k8s.io/v1beta1 +kind: Role +metadata: + labels: + app: {{ template "nginx-ingress.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version }} + heritage: {{ .Release.Service }} + release: {{ .Release.Name }} + name: {{ template "nginx-ingress.fullname" . }} +rules: + - apiGroups: + - "" + resources: + - namespaces + verbs: + - get + - apiGroups: + - "" + resources: + - configmaps + - pods + - secrets + - endpoints + verbs: + - get + - list + - watch + - apiGroups: + - "" + resources: + - services + verbs: + - get + - list + - update + - watch + - apiGroups: + - extensions + resources: + - ingresses + verbs: + - get + - list + - watch + - apiGroups: + - extensions + resources: + - ingresses/status + verbs: + - update + - apiGroups: + - "" + resources: + - configmaps + resourceNames: + - {{ .Values.controller.electionID }}-{{ .Values.controller.ingressClass }} + verbs: + - get + - update + - apiGroups: + - "" + resources: + - configmaps + verbs: + - create + - apiGroups: + - "" + resources: + - endpoints + verbs: + - create + - get + - update + - apiGroups: + - "" + resources: + - events + verbs: + - create + - patch +{{- if .Values.podSecurityPolicy.enabled }} + - apiGroups: ['extensions'] + resources: ['podsecuritypolicies'] + verbs: ['use'] + resourceNames: [{{ template "nginx-ingress.fullname" . }}] +{{- end }} + +{{- end -}} diff --git a/bitnami/nginx-ingress-controller/templates/rolebinding.yaml b/bitnami/nginx-ingress-controller/templates/rolebinding.yaml new file mode 100644 index 000000000..f2e157f96 --- /dev/null +++ b/bitnami/nginx-ingress-controller/templates/rolebinding.yaml @@ -0,0 +1,19 @@ +{{- if .Values.rbac.create -}} +apiVersion: rbac.authorization.k8s.io/v1beta1 +kind: RoleBinding +metadata: + labels: + app: {{ template "nginx-ingress.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version }} + heritage: {{ .Release.Service }} + release: {{ .Release.Name }} + name: {{ template "nginx-ingress.fullname" . }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: {{ template "nginx-ingress.fullname" . }} +subjects: + - kind: ServiceAccount + name: {{ template "nginx-ingress.serviceAccountName" . }} + namespace: {{ .Release.Namespace }} +{{- end -}} diff --git a/bitnami/nginx-ingress-controller/templates/serviceaccount.yaml b/bitnami/nginx-ingress-controller/templates/serviceaccount.yaml new file mode 100644 index 000000000..2c6983425 --- /dev/null +++ b/bitnami/nginx-ingress-controller/templates/serviceaccount.yaml @@ -0,0 +1,11 @@ +{{- if or .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + labels: + app: {{ template "nginx-ingress.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version }} + heritage: {{ .Release.Service }} + release: {{ .Release.Name }} + name: {{ template "nginx-ingress.serviceAccountName" . }} +{{- end -}} diff --git a/bitnami/nginx-ingress-controller/templates/tcp-configmap.yaml b/bitnami/nginx-ingress-controller/templates/tcp-configmap.yaml new file mode 100644 index 000000000..fdbf28268 --- /dev/null +++ b/bitnami/nginx-ingress-controller/templates/tcp-configmap.yaml @@ -0,0 +1,14 @@ +{{- if .Values.tcp }} +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + app: {{ template "nginx-ingress.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version }} + component: "{{ .Values.controller.name }}" + heritage: {{ .Release.Service }} + release: {{ .Release.Name }} + name: {{ template "nginx-ingress.fullname" . }}-tcp +data: +{{ toYaml .Values.tcp | indent 2 }} +{{- end }} diff --git a/bitnami/nginx-ingress-controller/templates/udp-configmap.yaml b/bitnami/nginx-ingress-controller/templates/udp-configmap.yaml new file mode 100644 index 000000000..75ce16325 --- /dev/null +++ b/bitnami/nginx-ingress-controller/templates/udp-configmap.yaml @@ -0,0 +1,14 @@ +{{- if .Values.udp }} +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + app: {{ template "nginx-ingress.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version }} + component: "{{ .Values.controller.name }}" + heritage: {{ .Release.Service }} + release: {{ .Release.Name }} + name: {{ template "nginx-ingress.fullname" . }}-udp +data: +{{ toYaml .Values.udp | indent 2 }} +{{- end }} diff --git a/bitnami/nginx-ingress-controller/values.yaml b/bitnami/nginx-ingress-controller/values.yaml new file mode 100644 index 000000000..abe041e91 --- /dev/null +++ b/bitnami/nginx-ingress-controller/values.yaml @@ -0,0 +1,383 @@ +## Bitnami NGINX image version +## ref: https://hub.docker.com/r/bitnami/nginx/tags/ +controller: + name: controller + image: + registry: docker.io + repository: bitnami/nginx-ingress-controller + tag: 0.18.0-debian-9 + ## Specify a imagePullPolicy + ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' + ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images + ## + pullPolicy: IfNotPresent + + config: {} + # Will add custom header to Nginx https://github.com/kubernetes/ingress-nginx/tree/master/docs/examples/customization/custom-headers + headers: {} + + # Required for use with CNI based kubernetes installations (such as ones set up by kubeadm), + # since CNI and hostport don't mix yet. Can be deprecated once https://github.com/kubernetes/kubernetes/issues/23920 + # is merged + hostNetwork: false + + # Optionally change this to ClusterFirstWithHostNet in case you have 'hostNetwork: true'. + # By default, while using host network, name resolution uses the host's DNS. If you wish nginx-controller + # to keep resolving names inside the k8s network, use ClusterFirstWithHostNet. + dnsPolicy: ClusterFirst + + ## Use host ports 80 and 443 + daemonset: + useHostPort: false + + hostPorts: + http: 80 + https: 443 + + ## Required only if defaultBackend.enabled = false + ## Must be / + ## + defaultBackendService: "" + + ## Election ID to use for status update + ## + electionID: ingress-controller-leader + + ## Name of the ingress class to route through this controller + ## + ingressClass: nginx + + # labels to add to the pod container metadata + podLabels: {} + # key: value + + ## Allows customization of the external service + ## the ingress will be bound to via DNS + publishService: + enabled: false + ## Allows overriding of the publish service to bind to + ## Must be / + ## + pathOverride: "" + + ## Limit the scope of the controller + ## + scope: + enabled: false + namespace: "" # defaults to .Release.Namespace + + ## Additional command line arguments to pass to nginx-ingress-controller + ## E.g. to specify the default SSL certificate you can use + ## extraArgs: + ## default-ssl-certificate: "/" + extraArgs: {} + + ## Additional environment variables to set + extraEnvs: [] + # extraEnvs: + # - name: FOO + # valueFrom: + # secretKeyRef: + # key: FOO + # name: secret-resource + + ## DaemonSet or Deployment + ## + kind: Deployment + + # The update strategy to apply to the Deployment or DaemonSet + ## + updateStrategy: {} + # rollingUpdate: + # maxUnavailable: 1 + # type: RollingUpdate + + # minReadySeconds to avoid killing pods before we are ready + ## + minReadySeconds: 0 + + ## Node tolerations for server scheduling to nodes with taints + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ + ## + tolerations: [] + # - key: "key" + # operator: "Equal|Exists" + # value: "value" + # effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)" + + affinity: {} + + ## Node labels for controller pod assignment + ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Liveness and readiness probe values + ## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + ## + livenessProbe: + failureThreshold: 3 + initialDelaySeconds: 10 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 1 + port: 10254 + readinessProbe: + failureThreshold: 3 + initialDelaySeconds: 10 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 1 + port: 10254 + + ## Annotations to be added to controller pods + ## + podAnnotations: {} + + replicaCount: 1 + + minAvailable: 1 + + resources: {} + # limits: + # cpu: 100m + # memory: 64Mi + # requests: + # cpu: 100m + # memory: 64Mi + + autoscaling: + enabled: false + # minReplicas: 1 + # maxReplicas: 11 + # targetCPUUtilizationPercentage: 50 + # targetMemoryUtilizationPercentage: 50 + + ## Override NGINX template + customTemplate: + configMapName: "" + configMapKey: "" + + service: + annotations: {} + labels: {} + clusterIP: "" + + ## List of IP addresses at which the controller services are available + ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips + ## + externalIPs: [] + + loadBalancerIP: "" + loadBalancerSourceRanges: [] + + enableHttp: true + enableHttps: true + + ## Set external traffic policy to: "Local" to preserve source IP on + ## providers supporting it + ## Ref: https://kubernetes.io/docs/tutorials/services/source-ip/#source-ip-for-services-with-typeloadbalancer + externalTrafficPolicy: "" + + healthCheckNodePort: 0 + + targetPorts: + http: http + https: https + + type: LoadBalancer + + # type: NodePort + # nodePorts: + # http: 32080 + # https: 32443 + nodePorts: + http: "" + https: "" + + extraContainers: [] + ## Additional containers to be added to the controller pod. + ## See https://github.com/lemonldap-ng-controller/lemonldap-ng-controller as example. + # - name: my-sidecar + # image: nginx:latest + # - name: lemonldap-ng-controller + # image: lemonldapng/lemonldap-ng-controller:0.2.0 + # args: + # - /lemonldap-ng-controller + # - --alsologtostderr + # - --configmap=$(POD_NAMESPACE)/lemonldap-ng-configuration + # env: + # - name: POD_NAME + # valueFrom: + # fieldRef: + # fieldPath: metadata.name + # - name: POD_NAMESPACE + # valueFrom: + # fieldRef: + # fieldPath: metadata.namespace + # volumeMounts: + # - name: copy-portal-skins + # mountPath: /srv/var/lib/lemonldap-ng/portal/skins + + extraVolumeMounts: [] + ## Additional volumeMounts to the controller main container. + # - name: copy-portal-skins + # mountPath: /var/lib/lemonldap-ng/portal/skins + + extraVolumes: [] + ## Additional volumes to the controller pod. + # - name: copy-portal-skins + # emptyDir: {} + + extraInitContainers: [] + ## Containers, which are run before the app containers are started. + # - name: init-myservice + # image: busybox + # command: ['sh', '-c', 'until nslookup myservice; do echo waiting for myservice; sleep 2; done;'] + + stats: + enabled: false + + service: + annotations: {} + clusterIP: "" + + ## List of IP addresses at which the stats service is available + ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips + ## + externalIPs: [] + + loadBalancerIP: "" + loadBalancerSourceRanges: [] + servicePort: 18080 + type: ClusterIP + + ## If controller.stats.enabled = true and controller.metrics.enabled = true, Prometheus metrics will be exported + ## + metrics: + enabled: false + + service: + annotations: {} + # prometheus.io/scrape: "true" + # prometheus.io/port: "10254" + + clusterIP: "" + + ## List of IP addresses at which the stats-exporter service is available + ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips + ## + externalIPs: [] + + loadBalancerIP: "" + loadBalancerSourceRanges: [] + servicePort: 9913 + type: ClusterIP + + lifecycle: {} + + priorityClassName: "" + +## Rollback limit +## +revisionHistoryLimit: 10 + +## Default 404 backend +## +defaultBackend: + + ## If false, controller.defaultBackendService must be provided + ## + enabled: true + + name: default-backend + image: + repository: k8s.gcr.io/defaultbackend + tag: "1.4" + pullPolicy: IfNotPresent + + extraArgs: {} + + port: 8080 + + ## Node tolerations for server scheduling to nodes with taints + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ + ## + tolerations: [] + # - key: "key" + # operator: "Equal|Exists" + # value: "value" + # effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)" + + affinity: {} + + # labels to add to the pod container metadata + podLabels: {} + # key: value + + ## Node labels for default backend pod assignment + ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Annotations to be added to default backend pods + ## + podAnnotations: {} + + replicaCount: 1 + + minAvailable: 1 + + resources: {} + # limits: + # cpu: 10m + # memory: 20Mi + # requests: + # cpu: 10m + # memory: 20Mi + + service: + annotations: {} + clusterIP: "" + + ## List of IP addresses at which the default backend service is available + ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips + ## + externalIPs: [] + + loadBalancerIP: "" + loadBalancerSourceRanges: [] + servicePort: 80 + type: ClusterIP + + priorityClassName: "" + +## Enable RBAC as per https://github.com/kubernetes/ingress/tree/master/examples/rbac/nginx and https://github.com/kubernetes/ingress/issues/266 +rbac: + create: true + +# If true, create & use Pod Security Policy resources +# https://kubernetes.io/docs/concepts/policy/pod-security-policy/ +podSecurityPolicy: + enabled: false + +serviceAccount: + create: true + name: + +## Optional array of imagePullSecrets containing private registry credentials +## Ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ +imagePullSecrets: [] +# - name: secretName + +# TCP service key:value pairs +# Ref: https://github.com/kubernetes/contrib/tree/master/ingress/controllers/nginx/examples/tcp +## +tcp: {} +# 8080: "default/example-tcp-svc:9000" + +# UDP service key:value pairs +# Ref: https://github.com/kubernetes/contrib/tree/master/ingress/controllers/nginx/examples/udp +## +udp: {} +# 53: "kube-system/kube-dns:53" From 1f7ac44bf09881f377d401592ae4a8ea6d72a17b Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez Hernandez Date: Tue, 4 Sep 2018 09:58:04 +0000 Subject: [PATCH 2/6] Remove 'controller' level --- bitnami/nginx-ingress-controller/README.md | 162 +++--- .../templates/NOTES.txt | 24 +- .../templates/_helpers.tpl | 21 +- .../templates/clusterrole.yaml | 6 +- .../templates/clusterrolebinding.yaml | 2 +- .../templates/controller-configmap.yaml | 12 +- .../templates/controller-daemonset.yaml | 148 +++--- .../templates/controller-deployment.yaml | 142 +++--- .../templates/controller-hpa.yaml | 18 +- .../templates/controller-metrics-service.yaml | 30 +- .../controller-poddisruptionbudget.yaml | 8 +- .../templates/controller-service.yaml | 54 +- .../templates/controller-stats-service.yaml | 30 +- .../templates/headers-configmap.yaml | 6 +- .../templates/role.yaml | 2 +- .../templates/tcp-configmap.yaml | 2 +- .../templates/udp-configmap.yaml | 2 +- bitnami/nginx-ingress-controller/values.yaml | 473 +++++++++--------- 18 files changed, 564 insertions(+), 578 deletions(-) diff --git a/bitnami/nginx-ingress-controller/README.md b/bitnami/nginx-ingress-controller/README.md index dabca0227..d5c1eb6df 100644 --- a/bitnami/nginx-ingress-controller/README.md +++ b/bitnami/nginx-ingress-controller/README.md @@ -46,87 +46,87 @@ The following tables lists the configurable parameters of the nginx-ingress-cont Parameter | Description | Default --- | --- | --- -`controller.name` | name of the controller component | `controller` -`controller.image.registry` | name of the container image registry | `docker.io` -`controller.image.repository` | controller container image repository | `bitnami/nginx-ingress-controller` -`controller.image.tag` | controller container image tag | `0.18.0-debian-9` -`controller.image.pullPolicy` | controller container image pull policy | `IfNotPresent` -`controller.config` | nginx ConfigMap entries | none -`controller.hostNetwork` | If the nginx deployment / daemonset should run on the host's network namespace. Do not set this when `controller.service.externalIPs` is set and `kube-proxy` is used as there will be a port-conflict for port `80` | false -`controller.defaultBackendService` | default 404 backend service; required only if `defaultBackend.enabled = false` | `""` -`controller.electionID` | election ID to use for the status update | `ingress-controller-leader` -`controller.extraEnvs` | any additional environment variables to set in the pods | `{}` -`controller.extraContainers` | Sidecar containers to add to the controller pod. See [LemonLDAP::NG controller](https://github.com/lemonldap-ng-controller/lemonldap-ng-controller) as example | `{}` -`controller.extraVolumeMounts` | Additional volumeMounts to the controller main container | `{}` -`controller.extraVolumes` | Additional volumes to the controller pod | `{}` -`controller.extraInitContainers` | Containers, which are run before the app containers are started | `[]` -`controller.ingressClass` | name of the ingress class to route through this controller | `nginx` -`controller.scope.enabled` | limit the scope of the ingress controller | `false` (watch all namespaces) -`controller.scope.namespace` | namespace to watch for ingress | `""` (use the release namespace) -`controller.extraArgs` | Additional controller container arguments | `{}` -`controller.kind` | install as Deployment or DaemonSet | `Deployment` -`controller.daemonset.useHostPort` | If `controller.kind` is `DaemonSet`, this will enable `hostPort` for TCP/80 and TCP/443 | false -`controller.daemonset.hostPorts.http` | If `controller.daemonset.useHostPort` is `true` and this is non-empty, it sets the hostPort | `"80"` -`controller.daemonset.hostPorts.https` | If `controller.daemonset.useHostPort` is `true` and this is non-empty, it sets the hostPort | `"443"` -`controller.tolerations` | node taints to tolerate (requires Kubernetes >=1.6) | `[]` -`controller.affinity` | node/pod affinities (requires Kubernetes >=1.6) | `{}` -`controller.minReadySeconds` | how many seconds a pod needs to be ready before killing the next, during update | `0` -`controller.nodeSelector` | node labels for pod assignment | `{}` -`controller.podAnnotations` | annotations to be added to pods | `{}` -`controller.podLabels` | labels to add to the pod container metadata | `{}` -`controller.replicaCount` | desired number of controller pods | `1` -`controller.minAvailable` | minimum number of available controller pods for PodDisruptionBudget | `1` -`controller.resources` | controller pod resource requests & limits | `{}` -`controller.priorityClassName` | controller priorityClassName | `nil` -`controller.lifecycle` | controller pod lifecycle hooks | `{}` -`controller.service.annotations` | annotations for controller service | `{}` -`controller.service.labels` | labels for controller service | `{}` -`controller.publishService.enabled` | if true, the controller will set the endpoint records on the ingress objects to reflect those on the service | `false` -`controller.publishService.pathOverride` | override of the default publish-service name | `""` -`controller.service.clusterIP` | internal controller cluster service IP | `""` -`controller.service.externalIPs` | controller service external IP addresses. Do not set this when `controller.hostNetwork` is set to `true` and `kube-proxy` is used as there will be a port-conflict for port `80` | `[]` -`controller.service.externalTrafficPolicy` | If `controller.service.type` is `NodePort` or `LoadBalancer`, set this to `Local` to enable [source IP preservation](https://kubernetes.io/docs/tutorials/services/source-ip/#source-ip-for-services-with-typenodeport) | `"Cluster"` -`controller.service.healthCheckNodePort` | If `controller.service.type` is `NodePort` or `LoadBalancer` and `controller.service.externalTrafficPolicy` is set to `Local`, set this to [the managed health-check port the kube-proxy will expose](https://kubernetes.io/docs/tutorials/services/source-ip/#source-ip-for-services-with-typenodeport). If blank, a random port in the `NodePort` range will be assigned | `""` -`controller.service.loadBalancerIP` | IP address to assign to load balancer (if supported) | `""` -`controller.service.loadBalancerSourceRanges` | list of IP CIDRs allowed access to load balancer (if supported) | `[]` -`controller.service.enableHttp` | if port 80 should be opened for service | `true` -`controller.service.enableHttps` | if port 443 should be opened for service | `true` -`controller.service.targetPorts.http` | Sets the targetPort that maps to the Ingress' port 80 | `80` -`controller.service.targetPorts.https` | Sets the targetPort that maps to the Ingress' port 443 | `443` -`controller.service.type` | type of controller service to create | `LoadBalancer` -`controller.service.nodePorts.http` | If `controller.service.type` is `NodePort` and this is non-empty, it sets the nodePort that maps to the Ingress' port 80 | `""` -`controller.service.nodePorts.https` | If `controller.service.type` is `NodePort` and this is non-empty, it sets the nodePort that maps to the Ingress' port 443 | `""` -`controller.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated | 10 -`controller.livenessProbe.periodSeconds` | How often to perform the probe | 10 -`controller.livenessProbe.timeoutSeconds` | When the probe times out | 5 -`controller.livenessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed. | 1 -`controller.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | 3 -`controller.livenessProbe.port` | The port number that the liveness probe will listen on. | 10254 -`controller.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated | 10 -`controller.readinessProbe.periodSeconds` | How often to perform the probe | 10 -`controller.readinessProbe.timeoutSeconds` | When the probe times out | 1 -`controller.readinessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed. | 1 -`controller.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | 3 -`controller.readinessProbe.port` | The port number that the readiness probe will listen on. | 10254 -`controller.stats.enabled` | if `true`, enable "vts-status" page | `false` -`controller.stats.service.annotations` | annotations for controller stats service | `{}` -`controller.stats.service.clusterIP` | internal controller stats cluster service IP | `""` -`controller.stats.service.externalIPs` | controller service stats external IP addresses | `[]` -`controller.stats.service.loadBalancerIP` | IP address to assign to load balancer (if supported) | `""` -`controller.stats.service.loadBalancerSourceRanges` | list of IP CIDRs allowed access to load balancer (if supported) | `[]` -`controller.stats.service.type` | type of controller stats service to create | `ClusterIP` -`controller.metrics.enabled` | if `true`, enable Prometheus metrics (`controller.stats.enabled` must be `true` as well) | `false` -`controller.metrics.service.annotations` | annotations for Prometheus metrics service | `{}` -`controller.metrics.service.clusterIP` | cluster IP address to assign to service | `""` -`controller.metrics.service.externalIPs` | Prometheus metrics service external IP addresses | `[]` -`controller.metrics.service.loadBalancerIP` | IP address to assign to load balancer (if supported) | `""` -`controller.metrics.service.loadBalancerSourceRanges` | list of IP CIDRs allowed access to load balancer (if supported) | `[]` -`controller.metrics.service.servicePort` | Prometheus metrics service port | `9913` -`controller.metrics.service.type` | type of Prometheus metrics service to create | `ClusterIP` -`controller.customTemplate.configMapName` | configMap containing a custom nginx template | `""` -`controller.customTemplate.configMapKey` | configMap key containing the nginx template | `""` -`controller.headers` | configMap key:value pairs containing the [custom headers](https://github.com/kubernetes/ingress-nginx/tree/master/docs/examples/customization/custom-headers) for Nginx | `{}` -`controller.updateStrategy` | allows setting of RollingUpdate strategy | `{}` +`name` | name of the controller component | `controller` +`image.registry` | name of the container image registry | `docker.io` +`image.repository` | controller container image repository | `bitnami/nginx-ingress-controller` +`image.tag` | controller container image tag | `0.18.0-debian-9` +`image.pullPolicy` | controller container image pull policy | `IfNotPresent` +`config` | nginx ConfigMap entries | none +`hostNetwork` | If the nginx deployment / daemonset should run on the host's network namespace. Do not set this when `controller.service.externalIPs` is set and `kube-proxy` is used as there will be a port-conflict for port `80` | false +`defaultBackendService` | default 404 backend service; required only if `defaultBackend.enabled = false` | `""` +`electionID` | election ID to use for the status update | `ingress-controller-leader` +`extraEnvs` | any additional environment variables to set in the pods | `{}` +`extraContainers` | Sidecar containers to add to the controller pod. See [LemonLDAP::NG controller](https://github.com/lemonldap-ng-controller/lemonldap-ng-controller) as example | `{}` +`extraVolumeMounts` | Additional volumeMounts to the controller main container | `{}` +`extraVolumes` | Additional volumes to the controller pod | `{}` +`extraInitContainers` | Containers, which are run before the app containers are started | `[]` +`ingressClass` | name of the ingress class to route through this controller | `nginx` +`scope.enabled` | limit the scope of the ingress controller | `false` (watch all namespaces) +`scope.namespace` | namespace to watch for ingress | `""` (use the release namespace) +`extraArgs` | Additional controller container arguments | `{}` +`kind` | install as Deployment or DaemonSet | `Deployment` +`daemonset.useHostPort` | If `controller.kind` is `DaemonSet`, this will enable `hostPort` for TCP/80 and TCP/443 | false +`daemonset.hostPorts.http` | If `controller.daemonset.useHostPort` is `true` and this is non-empty, it sets the hostPort | `"80"` +`daemonset.hostPorts.https` | If `controller.daemonset.useHostPort` is `true` and this is non-empty, it sets the hostPort | `"443"` +`tolerations` | node taints to tolerate (requires Kubernetes >=1.6) | `[]` +`affinity` | node/pod affinities (requires Kubernetes >=1.6) | `{}` +`minReadySeconds` | how many seconds a pod needs to be ready before killing the next, during update | `0` +`nodeSelector` | node labels for pod assignment | `{}` +`podAnnotations` | annotations to be added to pods | `{}` +`podLabels` | labels to add to the pod container metadata | `{}` +`replicaCount` | desired number of controller pods | `1` +`minAvailable` | minimum number of available controller pods for PodDisruptionBudget | `1` +`resources` | controller pod resource requests & limits | `{}` +`priorityClassName` | controller priorityClassName | `nil` +`lifecycle` | controller pod lifecycle hooks | `{}` +`service.annotations` | annotations for controller service | `{}` +`service.labels` | labels for controller service | `{}` +`publishService.enabled` | if true, the controller will set the endpoint records on the ingress objects to reflect those on the service | `false` +`publishService.pathOverride` | override of the default publish-service name | `""` +`service.clusterIP` | internal controller cluster service IP | `""` +`service.externalIPs` | controller service external IP addresses. Do not set this when `controller.hostNetwork` is set to `true` and `kube-proxy` is used as there will be a port-conflict for port `80` | `[]` +`service.externalTrafficPolicy` | If `controller.service.type` is `NodePort` or `LoadBalancer`, set this to `Local` to enable [source IP preservation](https://kubernetes.io/docs/tutorials/services/source-ip/#source-ip-for-services-with-typenodeport) | `"Cluster"` +`service.healthCheckNodePort` | If `controller.service.type` is `NodePort` or `LoadBalancer` and `controller.service.externalTrafficPolicy` is set to `Local`, set this to [the managed health-check port the kube-proxy will expose](https://kubernetes.io/docs/tutorials/services/source-ip/#source-ip-for-services-with-typenodeport). If blank, a random port in the `NodePort` range will be assigned | `""` +`service.loadBalancerIP` | IP address to assign to load balancer (if supported) | `""` +`service.loadBalancerSourceRanges` | list of IP CIDRs allowed access to load balancer (if supported) | `[]` +`service.enableHttp` | if port 80 should be opened for service | `true` +`service.enableHttps` | if port 443 should be opened for service | `true` +`service.targetPorts.http` | Sets the targetPort that maps to the Ingress' port 80 | `80` +`service.targetPorts.https` | Sets the targetPort that maps to the Ingress' port 443 | `443` +`service.type` | type of controller service to create | `LoadBalancer` +`service.nodePorts.http` | If `controller.service.type` is `NodePort` and this is non-empty, it sets the nodePort that maps to the Ingress' port 80 | `""` +`service.nodePorts.https` | If `controller.service.type` is `NodePort` and this is non-empty, it sets the nodePort that maps to the Ingress' port 443 | `""` +`livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated | 10 +`livenessProbe.periodSeconds` | How often to perform the probe | 10 +`livenessProbe.timeoutSeconds` | When the probe times out | 5 +`livenessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed. | 1 +`livenessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | 3 +`livenessProbe.port` | The port number that the liveness probe will listen on. | 10254 +`readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated | 10 +`readinessProbe.periodSeconds` | How often to perform the probe | 10 +`readinessProbe.timeoutSeconds` | When the probe times out | 1 +`readinessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed. | 1 +`readinessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | 3 +`readinessProbe.port` | The port number that the readiness probe will listen on. | 10254 +`stats.enabled` | if `true`, enable "vts-status" page | `false` +`stats.service.annotations` | annotations for controller stats service | `{}` +`stats.service.clusterIP` | internal controller stats cluster service IP | `""` +`stats.service.externalIPs` | controller service stats external IP addresses | `[]` +`stats.service.loadBalancerIP` | IP address to assign to load balancer (if supported) | `""` +`stats.service.loadBalancerSourceRanges` | list of IP CIDRs allowed access to load balancer (if supported) | `[]` +`stats.service.type` | type of controller stats service to create | `ClusterIP` +`metrics.enabled` | if `true`, enable Prometheus metrics (`controller.stats.enabled` must be `true` as well) | `false` +`metrics.service.annotations` | annotations for Prometheus metrics service | `{}` +`metrics.service.clusterIP` | cluster IP address to assign to service | `""` +`metrics.service.externalIPs` | Prometheus metrics service external IP addresses | `[]` +`metrics.service.loadBalancerIP` | IP address to assign to load balancer (if supported) | `""` +`metrics.service.loadBalancerSourceRanges` | list of IP CIDRs allowed access to load balancer (if supported) | `[]` +`metrics.service.servicePort` | Prometheus metrics service port | `9913` +`metrics.service.type` | type of Prometheus metrics service to create | `ClusterIP` +`customTemplate.configMapName` | configMap containing a custom nginx template | `""` +`customTemplate.configMapKey` | configMap key containing the nginx template | `""` +`headers` | configMap key:value pairs containing the [custom headers](https://github.com/kubernetes/ingress-nginx/tree/master/docs/examples/customization/custom-headers) for Nginx | `{}` +`updateStrategy` | allows setting of RollingUpdate strategy | `{}` `defaultBackend.enabled` | If false, controller.defaultBackendService must be provided | `true` `defaultBackend.name` | name of the default backend component | `default-backend` `defaultBackend.image.repository` | default backend container image repository | `k8s.gcr.io/defaultbackend` diff --git a/bitnami/nginx-ingress-controller/templates/NOTES.txt b/bitnami/nginx-ingress-controller/templates/NOTES.txt index 2b73f8767..b7a58125f 100644 --- a/bitnami/nginx-ingress-controller/templates/NOTES.txt +++ b/bitnami/nginx-ingress-controller/templates/NOTES.txt @@ -1,28 +1,28 @@ The nginx-ingress controller has been installed. -{{- if contains "NodePort" .Values.controller.service.type }} +{{- if contains "NodePort" .Values.service.type }} Get the application URL by running these commands: -{{- if (not (empty .Values.controller.service.nodePorts.http)) }} - export HTTP_NODE_PORT={{ .Values.controller.service.nodePorts.http }} +{{- if (not (empty .Values.service.nodePorts.http)) }} + export HTTP_NODE_PORT={{ .Values.service.nodePorts.http }} {{- else }} - export HTTP_NODE_PORT=$(kubectl --namespace {{ .Release.Namespace }} get services -o jsonpath="{.spec.ports[0].nodePort}" {{ template "nginx-ingress.controller.fullname" . }}) + export HTTP_NODE_PORT=$(kubectl --namespace {{ .Release.Namespace }} get services -o jsonpath="{.spec.ports[0].nodePort}" {{ template "nginx-ingress.fullname" . }}) {{- end }} -{{- if (not (empty .Values.controller.service.nodePorts.https)) }} - export HTTPS_NODE_PORT={{ .Values.controller.service.nodePorts.https }} +{{- if (not (empty .Values.service.nodePorts.https)) }} + export HTTPS_NODE_PORT={{ .Values.service.nodePorts.https }} {{- else }} - export HTTPS_NODE_PORT=$(kubectl --namespace {{ .Release.Namespace }} get services -o jsonpath="{.spec.ports[1].nodePort}" {{ template "nginx-ingress.controller.fullname" . }}) + export HTTPS_NODE_PORT=$(kubectl --namespace {{ .Release.Namespace }} get services -o jsonpath="{.spec.ports[1].nodePort}" {{ template "nginx-ingress.fullname" . }}) {{- end }} export NODE_IP=$(kubectl --namespace {{ .Release.Namespace }} get nodes -o jsonpath="{.items[0].status.addresses[1].address}") echo "Visit http://$NODE_IP:$HTTP_NODE_PORT to access your application via HTTP." echo "Visit https://$NODE_IP:$HTTPS_NODE_PORT to access your application via HTTPS." -{{- else if contains "LoadBalancer" .Values.controller.service.type }} +{{- else if contains "LoadBalancer" .Values.service.type }} It may take a few minutes for the LoadBalancer IP to be available. -You can watch the status by running 'kubectl --namespace {{ .Release.Namespace }} get services -o wide -w {{ template "nginx-ingress.controller.fullname" . }}' -{{- else if contains "ClusterIP" .Values.controller.service.type }} +You can watch the status by running 'kubectl --namespace {{ .Release.Namespace }} get services -o wide -w {{ template "nginx-ingress.fullname" . }}' +{{- else if contains "ClusterIP" .Values.service.type }} Get the application URL by running these commands: - export POD_NAME=$(kubectl --namespace {{ .Release.Namespace }} get pods -o jsonpath="{.items[0].metadata.name}" -l "app={{ template "nginx-ingress.name" . }},component={{ .Values.controller.name }},release={{ .Release.Name }}") + export POD_NAME=$(kubectl --namespace {{ .Release.Namespace }} get pods -o jsonpath="{.items[0].metadata.name}" -l "app={{ template "nginx-ingress.name" . }},component={{ .Values.name }},release={{ .Release.Name }}") kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80 echo "Visit http://127.0.0.1:8080 to access your application." {{- end }} @@ -33,7 +33,7 @@ An example Ingress that makes use of the controller: kind: Ingress metadata: annotations: - kubernetes.io/ingress.class: {{ .Values.controller.ingressClass }} + kubernetes.io/ingress.class: {{ .Values.ingressClass }} name: example namespace: foo spec: diff --git a/bitnami/nginx-ingress-controller/templates/_helpers.tpl b/bitnami/nginx-ingress-controller/templates/_helpers.tpl index c2ba89282..bda931375 100644 --- a/bitnami/nginx-ingress-controller/templates/_helpers.tpl +++ b/bitnami/nginx-ingress-controller/templates/_helpers.tpl @@ -19,31 +19,18 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this {{- end -}} {{- end -}} -{{/* -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). -*/}} -{{- define "nginx-ingress.controller.fullname" -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- printf "%s-%s" .Release.Name .Values.controller.name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s-%s" .Release.Name $name .Values.controller.name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} - {{/* Construct the path for the publish-service. By convention this will simply use the / to match the name of the service generated. -Users can provide an override for an explicit service they want bound via `.Values.controller.publishService.pathOverride` +Users can provide an override for an explicit service they want bound via `.Values.publishService.pathOverride` */}} -{{- define "nginx-ingress.controller.publishServicePath" -}} -{{- $defServiceName := printf "%s/%s" .Release.Namespace (include "nginx-ingress.controller.fullname" .) -}} -{{- $servicePath := default $defServiceName .Values.controller.publishService.pathOverride }} +{{- define "nginx-ingress.publishServicePath" -}} +{{- $defServiceName := printf "%s/%s" .Release.Namespace (include "nginx-ingress.fullname" .) -}} +{{- $servicePath := default $defServiceName .Values.publishService.pathOverride }} {{- print $servicePath | trimSuffix "-" -}} {{- end -}} diff --git a/bitnami/nginx-ingress-controller/templates/clusterrole.yaml b/bitnami/nginx-ingress-controller/templates/clusterrole.yaml index ec8de0540..174eb5250 100644 --- a/bitnami/nginx-ingress-controller/templates/clusterrole.yaml +++ b/bitnami/nginx-ingress-controller/templates/clusterrole.yaml @@ -1,4 +1,4 @@ -{{- if and .Values.rbac.create (not .Values.controller.scope.enabled) -}} +{{- if and .Values.rbac.create (not .Values.scope.enabled) -}} apiVersion: rbac.authorization.k8s.io/v1beta1 kind: ClusterRole metadata: @@ -20,13 +20,13 @@ rules: verbs: - list - watch -{{- if and .Values.controller.scope.enabled .Values.controller.scope.namespace }} +{{- if and .Values.scope.enabled .Values.scope.namespace }} - apiGroups: - "" resources: - namespaces resourceNames: - - "{{ .Values.controller.scope.namespace }}" + - "{{ .Values.scope.namespace }}" verbs: - get {{- end }} diff --git a/bitnami/nginx-ingress-controller/templates/clusterrolebinding.yaml b/bitnami/nginx-ingress-controller/templates/clusterrolebinding.yaml index 080d948db..f8c4828d5 100644 --- a/bitnami/nginx-ingress-controller/templates/clusterrolebinding.yaml +++ b/bitnami/nginx-ingress-controller/templates/clusterrolebinding.yaml @@ -1,4 +1,4 @@ -{{- if and .Values.rbac.create (not .Values.controller.scope.enabled) -}} +{{- if and .Values.rbac.create (not .Values.scope.enabled) -}} apiVersion: rbac.authorization.k8s.io/v1beta1 kind: ClusterRoleBinding metadata: diff --git a/bitnami/nginx-ingress-controller/templates/controller-configmap.yaml b/bitnami/nginx-ingress-controller/templates/controller-configmap.yaml index ef9372f14..81393cbdf 100644 --- a/bitnami/nginx-ingress-controller/templates/controller-configmap.yaml +++ b/bitnami/nginx-ingress-controller/templates/controller-configmap.yaml @@ -4,15 +4,15 @@ metadata: labels: app: {{ template "nginx-ingress.name" . }} chart: {{ .Chart.Name }}-{{ .Chart.Version }} - component: "{{ .Values.controller.name }}" + component: "{{ .Values.name }}" heritage: {{ .Release.Service }} release: {{ .Release.Name }} - name: {{ template "nginx-ingress.controller.fullname" . }} + name: {{ template "nginx-ingress.fullname" . }} data: - enable-vts-status: "{{ .Values.controller.stats.enabled }}" -{{- if .Values.controller.headers }} + enable-vts-status: "{{ .Values.stats.enabled }}" +{{- if .Values.headers }} proxy-set-headers: {{ .Release.Namespace }}/{{ template "nginx-ingress.fullname" . }}-custom-headers {{- end }} -{{- if .Values.controller.config }} -{{ toYaml .Values.controller.config | indent 2 }} +{{- if .Values.config }} +{{ toYaml .Values.config | indent 2 }} {{- end }} diff --git a/bitnami/nginx-ingress-controller/templates/controller-daemonset.yaml b/bitnami/nginx-ingress-controller/templates/controller-daemonset.yaml index b945f4f46..8c527f528 100644 --- a/bitnami/nginx-ingress-controller/templates/controller-daemonset.yaml +++ b/bitnami/nginx-ingress-controller/templates/controller-daemonset.yaml @@ -1,66 +1,66 @@ -{{- if eq .Values.controller.kind "DaemonSet" }} +{{- if eq .Values.kind "DaemonSet" }} apiVersion: extensions/v1beta1 kind: DaemonSet metadata: labels: app: {{ template "nginx-ingress.name" . }} chart: {{ .Chart.Name }}-{{ .Chart.Version }} - component: "{{ .Values.controller.name }}" + component: "{{ .Values.name }}" heritage: {{ .Release.Service }} release: {{ .Release.Name }} - name: {{ template "nginx-ingress.controller.fullname" . }} + name: {{ template "nginx-ingress.fullname" . }} spec: revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} updateStrategy: -{{ toYaml .Values.controller.updateStrategy | indent 4 }} - minReadySeconds: {{ .Values.controller.minReadySeconds }} +{{ toYaml .Values.updateStrategy | indent 4 }} + minReadySeconds: {{ .Values.minReadySeconds }} template: metadata: annotations: checksum/config: {{ include (print $.Template.BasePath "/controller-configmap.yaml") . | sha256sum }} - {{- if .Values.controller.podAnnotations }} -{{ toYaml .Values.controller.podAnnotations | indent 8}} + {{- if .Values.podAnnotations }} +{{ toYaml .Values.podAnnotations | indent 8}} {{- end }} labels: app: {{ template "nginx-ingress.name" . }} - component: "{{ .Values.controller.name }}" + component: "{{ .Values.name }}" release: {{ .Release.Name }} - {{- if .Values.controller.podLabels }} -{{ toYaml .Values.controller.podLabels | indent 8}} + {{- if .Values.podLabels }} +{{ toYaml .Values.podLabels | indent 8}} {{- end }} spec: - dnsPolicy: {{ .Values.controller.dnsPolicy }} + dnsPolicy: {{ .Values.dnsPolicy }} {{- if .Values.imagePullSecrets }} imagePullSecrets: {{ toYaml .Values.imagePullSecrets | indent 8 }} {{- end }} -{{- if .Values.controller.priorityClassName }} - priorityClassName: "{{ .Values.controller.priorityClassName }}" +{{- if .Values.priorityClassName }} + priorityClassName: "{{ .Values.priorityClassName }}" {{- end }} containers: - - name: {{ template "nginx-ingress.name" . }}-{{ .Values.controller.name }} - image: "{{ .Values.controller.image.repository }}:{{ .Values.controller.image.tag }}" - imagePullPolicy: "{{ .Values.controller.image.pullPolicy }}" - {{- if .Values.controller.lifecycle }} + - name: {{ template "nginx-ingress.name" . }}-{{ .Values.name }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: "{{ .Values.image.pullPolicy }}" + {{- if .Values.lifecycle }} lifecycle: -{{ toYaml .Values.controller.lifecycle | indent 12 }} +{{ toYaml .Values.lifecycle | indent 12 }} {{- end }} args: - /nginx-ingress-controller - - --default-backend-service={{ if .Values.defaultBackend.enabled }}{{ .Release.Namespace }}/{{ template "nginx-ingress.defaultBackend.fullname" . }}{{ else }}{{ .Values.controller.defaultBackendService }}{{ end }} - {{- if and (semverCompare ">=0.9.0-beta.1" .Values.controller.image.tag) .Values.controller.publishService.enabled }} - - --publish-service={{ template "nginx-ingress.controller.publishServicePath" . }} + - --default-backend-service={{ if .Values.defaultBackend.enabled }}{{ .Release.Namespace }}/{{ template "nginx-ingress.defaultBackend.fullname" . }}{{ else }}{{ .Values.defaultBackendService }}{{ end }} + {{- if and (semverCompare ">=0.9.0-beta.1" .Values.image.tag) .Values.publishService.enabled }} + - --publish-service={{ template "nginx-ingress.publishServicePath" . }} {{- end }} - {{- if (semverCompare ">=0.9.0-beta.1" .Values.controller.image.tag) }} - - --election-id={{ .Values.controller.electionID }} + {{- if (semverCompare ">=0.9.0-beta.1" .Values.image.tag) }} + - --election-id={{ .Values.electionID }} {{- end }} - {{- if (semverCompare ">=0.9.0-beta.1" .Values.controller.image.tag) }} - - --ingress-class={{ .Values.controller.ingressClass }} + {{- if (semverCompare ">=0.9.0-beta.1" .Values.image.tag) }} + - --ingress-class={{ .Values.ingressClass }} {{- end }} - {{- if (semverCompare ">=0.9.0-beta.1" .Values.controller.image.tag) }} - - --configmap={{ .Release.Namespace }}/{{ template "nginx-ingress.controller.fullname" . }} + {{- if (semverCompare ">=0.9.0-beta.1" .Values.image.tag) }} + - --configmap={{ .Release.Namespace }}/{{ template "nginx-ingress.fullname" . }} {{- else }} - - --nginx-configmap={{ .Release.Namespace }}/{{ template "nginx-ingress.controller.fullname" . }} + - --nginx-configmap={{ .Release.Namespace }}/{{ template "nginx-ingress.fullname" . }} {{- end }} {{- if .Values.tcp }} - --tcp-services-configmap={{ .Release.Namespace }}/{{ template "nginx-ingress.fullname" . }}-tcp @@ -68,17 +68,17 @@ spec: {{- if .Values.udp }} - --udp-services-configmap={{ .Release.Namespace }}/{{ template "nginx-ingress.fullname" . }}-udp {{- end }} - {{- if .Values.controller.scope.enabled }} - - --watch-namespace={{ default .Release.Namespace .Values.controller.scope.namespace }} + {{- if .Values.scope.enabled }} + - --watch-namespace={{ default .Release.Namespace .Values.scope.namespace }} {{- end }} - {{- range $key, $value := .Values.controller.extraArgs }} + {{- range $key, $value := .Values.extraArgs }} {{- if $value }} - --{{ $key }}={{ $value }} {{- else }} - --{{ $key }} {{- end }} {{- end }} - {{- if (semverCompare ">=0.16.0" .Values.controller.image.tag) }} + {{- if (semverCompare ">=0.16.0" .Values.image.tag) }} securityContext: capabilities: drop: @@ -97,37 +97,37 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace - {{- if .Values.controller.extraEnvs }} -{{ toYaml .Values.controller.extraEnvs | indent 12 }} + {{- if .Values.extraEnvs }} +{{ toYaml .Values.extraEnvs | indent 12 }} {{- end }} livenessProbe: httpGet: path: /healthz - port: {{ .Values.controller.livenessProbe.port }} + port: {{ .Values.livenessProbe.port }} scheme: HTTP - initialDelaySeconds: {{ .Values.controller.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.controller.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.controller.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.controller.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.controller.livenessProbe.failureThreshold }} + initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }} + successThreshold: {{ .Values.livenessProbe.successThreshold }} + failureThreshold: {{ .Values.livenessProbe.failureThreshold }} ports: - name: http containerPort: 80 protocol: TCP - {{- if .Values.controller.daemonset.useHostPort }} - hostPort: {{ .Values.controller.daemonset.hostPorts.http }} + {{- if .Values.daemonset.useHostPort }} + hostPort: {{ .Values.daemonset.hostPorts.http }} {{- end }} - name: https containerPort: 443 protocol: TCP - {{- if .Values.controller.daemonset.useHostPort }} - hostPort: {{ .Values.controller.daemonset.hostPorts.https }} + {{- if .Values.daemonset.useHostPort }} + hostPort: {{ .Values.daemonset.hostPorts.https }} {{- end }} - {{- if .Values.controller.stats.enabled }} + {{- if .Values.stats.enabled }} - name: stats containerPort: 18080 protocol: TCP - {{- if .Values.controller.metrics.enabled }} + {{- if .Values.metrics.enabled }} - name: metrics containerPort: 10254 protocol: TCP @@ -146,60 +146,60 @@ spec: readinessProbe: httpGet: path: /healthz - port: {{ .Values.controller.readinessProbe.port }} + port: {{ .Values.readinessProbe.port }} scheme: HTTP - initialDelaySeconds: {{ .Values.controller.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.controller.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.controller.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.controller.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.controller.readinessProbe.failureThreshold }} -{{- if (or .Values.controller.customTemplate.configMapName .Values.controller.extraVolumeMounts) }} + initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.readinessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }} + successThreshold: {{ .Values.readinessProbe.successThreshold }} + failureThreshold: {{ .Values.readinessProbe.failureThreshold }} +{{- if (or .Values.customTemplate.configMapName .Values.extraVolumeMounts) }} volumeMounts: {{- end }} -{{- if .Values.controller.customTemplate.configMapName }} +{{- if .Values.customTemplate.configMapName }} - mountPath: /etc/nginx/template name: nginx-template-volume readOnly: true {{- end }} -{{- if .Values.controller.extraVolumeMounts }} -{{ toYaml .Values.controller.extraVolumeMounts | indent 10}} +{{- if .Values.extraVolumeMounts }} +{{ toYaml .Values.extraVolumeMounts | indent 10}} {{- end }} resources: -{{ toYaml .Values.controller.resources | indent 12 }} -{{- if .Values.controller.extraContainers }} -{{ toYaml .Values.controller.extraContainers | indent 8}} +{{ toYaml .Values.resources | indent 12 }} +{{- if .Values.extraContainers }} +{{ toYaml .Values.extraContainers | indent 8}} {{- end }} -{{- if .Values.controller.extraInitContainers }} +{{- if .Values.extraInitContainers }} initContainers: -{{ toYaml .Values.controller.extraInitContainers | indent 8}} +{{ toYaml .Values.extraInitContainers | indent 8}} {{- end }} - hostNetwork: {{ .Values.controller.hostNetwork }} - {{- if .Values.controller.nodeSelector }} + hostNetwork: {{ .Values.hostNetwork }} + {{- if .Values.nodeSelector }} nodeSelector: -{{ toYaml .Values.controller.nodeSelector | indent 8 }} +{{ toYaml .Values.nodeSelector | indent 8 }} {{- end }} - {{- if .Values.controller.tolerations }} + {{- if .Values.tolerations }} tolerations: -{{ toYaml .Values.controller.tolerations | indent 8 }} +{{ toYaml .Values.tolerations | indent 8 }} {{- end }} - {{- if .Values.controller.affinity }} + {{- if .Values.affinity }} affinity: -{{ toYaml .Values.controller.affinity | indent 8 }} +{{ toYaml .Values.affinity | indent 8 }} {{- end }} serviceAccountName: {{ template "nginx-ingress.serviceAccountName" . }} terminationGracePeriodSeconds: 60 -{{- if (or .Values.controller.customTemplate.configMapName .Values.controller.extraVolumes) }} +{{- if (or .Values.customTemplate.configMapName .Values.extraVolumes) }} volumes: {{- end }} -{{- if .Values.controller.customTemplate.configMapName }} +{{- if .Values.customTemplate.configMapName }} - name: nginx-template-volume configMap: - name: {{ .Values.controller.customTemplate.configMapName }} + name: {{ .Values.customTemplate.configMapName }} items: - - key: {{ .Values.controller.customTemplate.configMapKey }} + - key: {{ .Values.customTemplate.configMapKey }} path: nginx.tmpl {{- end }} -{{- if .Values.controller.extraVolumes }} -{{ toYaml .Values.controller.extraVolumes | indent 6}} +{{- if .Values.extraVolumes }} +{{ toYaml .Values.extraVolumes | indent 6}} {{- end }} {{- end }} diff --git a/bitnami/nginx-ingress-controller/templates/controller-deployment.yaml b/bitnami/nginx-ingress-controller/templates/controller-deployment.yaml index 384e826ff..790c11a25 100644 --- a/bitnami/nginx-ingress-controller/templates/controller-deployment.yaml +++ b/bitnami/nginx-ingress-controller/templates/controller-deployment.yaml @@ -1,66 +1,66 @@ -{{- if eq .Values.controller.kind "Deployment" }} +{{- if eq .Values.kind "Deployment" }} apiVersion: extensions/v1beta1 kind: Deployment metadata: labels: app: {{ template "nginx-ingress.name" . }} chart: {{ .Chart.Name }}-{{ .Chart.Version }} - component: "{{ .Values.controller.name }}" + component: "{{ .Values.name }}" heritage: {{ .Release.Service }} release: {{ .Release.Name }} - name: {{ template "nginx-ingress.controller.fullname" . }} + name: {{ template "nginx-ingress.fullname" . }} spec: - replicas: {{ .Values.controller.replicaCount }} + replicas: {{ .Values.replicaCount }} revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} strategy: -{{ toYaml .Values.controller.updateStrategy | indent 4 }} - minReadySeconds: {{ .Values.controller.minReadySeconds }} +{{ toYaml .Values.updateStrategy | indent 4 }} + minReadySeconds: {{ .Values.minReadySeconds }} template: metadata: - {{- if .Values.controller.podAnnotations }} + {{- if .Values.podAnnotations }} annotations: -{{ toYaml .Values.controller.podAnnotations | indent 8}} +{{ toYaml .Values.podAnnotations | indent 8}} {{- end }} labels: app: {{ template "nginx-ingress.name" . }} - component: "{{ .Values.controller.name }}" + component: "{{ .Values.name }}" release: {{ .Release.Name }} - {{- if .Values.controller.podLabels }} -{{ toYaml .Values.controller.podLabels | indent 8 }} + {{- if .Values.podLabels }} +{{ toYaml .Values.podLabels | indent 8 }} {{- end }} spec: - dnsPolicy: {{ .Values.controller.dnsPolicy }} + dnsPolicy: {{ .Values.dnsPolicy }} {{- if .Values.imagePullSecrets }} imagePullSecrets: {{ toYaml .Values.imagePullSecrets | indent 8 }} {{- end }} -{{- if .Values.controller.priorityClassName }} - priorityClassName: "{{ .Values.controller.priorityClassName }}" +{{- if .Values.priorityClassName }} + priorityClassName: "{{ .Values.priorityClassName }}" {{- end }} containers: - - name: {{ template "nginx-ingress.name" . }}-{{ .Values.controller.name }} - image: "{{ .Values.controller.image.repository }}:{{ .Values.controller.image.tag }}" - imagePullPolicy: "{{ .Values.controller.image.pullPolicy }}" - {{- if .Values.controller.lifecycle }} + - name: {{ template "nginx-ingress.name" . }}-{{ .Values.name }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: "{{ .Values.image.pullPolicy }}" + {{- if .Values.lifecycle }} lifecycle: -{{ toYaml .Values.controller.lifecycle | indent 12 }} +{{ toYaml .Values.lifecycle | indent 12 }} {{- end }} args: - /nginx-ingress-controller - - --default-backend-service={{ if .Values.defaultBackend.enabled }}{{ .Release.Namespace }}/{{ template "nginx-ingress.defaultBackend.fullname" . }}{{ else }}{{ .Values.controller.defaultBackendService }}{{ end }} - {{- if and (semverCompare ">=0.9.0-beta.1" .Values.controller.image.tag) .Values.controller.publishService.enabled }} - - --publish-service={{ template "nginx-ingress.controller.publishServicePath" . }} + - --default-backend-service={{ if .Values.defaultBackend.enabled }}{{ .Release.Namespace }}/{{ template "nginx-ingress.defaultBackend.fullname" . }}{{ else }}{{ .Values.defaultBackendService }}{{ end }} + {{- if and (semverCompare ">=0.9.0-beta.1" .Values.image.tag) .Values.publishService.enabled }} + - --publish-service={{ template "nginx-ingress.publishServicePath" . }} {{- end }} - {{- if (semverCompare ">=0.9.0-beta.1" .Values.controller.image.tag) }} - - --election-id={{ .Values.controller.electionID }} + {{- if (semverCompare ">=0.9.0-beta.1" .Values.image.tag) }} + - --election-id={{ .Values.electionID }} {{- end }} - {{- if (semverCompare ">=0.9.0-beta.1" .Values.controller.image.tag) }} - - --ingress-class={{ .Values.controller.ingressClass }} + {{- if (semverCompare ">=0.9.0-beta.1" .Values.image.tag) }} + - --ingress-class={{ .Values.ingressClass }} {{- end }} - {{- if (semverCompare ">=0.9.0-beta.1" .Values.controller.image.tag) }} - - --configmap={{ .Release.Namespace }}/{{ template "nginx-ingress.controller.fullname" . }} + {{- if (semverCompare ">=0.9.0-beta.1" .Values.image.tag) }} + - --configmap={{ .Release.Namespace }}/{{ template "nginx-ingress.fullname" . }} {{- else }} - - --nginx-configmap={{ .Release.Namespace }}/{{ template "nginx-ingress.controller.fullname" . }} + - --nginx-configmap={{ .Release.Namespace }}/{{ template "nginx-ingress.fullname" . }} {{- end }} {{- if .Values.tcp }} - --tcp-services-configmap={{ .Release.Namespace }}/{{ template "nginx-ingress.fullname" . }}-tcp @@ -68,17 +68,17 @@ spec: {{- if .Values.udp }} - --udp-services-configmap={{ .Release.Namespace }}/{{ template "nginx-ingress.fullname" . }}-udp {{- end }} - {{- if .Values.controller.scope.enabled }} - - --watch-namespace={{ default .Release.Namespace .Values.controller.scope.namespace }} + {{- if .Values.scope.enabled }} + - --watch-namespace={{ default .Release.Namespace .Values.scope.namespace }} {{- end }} - {{- range $key, $value := .Values.controller.extraArgs }} + {{- range $key, $value := .Values.extraArgs }} {{- if $value }} - --{{ $key }}={{ $value }} {{- else }} - --{{ $key }} {{- end }} {{- end }} - {{- if (semverCompare ">=0.16.0" .Values.controller.image.tag) }} + {{- if (semverCompare ">=0.16.0" .Values.image.tag) }} securityContext: capabilities: drop: @@ -97,19 +97,19 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace - {{- if .Values.controller.extraEnvs }} -{{ toYaml .Values.controller.extraEnvs | indent 12 }} + {{- if .Values.extraEnvs }} +{{ toYaml .Values.extraEnvs | indent 12 }} {{- end }} livenessProbe: httpGet: path: /healthz - port: {{ .Values.controller.livenessProbe.port }} + port: {{ .Values.livenessProbe.port }} scheme: HTTP - initialDelaySeconds: {{ .Values.controller.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.controller.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.controller.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.controller.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.controller.livenessProbe.failureThreshold }} + initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }} + successThreshold: {{ .Values.livenessProbe.successThreshold }} + failureThreshold: {{ .Values.livenessProbe.failureThreshold }} ports: - name: http containerPort: 80 @@ -117,11 +117,11 @@ spec: - name: https containerPort: 443 protocol: TCP - {{- if .Values.controller.stats.enabled }} + {{- if .Values.stats.enabled }} - name: stats containerPort: 18080 protocol: TCP - {{- if .Values.controller.metrics.enabled }} + {{- if .Values.metrics.enabled }} - name: metrics containerPort: 10254 protocol: TCP @@ -140,60 +140,60 @@ spec: readinessProbe: httpGet: path: /healthz - port: {{ .Values.controller.readinessProbe.port }} + port: {{ .Values.readinessProbe.port }} scheme: HTTP - initialDelaySeconds: {{ .Values.controller.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.controller.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.controller.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.controller.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.controller.readinessProbe.failureThreshold }} -{{- if (or .Values.controller.customTemplate.configMapName .Values.controller.extraVolumeMounts) }} + initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.readinessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }} + successThreshold: {{ .Values.readinessProbe.successThreshold }} + failureThreshold: {{ .Values.readinessProbe.failureThreshold }} +{{- if (or .Values.customTemplate.configMapName .Values.extraVolumeMounts) }} volumeMounts: {{- end }} -{{- if .Values.controller.customTemplate.configMapName }} +{{- if .Values.customTemplate.configMapName }} - mountPath: /etc/nginx/template name: nginx-template-volume readOnly: true {{- end }} -{{- if .Values.controller.extraVolumeMounts }} -{{ toYaml .Values.controller.extraVolumeMounts | indent 12}} +{{- if .Values.extraVolumeMounts }} +{{ toYaml .Values.extraVolumeMounts | indent 12}} {{- end }} resources: -{{ toYaml .Values.controller.resources | indent 12 }} -{{- if .Values.controller.extraContainers }} -{{ toYaml .Values.controller.extraContainers | indent 8}} +{{ toYaml .Values.resources | indent 12 }} +{{- if .Values.extraContainers }} +{{ toYaml .Values.extraContainers | indent 8}} {{- end }} -{{- if .Values.controller.extraInitContainers }} +{{- if .Values.extraInitContainers }} initContainers: -{{ toYaml .Values.controller.extraInitContainers | indent 8}} +{{ toYaml .Values.extraInitContainers | indent 8}} {{- end }} - hostNetwork: {{ .Values.controller.hostNetwork }} - {{- if .Values.controller.nodeSelector }} + hostNetwork: {{ .Values.hostNetwork }} + {{- if .Values.nodeSelector }} nodeSelector: -{{ toYaml .Values.controller.nodeSelector | indent 8 }} +{{ toYaml .Values.nodeSelector | indent 8 }} {{- end }} - {{- if .Values.controller.tolerations }} + {{- if .Values.tolerations }} tolerations: -{{ toYaml .Values.controller.tolerations | indent 8 }} +{{ toYaml .Values.tolerations | indent 8 }} {{- end }} - {{- if .Values.controller.affinity }} + {{- if .Values.affinity }} affinity: -{{ toYaml .Values.controller.affinity | indent 8 }} +{{ toYaml .Values.affinity | indent 8 }} {{- end }} serviceAccountName: {{ template "nginx-ingress.serviceAccountName" . }} terminationGracePeriodSeconds: 60 -{{- if (or .Values.controller.customTemplate.configMapName .Values.controller.extraVolumes) }} +{{- if (or .Values.customTemplate.configMapName .Values.extraVolumes) }} volumes: {{- end }} -{{- if .Values.controller.customTemplate.configMapName }} +{{- if .Values.customTemplate.configMapName }} - name: nginx-template-volume configMap: - name: {{ .Values.controller.customTemplate.configMapName }} + name: {{ .Values.customTemplate.configMapName }} items: - - key: {{ .Values.controller.customTemplate.configMapKey }} + - key: {{ .Values.customTemplate.configMapKey }} path: nginx.tmpl {{- end }} -{{- if .Values.controller.extraVolumes }} -{{ toYaml .Values.controller.extraVolumes | indent 8}} +{{- if .Values.extraVolumes }} +{{ toYaml .Values.extraVolumes | indent 8}} {{- end }} {{- end }} diff --git a/bitnami/nginx-ingress-controller/templates/controller-hpa.yaml b/bitnami/nginx-ingress-controller/templates/controller-hpa.yaml index 9c7f8af23..b157a05f8 100644 --- a/bitnami/nginx-ingress-controller/templates/controller-hpa.yaml +++ b/bitnami/nginx-ingress-controller/templates/controller-hpa.yaml @@ -1,30 +1,30 @@ -{{- if eq .Values.controller.kind "Deployment" }} -{{- if .Values.controller.autoscaling.enabled }} +{{- if eq .Values.kind "Deployment" }} +{{- if .Values.autoscaling.enabled }} apiVersion: autoscaling/v2beta1 kind: HorizontalPodAutoscaler metadata: labels: app: {{ template "nginx-ingress.name" . }} chart: {{ .Chart.Name }}-{{ .Chart.Version }} - component: "{{ .Values.controller.name }}" + component: "{{ .Values.name }}" heritage: {{ .Release.Service }} release: {{ .Release.Name }} - name: {{ template "nginx-ingress.controller.fullname" . }} + name: {{ template "nginx-ingress.fullname" . }} spec: scaleTargetRef: apiVersion: apps/v1beta1 kind: Deployment - name: {{ template "nginx-ingress.controller.fullname" . }} - minReplicas: {{ .Values.controller.autoscaling.minReplicas }} - maxReplicas: {{ .Values.controller.autoscaling.maxReplicas }} + name: {{ template "nginx-ingress.fullname" . }} + minReplicas: {{ .Values.autoscaling.minReplicas }} + maxReplicas: {{ .Values.autoscaling.maxReplicas }} metrics: - type: Resource resource: name: cpu - targetAverageUtilization: {{ .Values.controller.autoscaling.targetCPUUtilizationPercentage }} + targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} - type: Resource resource: name: memory - targetAverageUtilization: {{ .Values.controller.autoscaling.targetMemoryUtilizationPercentage }} + targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} {{- end }} {{- end }} diff --git a/bitnami/nginx-ingress-controller/templates/controller-metrics-service.yaml b/bitnami/nginx-ingress-controller/templates/controller-metrics-service.yaml index eeaf2976a..8b1c5186a 100644 --- a/bitnami/nginx-ingress-controller/templates/controller-metrics-service.yaml +++ b/bitnami/nginx-ingress-controller/templates/controller-metrics-service.yaml @@ -1,38 +1,38 @@ -{{- if and .Values.controller.stats.enabled .Values.controller.metrics.enabled }} +{{- if and .Values.stats.enabled .Values.metrics.enabled }} apiVersion: v1 kind: Service metadata: -{{- if .Values.controller.metrics.service.annotations }} +{{- if .Values.metrics.service.annotations }} annotations: -{{ toYaml .Values.controller.metrics.service.annotations | indent 4 }} +{{ toYaml .Values.metrics.service.annotations | indent 4 }} {{- end }} labels: app: {{ template "nginx-ingress.name" . }} chart: {{ .Chart.Name }}-{{ .Chart.Version }} - component: "{{ .Values.controller.name }}" + component: "{{ .Values.name }}" heritage: {{ .Release.Service }} release: {{ .Release.Name }} - name: {{ template "nginx-ingress.controller.fullname" . }}-metrics + name: {{ template "nginx-ingress.fullname" . }}-metrics spec: - clusterIP: "{{ .Values.controller.metrics.service.clusterIP }}" -{{- if .Values.controller.metrics.service.externalIPs }} + clusterIP: "{{ .Values.metrics.service.clusterIP }}" +{{- if .Values.metrics.service.externalIPs }} externalIPs: -{{ toYaml .Values.controller.metrics.service.externalIPs | indent 4 }} +{{ toYaml .Values.metrics.service.externalIPs | indent 4 }} {{- end }} -{{- if .Values.controller.metrics.service.loadBalancerIP }} - loadBalancerIP: "{{ .Values.controller.metrics.service.loadBalancerIP }}" +{{- if .Values.metrics.service.loadBalancerIP }} + loadBalancerIP: "{{ .Values.metrics.service.loadBalancerIP }}" {{- end }} -{{- if .Values.controller.metrics.service.loadBalancerSourceRanges }} +{{- if .Values.metrics.service.loadBalancerSourceRanges }} loadBalancerSourceRanges: -{{ toYaml .Values.controller.metrics.service.loadBalancerSourceRanges | indent 4 }} +{{ toYaml .Values.metrics.service.loadBalancerSourceRanges | indent 4 }} {{- end }} ports: - name: metrics - port: {{ .Values.controller.metrics.service.servicePort }} + port: {{ .Values.metrics.service.servicePort }} targetPort: metrics selector: app: {{ template "nginx-ingress.name" . }} - component: "{{ .Values.controller.name }}" + component: "{{ .Values.name }}" release: {{ .Release.Name }} - type: "{{ .Values.controller.metrics.service.type }}" + type: "{{ .Values.metrics.service.type }}" {{- end }} diff --git a/bitnami/nginx-ingress-controller/templates/controller-poddisruptionbudget.yaml b/bitnami/nginx-ingress-controller/templates/controller-poddisruptionbudget.yaml index f2922f237..7e8b7d2be 100644 --- a/bitnami/nginx-ingress-controller/templates/controller-poddisruptionbudget.yaml +++ b/bitnami/nginx-ingress-controller/templates/controller-poddisruptionbudget.yaml @@ -4,14 +4,14 @@ metadata: labels: app: {{ template "nginx-ingress.name" . }} chart: {{ .Chart.Name }}-{{ .Chart.Version }} - component: "{{ .Values.controller.name }}" + component: "{{ .Values.name }}" heritage: {{ .Release.Service }} release: {{ .Release.Name }} - name: {{ template "nginx-ingress.controller.fullname" . }} + name: {{ template "nginx-ingress.fullname" . }} spec: selector: matchLabels: app: {{ template "nginx-ingress.name" . }} release: {{ .Release.Name }} - component: "{{ .Values.controller.name }}" - minAvailable: {{ .Values.controller.minAvailable }} + component: "{{ .Values.name }}" + minAvailable: {{ .Values.minAvailable }} diff --git a/bitnami/nginx-ingress-controller/templates/controller-service.yaml b/bitnami/nginx-ingress-controller/templates/controller-service.yaml index 23de6d5d4..ee525d5d2 100644 --- a/bitnami/nginx-ingress-controller/templates/controller-service.yaml +++ b/bitnami/nginx-ingress-controller/templates/controller-service.yaml @@ -1,56 +1,56 @@ apiVersion: v1 kind: Service metadata: -{{- if .Values.controller.service.annotations }} +{{- if .Values.service.annotations }} annotations: -{{ toYaml .Values.controller.service.annotations | indent 4 }} +{{ toYaml .Values.service.annotations | indent 4 }} {{- end }} labels: -{{- if .Values.controller.service.labels }} -{{ toYaml .Values.controller.service.labels | indent 4 }} +{{- if .Values.service.labels }} +{{ toYaml .Values.service.labels | indent 4 }} {{- end }} app: {{ template "nginx-ingress.name" . }} chart: {{ .Chart.Name }}-{{ .Chart.Version }} - component: "{{ .Values.controller.name }}" + component: "{{ .Values.name }}" heritage: {{ .Release.Service }} release: {{ .Release.Name }} - name: {{ template "nginx-ingress.controller.fullname" . }} + name: {{ template "nginx-ingress.fullname" . }} spec: - clusterIP: "{{ .Values.controller.service.clusterIP }}" -{{- if .Values.controller.service.externalIPs }} + clusterIP: "{{ .Values.service.clusterIP }}" +{{- if .Values.service.externalIPs }} externalIPs: -{{ toYaml .Values.controller.service.externalIPs | indent 4 }} +{{ toYaml .Values.service.externalIPs | indent 4 }} {{- end }} -{{- if .Values.controller.service.loadBalancerIP }} - loadBalancerIP: "{{ .Values.controller.service.loadBalancerIP }}" +{{- if .Values.service.loadBalancerIP }} + loadBalancerIP: "{{ .Values.service.loadBalancerIP }}" {{- end }} -{{- if .Values.controller.service.loadBalancerSourceRanges }} +{{- if .Values.service.loadBalancerSourceRanges }} loadBalancerSourceRanges: -{{ toYaml .Values.controller.service.loadBalancerSourceRanges | indent 4 }} +{{ toYaml .Values.service.loadBalancerSourceRanges | indent 4 }} {{- end }} -{{- if and (semverCompare ">=1.7-0" .Capabilities.KubeVersion.GitVersion) (.Values.controller.service.externalTrafficPolicy) }} - externalTrafficPolicy: "{{ .Values.controller.service.externalTrafficPolicy }}" +{{- if and (semverCompare ">=1.7-0" .Capabilities.KubeVersion.GitVersion) (.Values.service.externalTrafficPolicy) }} + externalTrafficPolicy: "{{ .Values.service.externalTrafficPolicy }}" {{- end }} -{{- if and (semverCompare ">=1.7-0" .Capabilities.KubeVersion.GitVersion) (.Values.controller.service.healthCheckNodePort) }} - healthCheckNodePort: {{ .Values.controller.service.healthCheckNodePort }} +{{- if and (semverCompare ">=1.7-0" .Capabilities.KubeVersion.GitVersion) (.Values.service.healthCheckNodePort) }} + healthCheckNodePort: {{ .Values.service.healthCheckNodePort }} {{- end }} ports: - {{- if .Values.controller.service.enableHttp }} + {{- if .Values.service.enableHttp }} - name: http port: 80 protocol: TCP - targetPort: {{ .Values.controller.service.targetPorts.http }} - {{- if (and (eq .Values.controller.service.type "NodePort") (not (empty .Values.controller.service.nodePorts.http))) }} - nodePort: {{ .Values.controller.service.nodePorts.http }} + targetPort: {{ .Values.service.targetPorts.http }} + {{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePorts.http))) }} + nodePort: {{ .Values.service.nodePorts.http }} {{- end }} {{- end }} - {{- if .Values.controller.service.enableHttps }} + {{- if .Values.service.enableHttps }} - name: https port: 443 protocol: TCP - targetPort: {{ .Values.controller.service.targetPorts.https }} - {{- if (and (eq .Values.controller.service.type "NodePort") (not (empty .Values.controller.service.nodePorts.https))) }} - nodePort: {{ .Values.controller.service.nodePorts.https }} + targetPort: {{ .Values.service.targetPorts.https }} + {{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePorts.https))) }} + nodePort: {{ .Values.service.nodePorts.https }} {{- end }} {{- end }} {{- range $key, $value := .Values.tcp }} @@ -67,6 +67,6 @@ spec: {{- end }} selector: app: {{ template "nginx-ingress.name" . }} - component: "{{ .Values.controller.name }}" + component: "{{ .Values.name }}" release: {{ .Release.Name }} - type: "{{ .Values.controller.service.type }}" + type: "{{ .Values.service.type }}" diff --git a/bitnami/nginx-ingress-controller/templates/controller-stats-service.yaml b/bitnami/nginx-ingress-controller/templates/controller-stats-service.yaml index cfa19220e..3b8cbf534 100644 --- a/bitnami/nginx-ingress-controller/templates/controller-stats-service.yaml +++ b/bitnami/nginx-ingress-controller/templates/controller-stats-service.yaml @@ -1,38 +1,38 @@ -{{- if .Values.controller.stats.enabled }} +{{- if .Values.stats.enabled }} apiVersion: v1 kind: Service metadata: -{{- if .Values.controller.stats.service.annotations }} +{{- if .Values.stats.service.annotations }} annotations: -{{ toYaml .Values.controller.stats.service.annotations | indent 4 }} +{{ toYaml .Values.stats.service.annotations | indent 4 }} {{- end }} labels: app: {{ template "nginx-ingress.name" . }} chart: {{ .Chart.Name }}-{{ .Chart.Version }} - component: "{{ .Values.controller.name }}" + component: "{{ .Values.name }}" heritage: {{ .Release.Service }} release: {{ .Release.Name }} - name: {{ template "nginx-ingress.controller.fullname" . }}-stats + name: {{ template "nginx-ingress.fullname" . }}-stats spec: - clusterIP: "{{ .Values.controller.stats.service.clusterIP }}" -{{- if .Values.controller.stats.service.externalIPs }} + clusterIP: "{{ .Values.stats.service.clusterIP }}" +{{- if .Values.stats.service.externalIPs }} externalIPs: -{{ toYaml .Values.controller.stats.service.externalIPs | indent 4 }} +{{ toYaml .Values.stats.service.externalIPs | indent 4 }} {{- end }} -{{- if .Values.controller.stats.service.loadBalancerIP }} - loadBalancerIP: "{{ .Values.controller.stats.service.loadBalancerIP }}" +{{- if .Values.stats.service.loadBalancerIP }} + loadBalancerIP: "{{ .Values.stats.service.loadBalancerIP }}" {{- end }} -{{- if .Values.controller.stats.service.loadBalancerSourceRanges }} +{{- if .Values.stats.service.loadBalancerSourceRanges }} loadBalancerSourceRanges: -{{ toYaml .Values.controller.stats.service.loadBalancerSourceRanges | indent 4 }} +{{ toYaml .Values.stats.service.loadBalancerSourceRanges | indent 4 }} {{- end }} ports: - name: stats - port: {{ .Values.controller.stats.service.servicePort }} + port: {{ .Values.stats.service.servicePort }} targetPort: stats selector: app: {{ template "nginx-ingress.name" . }} - component: "{{ .Values.controller.name }}" + component: "{{ .Values.name }}" release: {{ .Release.Name }} - type: "{{ .Values.controller.stats.service.type }}" + type: "{{ .Values.stats.service.type }}" {{- end }} diff --git a/bitnami/nginx-ingress-controller/templates/headers-configmap.yaml b/bitnami/nginx-ingress-controller/templates/headers-configmap.yaml index c85f00883..69a1ec8f2 100644 --- a/bitnami/nginx-ingress-controller/templates/headers-configmap.yaml +++ b/bitnami/nginx-ingress-controller/templates/headers-configmap.yaml @@ -1,14 +1,14 @@ -{{- if .Values.controller.headers }} +{{- if .Values.headers }} apiVersion: v1 kind: ConfigMap metadata: labels: app: {{ template "nginx-ingress.name" . }} chart: {{ .Chart.Name }}-{{ .Chart.Version }} - component: "{{ .Values.controller.name }}" + component: "{{ .Values.name }}" heritage: {{ .Release.Service }} release: {{ .Release.Name }} name: {{ template "nginx-ingress.fullname" . }}-custom-headers data: -{{ toYaml .Values.controller.headers | indent 2 }} +{{ toYaml .Values.headers | indent 2 }} {{- end }} diff --git a/bitnami/nginx-ingress-controller/templates/role.yaml b/bitnami/nginx-ingress-controller/templates/role.yaml index 64c47ca22..a90643807 100644 --- a/bitnami/nginx-ingress-controller/templates/role.yaml +++ b/bitnami/nginx-ingress-controller/templates/role.yaml @@ -54,7 +54,7 @@ rules: resources: - configmaps resourceNames: - - {{ .Values.controller.electionID }}-{{ .Values.controller.ingressClass }} + - {{ .Values.electionID }}-{{ .Values.ingressClass }} verbs: - get - update diff --git a/bitnami/nginx-ingress-controller/templates/tcp-configmap.yaml b/bitnami/nginx-ingress-controller/templates/tcp-configmap.yaml index fdbf28268..b76cf6b68 100644 --- a/bitnami/nginx-ingress-controller/templates/tcp-configmap.yaml +++ b/bitnami/nginx-ingress-controller/templates/tcp-configmap.yaml @@ -5,7 +5,7 @@ metadata: labels: app: {{ template "nginx-ingress.name" . }} chart: {{ .Chart.Name }}-{{ .Chart.Version }} - component: "{{ .Values.controller.name }}" + component: "{{ .Values.name }}" heritage: {{ .Release.Service }} release: {{ .Release.Name }} name: {{ template "nginx-ingress.fullname" . }}-tcp diff --git a/bitnami/nginx-ingress-controller/templates/udp-configmap.yaml b/bitnami/nginx-ingress-controller/templates/udp-configmap.yaml index 75ce16325..9063649ef 100644 --- a/bitnami/nginx-ingress-controller/templates/udp-configmap.yaml +++ b/bitnami/nginx-ingress-controller/templates/udp-configmap.yaml @@ -5,7 +5,7 @@ metadata: labels: app: {{ template "nginx-ingress.name" . }} chart: {{ .Chart.Name }}-{{ .Chart.Version }} - component: "{{ .Values.controller.name }}" + component: "{{ .Values.name }}" heritage: {{ .Release.Service }} release: {{ .Release.Name }} name: {{ template "nginx-ingress.fullname" . }}-udp diff --git a/bitnami/nginx-ingress-controller/values.yaml b/bitnami/nginx-ingress-controller/values.yaml index abe041e91..0a3178459 100644 --- a/bitnami/nginx-ingress-controller/values.yaml +++ b/bitnami/nginx-ingress-controller/values.yaml @@ -1,282 +1,281 @@ ## Bitnami NGINX image version ## ref: https://hub.docker.com/r/bitnami/nginx/tags/ -controller: - name: controller - image: - registry: docker.io - repository: bitnami/nginx-ingress-controller - tag: 0.18.0-debian-9 - ## Specify a imagePullPolicy - ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' - ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images - ## - pullPolicy: IfNotPresent +name: controller +image: + registry: docker.io + repository: bitnami/nginx-ingress-controller + tag: 0.18.0-debian-9 + ## Specify a imagePullPolicy + ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' + ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images + ## + pullPolicy: IfNotPresent - config: {} - # Will add custom header to Nginx https://github.com/kubernetes/ingress-nginx/tree/master/docs/examples/customization/custom-headers - headers: {} +config: {} +# Will add custom header to Nginx https://github.com/kubernetes/ingress-nginx/tree/master/docs/examples/customization/custom-headers +headers: {} - # Required for use with CNI based kubernetes installations (such as ones set up by kubeadm), - # since CNI and hostport don't mix yet. Can be deprecated once https://github.com/kubernetes/kubernetes/issues/23920 - # is merged - hostNetwork: false +# Required for use with CNI based kubernetes installations (such as ones set up by kubeadm), +# since CNI and hostport don't mix yet. Can be deprecated once https://github.com/kubernetes/kubernetes/issues/23920 +# is merged +hostNetwork: false - # Optionally change this to ClusterFirstWithHostNet in case you have 'hostNetwork: true'. - # By default, while using host network, name resolution uses the host's DNS. If you wish nginx-controller - # to keep resolving names inside the k8s network, use ClusterFirstWithHostNet. - dnsPolicy: ClusterFirst +# Optionally change this to ClusterFirstWithHostNet in case you have 'hostNetwork: true'. +# By default, while using host network, name resolution uses the host's DNS. If you wish nginx-controller +# to keep resolving names inside the k8s network, use ClusterFirstWithHostNet. +dnsPolicy: ClusterFirst - ## Use host ports 80 and 443 - daemonset: - useHostPort: false +## Use host ports 80 and 443 +daemonset: + useHostPort: false - hostPorts: - http: 80 - https: 443 + hostPorts: + http: 80 + https: 443 - ## Required only if defaultBackend.enabled = false +## Required only if defaultBackend.enabled = false +## Must be / +## +defaultBackendService: "" + +## Election ID to use for status update +## +electionID: ingress-controller-leader + +## Name of the ingress class to route through this controller +## +ingressClass: nginx + +# labels to add to the pod container metadata +podLabels: {} +# key: value + +## Allows customization of the external service +## the ingress will be bound to via DNS +publishService: + enabled: false + ## Allows overriding of the publish service to bind to ## Must be / ## - defaultBackendService: "" + pathOverride: "" - ## Election ID to use for status update +## Limit the scope of the controller +## +scope: + enabled: false + namespace: "" # defaults to .Release.Namespace + +## Additional command line arguments to pass to nginx-ingress-controller +## E.g. to specify the default SSL certificate you can use +## extraArgs: +## default-ssl-certificate: "/" +extraArgs: {} + +## Additional environment variables to set +extraEnvs: [] +# extraEnvs: +# - name: FOO +# valueFrom: +# secretKeyRef: +# key: FOO +# name: secret-resource + +## DaemonSet or Deployment +## +kind: Deployment + +# The update strategy to apply to the Deployment or DaemonSet +## +updateStrategy: {} +# rollingUpdate: +# maxUnavailable: 1 +# type: RollingUpdate + +# minReadySeconds to avoid killing pods before we are ready +## +minReadySeconds: 0 + +## Node tolerations for server scheduling to nodes with taints +## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ +## +tolerations: [] +# - key: "key" +# operator: "Equal|Exists" +# value: "value" +# effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)" + +affinity: {} + +## Node labels for controller pod assignment +## Ref: https://kubernetes.io/docs/user-guide/node-selection/ +## +nodeSelector: {} + +## Liveness and readiness probe values +## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes +## +livenessProbe: + failureThreshold: 3 + initialDelaySeconds: 10 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 1 + port: 10254 +readinessProbe: + failureThreshold: 3 + initialDelaySeconds: 10 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 1 + port: 10254 + +## Annotations to be added to controller pods +## +podAnnotations: {} + +replicaCount: 1 + +minAvailable: 1 + +resources: {} +# limits: +# cpu: 100m +# memory: 64Mi +# requests: +# cpu: 100m +# memory: 64Mi + +autoscaling: + enabled: false +# minReplicas: 1 +# maxReplicas: 11 +# targetCPUUtilizationPercentage: 50 +# targetMemoryUtilizationPercentage: 50 + +## Override NGINX template +customTemplate: + configMapName: "" + configMapKey: "" + +service: + annotations: {} + labels: {} + clusterIP: "" + + ## List of IP addresses at which the controller services are available + ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips ## - electionID: ingress-controller-leader + externalIPs: [] - ## Name of the ingress class to route through this controller - ## - ingressClass: nginx + loadBalancerIP: "" + loadBalancerSourceRanges: [] - # labels to add to the pod container metadata - podLabels: {} - # key: value + enableHttp: true + enableHttps: true - ## Allows customization of the external service - ## the ingress will be bound to via DNS - publishService: - enabled: false - ## Allows overriding of the publish service to bind to - ## Must be / - ## - pathOverride: "" + ## Set external traffic policy to: "Local" to preserve source IP on + ## providers supporting it + ## Ref: https://kubernetes.io/docs/tutorials/services/source-ip/#source-ip-for-services-with-typeloadbalancer + externalTrafficPolicy: "" - ## Limit the scope of the controller - ## - scope: - enabled: false - namespace: "" # defaults to .Release.Namespace + healthCheckNodePort: 0 - ## Additional command line arguments to pass to nginx-ingress-controller - ## E.g. to specify the default SSL certificate you can use - ## extraArgs: - ## default-ssl-certificate: "/" - extraArgs: {} + targetPorts: + http: http + https: https - ## Additional environment variables to set - extraEnvs: [] - # extraEnvs: - # - name: FOO - # valueFrom: - # secretKeyRef: - # key: FOO - # name: secret-resource + type: LoadBalancer - ## DaemonSet or Deployment - ## - kind: Deployment + # type: NodePort + # nodePorts: + # http: 32080 + # https: 32443 + nodePorts: + http: "" + https: "" - # The update strategy to apply to the Deployment or DaemonSet - ## - updateStrategy: {} - # rollingUpdate: - # maxUnavailable: 1 - # type: RollingUpdate +extraContainers: [] +## Additional containers to be added to the controller pod. +## See https://github.com/lemonldap-ng-controller/lemonldap-ng-controller as example. +# - name: my-sidecar +# image: nginx:latest +# - name: lemonldap-ng-controller +# image: lemonldapng/lemonldap-ng-controller:0.2.0 +# args: +# - /lemonldap-ng-controller +# - --alsologtostderr +# - --configmap=$(POD_NAMESPACE)/lemonldap-ng-configuration +# env: +# - name: POD_NAME +# valueFrom: +# fieldRef: +# fieldPath: metadata.name +# - name: POD_NAMESPACE +# valueFrom: +# fieldRef: +# fieldPath: metadata.namespace +# volumeMounts: +# - name: copy-portal-skins +# mountPath: /srv/var/lib/lemonldap-ng/portal/skins - # minReadySeconds to avoid killing pods before we are ready - ## - minReadySeconds: 0 +extraVolumeMounts: [] +## Additional volumeMounts to the controller main container. +# - name: copy-portal-skins +# mountPath: /var/lib/lemonldap-ng/portal/skins - ## Node tolerations for server scheduling to nodes with taints - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ - ## - tolerations: [] - # - key: "key" - # operator: "Equal|Exists" - # value: "value" - # effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)" +extraVolumes: [] +## Additional volumes to the controller pod. +# - name: copy-portal-skins +# emptyDir: {} - affinity: {} +extraInitContainers: [] +## Containers, which are run before the app containers are started. +# - name: init-myservice +# image: busybox +# command: ['sh', '-c', 'until nslookup myservice; do echo waiting for myservice; sleep 2; done;'] - ## Node labels for controller pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - - ## Liveness and readiness probe values - ## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes - ## - livenessProbe: - failureThreshold: 3 - initialDelaySeconds: 10 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 1 - port: 10254 - readinessProbe: - failureThreshold: 3 - initialDelaySeconds: 10 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 1 - port: 10254 - - ## Annotations to be added to controller pods - ## - podAnnotations: {} - - replicaCount: 1 - - minAvailable: 1 - - resources: {} - # limits: - # cpu: 100m - # memory: 64Mi - # requests: - # cpu: 100m - # memory: 64Mi - - autoscaling: - enabled: false - # minReplicas: 1 - # maxReplicas: 11 - # targetCPUUtilizationPercentage: 50 - # targetMemoryUtilizationPercentage: 50 - - ## Override NGINX template - customTemplate: - configMapName: "" - configMapKey: "" +stats: + enabled: false service: annotations: {} - labels: {} clusterIP: "" - ## List of IP addresses at which the controller services are available + ## List of IP addresses at which the stats service is available ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips ## externalIPs: [] loadBalancerIP: "" loadBalancerSourceRanges: [] + servicePort: 18080 + type: ClusterIP - enableHttp: true - enableHttps: true +## If controller.stats.enabled = true and controller.metrics.enabled = true, Prometheus metrics will be exported +## +metrics: + enabled: false - ## Set external traffic policy to: "Local" to preserve source IP on - ## providers supporting it - ## Ref: https://kubernetes.io/docs/tutorials/services/source-ip/#source-ip-for-services-with-typeloadbalancer - externalTrafficPolicy: "" + service: + annotations: {} + # prometheus.io/scrape: "true" + # prometheus.io/port: "10254" - healthCheckNodePort: 0 + clusterIP: "" - targetPorts: - http: http - https: https + ## List of IP addresses at which the stats-exporter service is available + ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips + ## + externalIPs: [] - type: LoadBalancer + loadBalancerIP: "" + loadBalancerSourceRanges: [] + servicePort: 9913 + type: ClusterIP - # type: NodePort - # nodePorts: - # http: 32080 - # https: 32443 - nodePorts: - http: "" - https: "" +lifecycle: {} - extraContainers: [] - ## Additional containers to be added to the controller pod. - ## See https://github.com/lemonldap-ng-controller/lemonldap-ng-controller as example. - # - name: my-sidecar - # image: nginx:latest - # - name: lemonldap-ng-controller - # image: lemonldapng/lemonldap-ng-controller:0.2.0 - # args: - # - /lemonldap-ng-controller - # - --alsologtostderr - # - --configmap=$(POD_NAMESPACE)/lemonldap-ng-configuration - # env: - # - name: POD_NAME - # valueFrom: - # fieldRef: - # fieldPath: metadata.name - # - name: POD_NAMESPACE - # valueFrom: - # fieldRef: - # fieldPath: metadata.namespace - # volumeMounts: - # - name: copy-portal-skins - # mountPath: /srv/var/lib/lemonldap-ng/portal/skins - - extraVolumeMounts: [] - ## Additional volumeMounts to the controller main container. - # - name: copy-portal-skins - # mountPath: /var/lib/lemonldap-ng/portal/skins - - extraVolumes: [] - ## Additional volumes to the controller pod. - # - name: copy-portal-skins - # emptyDir: {} - - extraInitContainers: [] - ## Containers, which are run before the app containers are started. - # - name: init-myservice - # image: busybox - # command: ['sh', '-c', 'until nslookup myservice; do echo waiting for myservice; sleep 2; done;'] - - stats: - enabled: false - - service: - annotations: {} - clusterIP: "" - - ## List of IP addresses at which the stats service is available - ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips - ## - externalIPs: [] - - loadBalancerIP: "" - loadBalancerSourceRanges: [] - servicePort: 18080 - type: ClusterIP - - ## If controller.stats.enabled = true and controller.metrics.enabled = true, Prometheus metrics will be exported - ## - metrics: - enabled: false - - service: - annotations: {} - # prometheus.io/scrape: "true" - # prometheus.io/port: "10254" - - clusterIP: "" - - ## List of IP addresses at which the stats-exporter service is available - ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips - ## - externalIPs: [] - - loadBalancerIP: "" - loadBalancerSourceRanges: [] - servicePort: 9913 - type: ClusterIP - - lifecycle: {} - - priorityClassName: "" +priorityClassName: "" ## Rollback limit ## From 6020abbd3f745a453dbb8b6102386bcd55a12ebb Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez Hernandez Date: Tue, 4 Sep 2018 13:40:06 +0000 Subject: [PATCH 3/6] @juan131 suggestions --- bitnami/nginx-ingress-controller/Chart.yaml | 6 +++--- bitnami/nginx-ingress-controller/README.md | 4 ++-- bitnami/nginx-ingress-controller/templates/NOTES.txt | 2 ++ bitnami/nginx-ingress-controller/values.yaml | 4 ++-- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/bitnami/nginx-ingress-controller/Chart.yaml b/bitnami/nginx-ingress-controller/Chart.yaml index e9353a8b2..922ea6b1a 100644 --- a/bitnami/nginx-ingress-controller/Chart.yaml +++ b/bitnami/nginx-ingress-controller/Chart.yaml @@ -1,6 +1,6 @@ name: nginx-ingress-controller -version: 0.18.0 -appVersion: 0.0.1 +version: 0.0.1 +appVersion: 0.18.0 description: Chart for the nginx Ingress controller keywords: - ingress @@ -9,7 +9,7 @@ keywords: - web - www - reverse proxy -home: http://www.nginx.org +home: https://github.com/kubernetes/ingress-nginx sources: - https://github.com/bitnami/bitnami-docker-nginx-ingress-controller maintainers: diff --git a/bitnami/nginx-ingress-controller/README.md b/bitnami/nginx-ingress-controller/README.md index d5c1eb6df..c5c7c469d 100644 --- a/bitnami/nginx-ingress-controller/README.md +++ b/bitnami/nginx-ingress-controller/README.md @@ -1,6 +1,6 @@ # Nginx Ingress Controller -[nginx-ingress](https://github.com/kubernetes/ingress-nginx) is an Ingress controller that uses ConfigMap to store the Nginx configuration. +[nginx-ingress](https://github.com/kubernetes/ingress-nginx) is an Ingress controller that uses NGINX to manage external access to HTTP services in a Kubernetes cluster. ## TL;DR; @@ -51,7 +51,7 @@ Parameter | Description | Default `image.repository` | controller container image repository | `bitnami/nginx-ingress-controller` `image.tag` | controller container image tag | `0.18.0-debian-9` `image.pullPolicy` | controller container image pull policy | `IfNotPresent` -`config` | nginx ConfigMap entries | none +`config` | nginx ConfigMap entries | `nil` `hostNetwork` | If the nginx deployment / daemonset should run on the host's network namespace. Do not set this when `controller.service.externalIPs` is set and `kube-proxy` is used as there will be a port-conflict for port `80` | false `defaultBackendService` | default 404 backend service; required only if `defaultBackend.enabled = false` | `""` `electionID` | election ID to use for the status update | `ingress-controller-leader` diff --git a/bitnami/nginx-ingress-controller/templates/NOTES.txt b/bitnami/nginx-ingress-controller/templates/NOTES.txt index b7a58125f..a3e1b3c92 100644 --- a/bitnami/nginx-ingress-controller/templates/NOTES.txt +++ b/bitnami/nginx-ingress-controller/templates/NOTES.txt @@ -1,3 +1,5 @@ +** Please be patient while the chart is being deployed ** + The nginx-ingress controller has been installed. {{- if contains "NodePort" .Values.service.type }} diff --git a/bitnami/nginx-ingress-controller/values.yaml b/bitnami/nginx-ingress-controller/values.yaml index 0a3178459..f976cf6d2 100644 --- a/bitnami/nginx-ingress-controller/values.yaml +++ b/bitnami/nginx-ingress-controller/values.yaml @@ -1,5 +1,5 @@ -## Bitnami NGINX image version -## ref: https://hub.docker.com/r/bitnami/nginx/tags/ +## Bitnami NGINX Ingress controller image version +## ref: https://hub.docker.com/r/bitnami/nginx-ingress-controller/tags/ name: controller image: registry: docker.io From 683c80dd0fec68ca4741e05543bc388bad05668d Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez Hernandez Date: Tue, 4 Sep 2018 13:48:30 +0000 Subject: [PATCH 4/6] Change user in securityContext --- bitnami/nginx-ingress-controller/README.md | 3 +++ .../templates/controller-daemonset.yaml | 4 ++-- .../templates/controller-deployment.yaml | 4 ++-- bitnami/nginx-ingress-controller/values.yaml | 8 ++++++++ 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/bitnami/nginx-ingress-controller/README.md b/bitnami/nginx-ingress-controller/README.md index c5c7c469d..7ee7e237d 100644 --- a/bitnami/nginx-ingress-controller/README.md +++ b/bitnami/nginx-ingress-controller/README.md @@ -151,6 +151,9 @@ Parameter | Description | Default `defaultBackend.service.type` | type of default backend service to create | `ClusterIP` `imagePullSecrets` | name of Secret resource containing private registry credentials | `nil` `rbac.create` | if `true`, create & use RBAC resources | `true` +`securityContext.enabled` | Enable security context | `true` +`securityContext.fsGroup` | Group ID for the container | `1001` +`securityContext.runAsUser` | User ID for the container | `1001` `podSecurityPolicy.enabled` | if `true`, create & use Pod Security Policy resources | `false` `serviceAccount.create` | if `true`, create a service account | `` `serviceAccount.name` | The name of the service account to use. If not set and `create` is `true`, a name is generated using the fullname template. | `` diff --git a/bitnami/nginx-ingress-controller/templates/controller-daemonset.yaml b/bitnami/nginx-ingress-controller/templates/controller-daemonset.yaml index 8c527f528..052318f3b 100644 --- a/bitnami/nginx-ingress-controller/templates/controller-daemonset.yaml +++ b/bitnami/nginx-ingress-controller/templates/controller-daemonset.yaml @@ -85,8 +85,8 @@ spec: - ALL add: - NET_BIND_SERVICE - # www-data -> 33 - runAsUser: 33 + fsGroup: {{ .Values.securityContext.fsGroup }} + runAsUser: {{ .Values.securityContext.runAsUser }} {{- end }} env: - name: POD_NAME diff --git a/bitnami/nginx-ingress-controller/templates/controller-deployment.yaml b/bitnami/nginx-ingress-controller/templates/controller-deployment.yaml index 790c11a25..85d944403 100644 --- a/bitnami/nginx-ingress-controller/templates/controller-deployment.yaml +++ b/bitnami/nginx-ingress-controller/templates/controller-deployment.yaml @@ -85,8 +85,8 @@ spec: - ALL add: - NET_BIND_SERVICE - # www-data -> 33 - runAsUser: 33 + fsGroup: {{ .Values.securityContext.fsGroup }} + runAsUser: {{ .Values.securityContext.runAsUser }} {{- end }} env: - name: POD_NAME diff --git a/bitnami/nginx-ingress-controller/values.yaml b/bitnami/nginx-ingress-controller/values.yaml index f976cf6d2..de708e8a3 100644 --- a/bitnami/nginx-ingress-controller/values.yaml +++ b/bitnami/nginx-ingress-controller/values.yaml @@ -355,6 +355,14 @@ defaultBackend: rbac: create: true +## Kubernetes Security Context +## https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ +## +securityContext: + enabled: true + fsGroup: 1001 + runAsUser: 1001 + # If true, create & use Pod Security Policy resources # https://kubernetes.io/docs/concepts/policy/pod-security-policy/ podSecurityPolicy: From 663b7d3065cedd7cfa587506e8d599952ed091df Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez Hernandez Date: Thu, 6 Sep 2018 08:14:58 +0000 Subject: [PATCH 5/6] @tompizmor suggestions --- bitnami/nginx-ingress-controller/README.md | 2 +- bitnami/nginx-ingress-controller/templates/_helpers.tpl | 8 ++++++++ .../templates/controller-daemonset.yaml | 2 +- .../templates/controller-deployment.yaml | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/bitnami/nginx-ingress-controller/README.md b/bitnami/nginx-ingress-controller/README.md index 7ee7e237d..539837642 100644 --- a/bitnami/nginx-ingress-controller/README.md +++ b/bitnami/nginx-ingress-controller/README.md @@ -49,7 +49,7 @@ Parameter | Description | Default `name` | name of the controller component | `controller` `image.registry` | name of the container image registry | `docker.io` `image.repository` | controller container image repository | `bitnami/nginx-ingress-controller` -`image.tag` | controller container image tag | `0.18.0-debian-9` +`image.tag` | controller container image tag | `{VERSION}` `image.pullPolicy` | controller container image pull policy | `IfNotPresent` `config` | nginx ConfigMap entries | `nil` `hostNetwork` | If the nginx deployment / daemonset should run on the host's network namespace. Do not set this when `controller.service.externalIPs` is set and `kube-proxy` is used as there will be a port-conflict for port `80` | false diff --git a/bitnami/nginx-ingress-controller/templates/_helpers.tpl b/bitnami/nginx-ingress-controller/templates/_helpers.tpl index bda931375..77a9a9e79 100644 --- a/bitnami/nginx-ingress-controller/templates/_helpers.tpl +++ b/bitnami/nginx-ingress-controller/templates/_helpers.tpl @@ -57,3 +57,11 @@ Create the name of the service account to use {{ default "default" .Values.serviceAccount.name }} {{- end -}} {{- end -}} + +{{/* +Return the proper nginx-ingress-controller image name +*/}} +{{- define "nginx-ingress-controller.image" -}} +{{- $tag := .Values.image.tag | toString -}} +{{- printf "%s/%s:%s" .Values.image.registry .Values.image.repository $tag -}} +{{- end -}} diff --git a/bitnami/nginx-ingress-controller/templates/controller-daemonset.yaml b/bitnami/nginx-ingress-controller/templates/controller-daemonset.yaml index 052318f3b..0f71b5d87 100644 --- a/bitnami/nginx-ingress-controller/templates/controller-daemonset.yaml +++ b/bitnami/nginx-ingress-controller/templates/controller-daemonset.yaml @@ -39,7 +39,7 @@ spec: {{- end }} containers: - name: {{ template "nginx-ingress.name" . }}-{{ .Values.name }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + image: "{{ template "nginx-ingress-controller.image" . }}" imagePullPolicy: "{{ .Values.image.pullPolicy }}" {{- if .Values.lifecycle }} lifecycle: diff --git a/bitnami/nginx-ingress-controller/templates/controller-deployment.yaml b/bitnami/nginx-ingress-controller/templates/controller-deployment.yaml index 85d944403..538486002 100644 --- a/bitnami/nginx-ingress-controller/templates/controller-deployment.yaml +++ b/bitnami/nginx-ingress-controller/templates/controller-deployment.yaml @@ -39,7 +39,7 @@ spec: {{- end }} containers: - name: {{ template "nginx-ingress.name" . }}-{{ .Values.name }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + image: "{{ template "nginx-ingress-controller.image" . }}" imagePullPolicy: "{{ .Values.image.pullPolicy }}" {{- if .Values.lifecycle }} lifecycle: From f5cf32b3016461234da26dcdd5888a0a46e5000c Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez Hernandez Date: Thu, 6 Sep 2018 08:40:34 +0000 Subject: [PATCH 6/6] Remove unused securityContext.enabled --- bitnami/nginx-ingress-controller/README.md | 1 - bitnami/nginx-ingress-controller/values.yaml | 1 - 2 files changed, 2 deletions(-) diff --git a/bitnami/nginx-ingress-controller/README.md b/bitnami/nginx-ingress-controller/README.md index 539837642..697ce5e17 100644 --- a/bitnami/nginx-ingress-controller/README.md +++ b/bitnami/nginx-ingress-controller/README.md @@ -151,7 +151,6 @@ Parameter | Description | Default `defaultBackend.service.type` | type of default backend service to create | `ClusterIP` `imagePullSecrets` | name of Secret resource containing private registry credentials | `nil` `rbac.create` | if `true`, create & use RBAC resources | `true` -`securityContext.enabled` | Enable security context | `true` `securityContext.fsGroup` | Group ID for the container | `1001` `securityContext.runAsUser` | User ID for the container | `1001` `podSecurityPolicy.enabled` | if `true`, create & use Pod Security Policy resources | `false` diff --git a/bitnami/nginx-ingress-controller/values.yaml b/bitnami/nginx-ingress-controller/values.yaml index de708e8a3..da749cb08 100644 --- a/bitnami/nginx-ingress-controller/values.yaml +++ b/bitnami/nginx-ingress-controller/values.yaml @@ -359,7 +359,6 @@ rbac: ## https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ ## securityContext: - enabled: true fsGroup: 1001 runAsUser: 1001