[bitnami/apache] Lint chart

Signed-off-by: Javier J. Salmeron Garcia <jsalmeron@vmware.com>
This commit is contained in:
Javier J. Salmeron Garcia
2019-11-07 15:26:11 +01:00
parent 2a4920bad0
commit 810711389c
5 changed files with 198 additions and 187 deletions
+10 -10
View File
@@ -1,20 +1,20 @@
apiVersion: v1
name: apache
version: 7.2.4
version: 7.2.5
appVersion: 2.4.41
description: Chart for Apache HTTP Server
keywords:
- apache
- http
- https
- www
- web
- reverse proxy
- apache
- http
- https
- www
- web
- reverse proxy
home: https://httpd.apache.org
icon: https://bitnami.com/assets/stacks/apache/img/apache-stack-220x234.png
sources:
- https://github.com/bitnami/bitnami-docker-apache
- https://github.com/bitnami/bitnami-docker-apache
maintainers:
- name: Bitnami
email: containers@bitnami.com
- name: Bitnami
email: containers@bitnami.com
engine: gotpl
+64 -51
View File
@@ -51,57 +51,70 @@ The command removes all the Kubernetes components associated with the chart and
The following tables lists the configurable parameters of the Apache 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` | Apache Docker image registry | `docker.io` |
| `image.repository` | Apache Docker image name | `bitnami/apache` |
| `image.tag` | Apache Docker image tag | `{TAG_NAME}` |
| `image.pullPolicy` | Apache Docker image pull policy | `Always` |
| `image.pullSecrets` | Specify Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
| `git.registry` | Git image registry | `docker.io` |
| `git.repository` | Git image name | `bitnami/git` |
| `git.tag` | Git image tag | `{TAG_NAME}` |
| `git.pullPolicy` | Git image pull policy | `Always` |
| `git.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
| `replicaCount` | Number of replicas of the Apache deployment | `docker.io` |
| `htdocsConfigMap` | ConfigMap with the server static content | `nil` |
| `htdocsPVC` | PVC with the server static content | `nil` |
| `vhostsConfigMap` | ConfigMap with the virtual hosts content | `nil` |
| `httpdConfConfigMap` | ConfigMap with the httpd.conf content | `nil` |
| `cloneHtdocsFromGit.enabled` | Get the server static content from a git repository | `false` |
| `cloneHtdocsFromGit.repository` | Repository to clone static content from | `nil` |
| `cloneHtdocsFromGit.branch` | Branch inside the git repository | `nil` |
| `cloneHtdocsFromGit.interval` | Interval for sidecar container pull from the repository | `60` |
| `podAnnotations` | Pod annotations | `{}` |
| `ingress.enabled` | Enable ingress controller resource | `false` |
| `ingress.hostname` | Default host for the ingress resource | `example.local` |
| `ingress.certManager` | Add annotations for cert-manager | `false` |
| `ingress.annotations` | Ingress annotations | `[]` |
| `ingress.hosts[0].name` | Hostname to your Apache installation | `example.local` |
| `ingress.hosts[0].path` | Path within the url structure | `/` |
| `ingress.tls[0].hosts[0]` | TLS hosts | `example.local` |
| `ingress.tls[0].secretName` | TLS Secret (certificates) | `example.local-tls` |
| `ingress.secrets[0].name` | TLS Secret Name | `nil` |
| `ingress.secrets[0].certificate` | TLS Secret Certificate | `nil` |
| `ingress.secrets[0].key` | TLS Secret Key | `nil` |
| `affinity` | Map of node/pod affinities | `{}` |
| `metrics.enabled` | Start a side-car prometheus exporter | `false` |
| `metrics.image.registry` | Apache exporter image registry | `docker.io` |
| `metrics.image.repository` | Apache exporter image name | `lusotycoon/apache-exporter` |
| `metrics.image.tag` | Apache exporter image tag | `v0.5.0` |
| `metrics.image.pullPolicy` | Apache exporter 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: "9117"}` |
| `metrics.resources` | Exporter resource requests/limit | {} |
| `service.type` | Kubernetes Service type | `LoadBalancer` |
| `service.port` | Service HTTP port | `80` |
| `service.httpsPort` | Service HTTPS port | `443` |
| `service.nodePorts.http` | Kubernetes http node port | `""` |
| `service.nodePorts.https` | Kubernetes https 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` | Apache Docker image registry | `docker.io` |
| `image.repository` | Apache Docker image name | `bitnami/apache` |
| `image.tag` | Apache Docker image tag | `{TAG_NAME}` |
| `image.pullPolicy` | Apache Docker image pull policy | `Always` |
| `image.pullSecrets` | Specify Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
| `git.registry` | Git image registry | `docker.io` |
| `git.repository` | Git image name | `bitnami/git` |
| `git.tag` | Git image tag | `{TAG_NAME}` |
| `git.pullPolicy` | Git image pull policy | `Always` |
| `git.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
| `livenessProbe.enabled` | Enable/disable the Liveness probe | `true` |
| `livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated | `30` |
| `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. | `6` |
| `readinessProbe.enabled` | Enable/disable the Readiness probe | `true` |
| `readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated | `5` |
| `readinessProbe.periodSeconds` | How often to perform the probe | `10` |
| `readinessProbe.timeoutSeconds` | When the probe times out | `5` |
| `readinessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | `6` |
| `readinessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed. | `1` |
| `replicaCount` | Number of replicas of the Apache deployment | `docker.io` |
| `htdocsConfigMap` | ConfigMap with the server static content | `nil` |
| `htdocsPVC` | PVC with the server static content | `nil` |
| `vhostsConfigMap` | ConfigMap with the virtual hosts content | `nil` |
| `httpdConfConfigMap` | ConfigMap with the httpd.conf content | `nil` |
| `cloneHtdocsFromGit.enabled` | Get the server static content from a git repository | `false` |
| `cloneHtdocsFromGit.repository` | Repository to clone static content from | `nil` |
| `cloneHtdocsFromGit.branch` | Branch inside the git repository | `nil` |
| `cloneHtdocsFromGit.interval` | Interval for sidecar container pull from the repository | `60` |
| `podAnnotations` | Pod annotations | `{}` |
| `ingress.enabled` | Enable ingress controller resource | `false` |
| `ingress.hostname` | Default host for the ingress resource | `example.local` |
| `ingress.certManager` | Add annotations for cert-manager | `false` |
| `ingress.annotations` | Ingress annotations | `[]` |
| `ingress.hosts[0].name` | Hostname to your Apache installation | `example.local` |
| `ingress.hosts[0].path` | Path within the url structure | `/` |
| `ingress.tls[0].hosts[0]` | TLS hosts | `example.local` |
| `ingress.tls[0].secretName` | TLS Secret (certificates) | `example.local-tls` |
| `ingress.secrets[0].name` | TLS Secret Name | `nil` |
| `ingress.secrets[0].certificate` | TLS Secret Certificate | `nil` |
| `ingress.secrets[0].key` | TLS Secret Key | `nil` |
| `affinity` | Map of node/pod affinities | `{}` |
| `resources` | Resource requests/limit | {} |
| `metrics.enabled` | Start a side-car prometheus exporter | `false` |
| `metrics.image.registry` | Apache exporter image registry | `docker.io` |
| `metrics.image.repository` | Apache exporter image name | `lusotycoon/apache-exporter` |
| `metrics.image.tag` | Apache exporter image tag | `v0.5.0` |
| `metrics.image.pullPolicy` | Apache exporter 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: "9117"}` |
| `metrics.resources` | Exporter resource requests/limit | {} |
| `service.type` | Kubernetes Service type | `LoadBalancer` |
| `service.port` | Service HTTP port | `80` |
| `service.httpsPort` | Service HTTPS port | `443` |
| `service.nodePorts.http` | Kubernetes http node port | `""` |
| `service.nodePorts.https` | Kubernetes https 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,
+101 -102
View File
@@ -32,123 +32,122 @@ spec:
spec:
{{- include "apache.imagePullSecrets" . | nindent 6 }}
hostAliases:
- ip: "127.0.0.1"
hostnames:
- "status.localhost"
- ip: "127.0.0.1"
hostnames:
- "status.localhost"
{{- if .Values.cloneHtdocsFromGit.enabled }}
initContainers:
- name: git-clone-repository
image: "{{ template "git.image" . }}"
imagePullPolicy: {{ .Values.git.pullPolicy | quote }}
command:
- /bin/bash
- -ec
- |
git clone {{ .Values.cloneHtdocsFromGit.repository }} --branch {{ .Values.cloneHtdocsFromGit.branch }} /app
volumeMounts:
- name: htdocs
mountPath: /app
- name: git-clone-repository
image: "{{ template "git.image" . }}"
imagePullPolicy: {{ .Values.git.pullPolicy | quote }}
command:
- /bin/bash
- -ec
- |
git clone {{ .Values.cloneHtdocsFromGit.repository }} --branch {{ .Values.cloneHtdocsFromGit.branch }} /app
volumeMounts:
- name: htdocs
mountPath: /app
containers:
- name: git-repo-syncer
image: "{{ template "git.image" . }}"
imagePullPolicy: {{ .Values.git.pullPolicy | quote }}
command:
- /bin/bash
- -ec
- |
while true; do
cd /app && git pull origin {{ .Values.cloneHtdocsFromGit.branch }}
sleep {{ .Values.cloneHtdocsFromGit.interval }}
done
volumeMounts:
- name: htdocs
mountPath: /app
- name: git-repo-syncer
image: "{{ template "git.image" . }}"
imagePullPolicy: {{ .Values.git.pullPolicy | quote }}
command:
- /bin/bash
- -ec
- |
while true; do
cd /app && git pull origin {{ .Values.cloneHtdocsFromGit.branch }}
sleep {{ .Values.cloneHtdocsFromGit.interval }}
done
volumeMounts:
- name: htdocs
mountPath: /app
{{- else }}
containers:
{{- end }}
- name: "{{ template "apache.fullname" . }}"
image: "{{ template "apache.image" . }}"
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
ports:
- name: http
containerPort: 8080
- name: https
containerPort: 8443
{{- if .Values.livenessProbe.enabled }}
livenessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
successThreshold: {{ .Values.livenessProbe.successThreshold }}
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
- name: "{{ template "apache.fullname" . }}"
image: "{{ template "apache.image" . }}"
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
ports:
- name: http
containerPort: 8080
- name: https
containerPort: 8443
{{- if .Values.livenessProbe.enabled }}
livenessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
successThreshold: {{ .Values.livenessProbe.successThreshold }}
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
{{- end }}
{{- if .Values.readinessProbe.enabled }}
readinessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
successThreshold: {{ .Values.readinessProbe.successThreshold }}
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
{{- end }}
resources: {{ toYaml .Values.resources | nindent 12 }}
volumeMounts:
{{- if (include "apache.useHtdocs" .) }}
- name: htdocs
mountPath: /app
{{- end }}
{{- if or (.Files.Glob "files/vhosts/*.conf") (.Values.vhostsConfigMap) }}
- name: vhosts
mountPath: /vhosts
{{- end }}
{{- if or (.Files.Glob "files/httpd.conf") (.Values.httpdConfConfigMap) }}
- name: httpd-conf
mountPath: /opt/bitnami/apache/conf/httpd.conf
subPath: httpd.conf
{{- end }}
{{- if .Values.metrics.enabled }}
- name: metrics
image: {{ template "apache.metrics.image" . }}
imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }}
command: ['/bin/apache_exporter', '-scrape_uri', 'http://status.localhost:8080/server-status/?auto']
ports:
- name: metrics
containerPort: 9117
livenessProbe:
httpGet:
path: /metrics
port: metrics
initialDelaySeconds: 15
timeoutSeconds: 5
readinessProbe:
httpGet:
path: /metrics
port: metrics
initialDelaySeconds: 5
timeoutSeconds: 1
resources: {{- toYaml .Values.metrics.resources | nindent 12 }}
{{- end }}
{{- if .Values.readinessProbe.enabled }}
readinessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
successThreshold: {{ .Values.readinessProbe.successThreshold }}
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
{{- end }}
resources: {{ toYaml .Values.resources | nindent 10 }}
volumeMounts:
volumes:
{{- if (include "apache.useHtdocs" .) }}
- name: htdocs
mountPath: /app
{{- include "apache.htdocsVolume" . | nindent 10 }}
{{- end }}
{{- if or (.Files.Glob "files/vhosts/*.conf") (.Values.vhostsConfigMap) }}
- name: vhosts
mountPath: /vhosts
configMap:
name: {{ include "apache.vhostsConfigMap" . }}
{{- end }}
{{- if or (.Files.Glob "files/httpd.conf") (.Values.httpdConfConfigMap) }}
- name: httpd-conf
mountPath: /opt/bitnami/apache/conf/httpd.conf
subPath: httpd.conf
configMap:
name: {{ include "apache.httpdConfConfigMap" . }}
{{- end }}
{{- if .Values.metrics.enabled }}
- name: metrics
image: {{ template "apache.metrics.image" . }}
imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }}
command: [ '/bin/apache_exporter', '-scrape_uri', 'http://status.localhost:8080/server-status/?auto']
ports:
- name: metrics
containerPort: 9117
livenessProbe:
httpGet:
path: /metrics
port: metrics
initialDelaySeconds: 15
timeoutSeconds: 5
readinessProbe:
httpGet:
path: /metrics
port: metrics
initialDelaySeconds: 5
timeoutSeconds: 1
resources: {{ toYaml .Values.metrics.resources | nindent 10 }}
{{- end }}
volumes:
{{- if (include "apache.useHtdocs" .) }}
- name: htdocs
{{- include "apache.htdocsVolume" . | nindent 8 }}
{{- end }}
{{- if or (.Files.Glob "files/vhosts/*.conf") (.Values.vhostsConfigMap) }}
- name: vhosts
configMap:
name: {{ include "apache.vhostsConfigMap" . }}
{{- end }}
{{- if or (.Files.Glob "files/httpd.conf") (.Values.httpdConfConfigMap) }}
- name: httpd-conf
configMap:
name: {{ include "apache.httpdConfConfigMap" . }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
affinity: {{- toYaml . | nindent 8 }}
{{- end }}
+19 -20
View File
@@ -17,26 +17,25 @@ metadata:
{{- end }}
spec:
rules:
{{- if .Values.ingress.hostname }}
- host: {{ .Values.ingress.hostname }}
http:
paths:
- path: /
backend:
serviceName: "{{ template "apache.fullname" $ }}"
servicePort: http
{{- end }}
{{- range .Values.ingress.hosts }}
- host: {{ .name }}
http:
paths:
- path: {{ default "/" .path }}
backend:
serviceName: "{{ template "apache.fullname" $ }}"
servicePort: http
{{- end }}
{{- if .Values.ingress.hostname }}
- host: {{ .Values.ingress.hostname }}
http:
paths:
- path: /
backend:
serviceName: "{{ template "apache.fullname" $ }}"
servicePort: http
{{- end }}
{{- range .Values.ingress.hosts }}
- host: {{ .name }}
http:
paths:
- path: {{ default "/" .path }}
backend:
serviceName: "{{ template "apache.fullname" $ }}"
servicePort: http
{{- end }}
{{- if .Values.ingress.tls }}
tls:
{{ toYaml .Values.ingress.tls | indent 4 }}
tls: {{- toYaml .Values.ingress.tls | nindent 4 }}
{{- end }}
{{- end }}
+4 -4
View File
@@ -138,9 +138,9 @@ ingress:
## The tls configuration for the ingress
## see: https://kubernetes.io/docs/concepts/services-networking/ingress/#tls
tls:
- hosts:
- example.local
secretName: example.local-tls
- hosts:
- example.local
secretName: example.local-tls
secrets:
## If you're providing your own certificates, please use this to add the certificates as secrets
@@ -185,7 +185,7 @@ metrics:
## Metrics exporter resource requests and limits
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
##
# resources: {}
resources: {}
service:
type: LoadBalancer
# HTTP Port