From d7067f56a37cc36fbb4b92f30f8f33272eb5a309 Mon Sep 17 00:00:00 2001 From: juan131 Date: Thu, 2 May 2019 18:21:21 +0200 Subject: [PATCH] Update NGINX chart so it uses 'server block' terminology Signed-off-by: juan131 --- bitnami/nginx/Chart.yaml | 2 +- bitnami/nginx/README.md | 60 +++++++++---------- bitnami/nginx/templates/deployment.yaml | 10 ++-- .../{vhost.yaml => server-host.yaml} | 6 +- bitnami/nginx/values.yaml | 4 +- 5 files changed, 41 insertions(+), 41 deletions(-) rename bitnami/nginx/templates/{vhost.yaml => server-host.yaml} (74%) diff --git a/bitnami/nginx/Chart.yaml b/bitnami/nginx/Chart.yaml index 40e01d658..227742486 100644 --- a/bitnami/nginx/Chart.yaml +++ b/bitnami/nginx/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: nginx -version: 3.0.0 +version: 3.1.0 appVersion: 1.16.0 description: Chart for the nginx server keywords: diff --git a/bitnami/nginx/README.md b/bitnami/nginx/README.md index c26e2cda7..bc086a547 100644 --- a/bitnami/nginx/README.md +++ b/bitnami/nginx/README.md @@ -42,30 +42,30 @@ The command removes all the Kubernetes components associated with the chart and The following tables lists the configurable parameters of the NGINX Open Source chart and their default values. -| Parameter | Description | Default | -| ------------------------- | ------------------------------ | --------------------------------------------------------- | -| `global.imageRegistry` | Global Docker image registry | `nil` | -| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | -| `image.registry` | NGINX image registry | `docker.io` | -| `image.repository` | NGINX Image name | `bitnami/nginx` | -| `image.tag` | NGINX Image tag | `{VERSION}` | -| `image.pullPolicy` | NGINX image pull policy | `Always` if `imageTag` is `latest`, else `IfNotPresent` | -| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | -| `vhost` | Custom NGINX virtual host | `nil` | -| `podAnnotations` | Pod annotations | `{}` | -| `metrics.enabled` | Start a side-car prometheus exporter | `false` | -| `metrics.image.registry` | Promethus exporter image registry | `docker.io` | -| `metrics.image.repository` | Promethus exporter image name | `nginx/nginx-prometheus-exporter` | -| `metrics.image.tag` | Promethus exporter image tag | `0.1.0` | -| `metrics.image.pullPolicy` | Image pull policy | `IfNotPresent` | -| `metrics.image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | -| `metrics.podAnnotations` | Additional annotations for Metrics exporter pod | `{prometheus.io/scrape: "true", prometheus.io/port: "9113"}` | -| `metrics.resources` | Exporter resource requests/limit | {} | -| `service.type` | Kubernetes Service type | `LoadBalancer` | -| `service.port` | Service HTTP port | `80` | -| `service.nodePorts.http` | Kubernetes http node port | `""` | -| `service.externalTrafficPolicy` | Enable client source IP preservation | `Cluster` | -| `service.loadBalancerIP` | LoadBalancer service IP address | `""` | +| Parameter | Description | Default | +| ------------------------------- | ------------------------------------------------ | ------------------------------------------------------------ | +| `global.imageRegistry` | Global Docker image registry | `nil` | +| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | +| `image.registry` | NGINX image registry | `docker.io` | +| `image.repository` | NGINX Image name | `bitnami/nginx` | +| `image.tag` | NGINX Image tag | `{VERSION}` | +| `image.pullPolicy` | NGINX image pull policy | `Always` if `imageTag` is `latest`, else `IfNotPresent` | +| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | +| `serverBlock` | Custom NGINX server block | `nil` | +| `podAnnotations` | Pod annotations | `{}` | +| `metrics.enabled` | Start a side-car prometheus exporter | `false` | +| `metrics.image.registry` | Promethus exporter image registry | `docker.io` | +| `metrics.image.repository` | Promethus exporter image name | `nginx/nginx-prometheus-exporter` | +| `metrics.image.tag` | Promethus exporter image tag | `0.1.0` | +| `metrics.image.pullPolicy` | Image pull policy | `IfNotPresent` | +| `metrics.image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | +| `metrics.podAnnotations` | Additional annotations for Metrics exporter pod | `{prometheus.io/scrape: "true", prometheus.io/port: "9113"}` | +| `metrics.resources` | Exporter resource requests/limit | {} | +| `service.type` | Kubernetes Service type | `LoadBalancer` | +| `service.port` | Service HTTP port | `80` | +| `service.nodePorts.http` | Kubernetes http node port | `""` | +| `service.externalTrafficPolicy` | Enable client source IP preservation | `Cluster` | +| `service.loadBalancerIP` | LoadBalancer service IP address | `""` | Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, @@ -85,14 +85,14 @@ $ helm install --name my-release -f values.yaml bitnami/nginx > **Tip**: You can use the default [values.yaml](values.yaml) -### Providing a custom virtual host +### Providing a custom server block -You can use the `vhost` value to provide a custom virtual host for NGINX to use. -To do this, create a values files with your virtual host: +You can use the `serverBlock` value to provide a custom server block for NGINX to use. +To do this, create a values files with your server block: -_custom-vhost.yaml_ +_custom-server-block.yaml_ ```yaml -vhost: |- +serverBlock: |- server { listen 0.0.0.0:8080; location / { @@ -104,7 +104,7 @@ vhost: |- Install the chart with this value: ```console -$ helm install --name my-release -f custom-vhost.yaml bitnami/nginx +$ helm install --name my-release -f custom-server-block.yaml bitnami/nginx ``` ## Upgrading diff --git a/bitnami/nginx/templates/deployment.yaml b/bitnami/nginx/templates/deployment.yaml index d07694fad..7a87b52ba 100644 --- a/bitnami/nginx/templates/deployment.yaml +++ b/bitnami/nginx/templates/deployment.yaml @@ -53,9 +53,9 @@ spec: timeoutSeconds: 3 periodSeconds: 5 volumeMounts: - {{- if .Values.vhost }} - - name: nginx-vhost - mountPath: /opt/bitnami/nginx/conf/vhosts + {{- if .Values.serverBlock }} + - name: nginx-server-block + mountPath: /opt/bitnami/nginx/conf/server_blocks {{- end }} {{- if .Values.metrics.enabled }} - name: metrics @@ -81,8 +81,8 @@ spec: {{ toYaml .Values.metrics.resources | indent 12 }} {{- end }} volumes: - {{- if .Values.vhost }} - - name: nginx-vhost + {{- if .Values.serverBlock }} + - name: nginx-server-block configMap: name: {{ template "fullname" . }} {{- end }} diff --git a/bitnami/nginx/templates/vhost.yaml b/bitnami/nginx/templates/server-host.yaml similarity index 74% rename from bitnami/nginx/templates/vhost.yaml rename to bitnami/nginx/templates/server-host.yaml index 7ef7c8e4f..220c9d9b4 100644 --- a/bitnami/nginx/templates/vhost.yaml +++ b/bitnami/nginx/templates/server-host.yaml @@ -1,4 +1,4 @@ -{{- if .Values.vhost -}} +{{- if .Values.serverBlock -}} apiVersion: v1 kind: ConfigMap metadata: @@ -9,6 +9,6 @@ metadata: release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" data: - vhost.conf: |- -{{ .Values.vhost | indent 4 }} + server-block.conf: |- +{{ .Values.serverBlock | indent 4 }} {{- end -}} diff --git a/bitnami/nginx/values.yaml b/bitnami/nginx/values.yaml index 06bd77249..a3f81418c 100644 --- a/bitnami/nginx/values.yaml +++ b/bitnami/nginx/values.yaml @@ -44,8 +44,8 @@ service: ## externalTrafficPolicy: Cluster -# vhost: |- -# # example PHP-FPM vhost +# serverBlock: |- +# # example PHP-FPM server block # server { # listen 0.0.0.0:8080; # root /app;