Commit db61b655 by Guangbo Chen

fixed chart bugs and update wp ingress setting

parent 06eb5296
...@@ -74,35 +74,31 @@ questions: ...@@ -74,35 +74,31 @@ questions:
type: string type: string
label: External Database Host label: External Database Host
show_if: "mariadb.enabled=false" show_if: "mariadb.enabled=false"
required: true subquestions:
- variable: externalDatabase.user - variable: externalDatabase.user
default: "" default: ""
description: "Existing username in the external DB" description: "Existing username in the external DB"
type: string type: string
label: External Database Username label: External Database Username
show_if: "mariadb.enabled=false" show_if: "mariadb.enabled=false"
required: true
- variable: externalDatabase.password - variable: externalDatabase.password
default: "" default: ""
description: "External database password" description: "External database password"
type: password type: password
label: External Database Password label: External Database Password
show_if: "mariadb.enabled=false" show_if: "mariadb.enabled=false"
required: true
- variable: externalDatabase.database - variable: externalDatabase.database
default: "" default: ""
description: "Name of the existing database" description: "Name of the existing database"
type: string type: string
label: External Database label: External Database
show_if: "mariadb.enabled=false" show_if: "mariadb.enabled=false"
required: true
- variable: externalDatabase.port - variable: externalDatabase.port
default: "3306" default: "3306"
description: "External database port number " description: "External database port number "
type: string type: string
label: External Database Port label: External Database Port
show_if: "mariadb.enabled=false" show_if: "mariadb.enabled=false"
required: true
- variable: mariadb.persistence.enabled - variable: mariadb.persistence.enabled
default: "false" default: "false"
description: "Enable persistence using PVC of MariaDB" description: "Enable persistence using PVC of MariaDB"
...@@ -137,7 +133,6 @@ questions: ...@@ -137,7 +133,6 @@ questions:
default: "" default: ""
description: "Load Balancer IP for the Magento ServiceMagento Service type" description: "Load Balancer IP for the Magento ServiceMagento Service type"
type: string type: string
required: true
show_if: "serviceType=LoadBalancer" show_if: "serviceType=LoadBalancer"
label: Magento LoadBalancer IP label: Magento LoadBalancer IP
- variable: magentoMode - variable: magentoMode
......
...@@ -9,21 +9,28 @@ questions: ...@@ -9,21 +9,28 @@ questions:
type: boolean type: boolean
show_subquestion_if: false show_subquestion_if: false
subquestions: subquestions:
- variable: image.registry
default: "docker.io"
description: "Docker image registry "
type: string
label: Docker Image Registry
- variable: image.repository - variable: image.repository
default: "bitnami/mariadb" default: "bitnami/mariadb"
description: "Docker image name" description: "Docker image name"
type: string type: string
label: Docker Image Name label: MariaDB Image Name
- variable: image.tag - variable: image.tag
default: "10.1.32" default: "10.1.32"
description: "Docker image tag" description: "Docker image tag"
type: string type: string
label: Image Tag label: MariaDB Image Tag
- variable: metrics.image
default: "prom/mysqld-exporter"
description: "image name for metrics"
type: string
label: Metrics Image Name
show_if: "metrics.enabled=true"
- variable: metrics.imageTag
default: "v0.10.0"
description: "image tag for metrics"
type: string
label: Metrics Image Tag
show_if: "metrics.enabled=true"
- variable: usePassword - variable: usePassword
default: "true" default: "true"
description: "Enable password authentication" description: "Enable password authentication"
...@@ -58,6 +65,14 @@ questions: ...@@ -58,6 +65,14 @@ questions:
- "NodePort" - "NodePort"
required: true required: true
label: MariaDB Service Type label: MariaDB Service Type
- variable: service.nodePort
default: ""
description: "NodePort port number(to set explicitly, choose port between 30000-32767)"
type: int
min: 30000
max: 32767
show_if: "service.type=NodePort"
label: Service NodePort number
- variable: persistence.enabled - variable: persistence.enabled
default: "false" default: "false"
description: "Enable persistent volume for MariaDB" description: "Enable persistent volume for MariaDB"
......
...@@ -37,7 +37,7 @@ spec: ...@@ -37,7 +37,7 @@ spec:
mountPath: /bitnami/mariadb mountPath: /bitnami/mariadb
containers: containers:
- name: mariadb - name: mariadb
image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}" image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy | quote }} imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
env: env:
{{- if .Values.usePassword }} {{- if .Values.usePassword }}
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
## ref: https://hub.docker.com/r/bitnami/mariadb/tags/ ## ref: https://hub.docker.com/r/bitnami/mariadb/tags/
## ##
image: image:
registry: docker.io # registry: docker.io
repository: bitnami/mariadb repository: bitnami/mariadb
tag: 10.1.32 tag: 10.1.32
## Specify a imagePullPolicy ## Specify a imagePullPolicy
......
...@@ -9,10 +9,15 @@ questions: ...@@ -9,10 +9,15 @@ questions:
show_subquestion_if: false show_subquestion_if: false
subquestions: subquestions:
- variable: image - variable: image
default: "memcached:1.5.6-alpine" default: "memcached"
description: "Memcached Docker image" description: "Memcached Docker image"
type: string type: string
label: Memcached Docker Image label: Memcached Docker Image
- variable: imageTag
default: "1.5.6-alpine"
description: "memcached Docker image tag"
type: string
label: Memcached Docker Image Tag
- variable: replicaCount - variable: replicaCount
default: "3" default: "3"
description: "Number or Memcached pods to run" description: "Number or Memcached pods to run"
......
...@@ -8,6 +8,8 @@ metadata: ...@@ -8,6 +8,8 @@ metadata:
release: "{{ .Release.Name }}" release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}" heritage: "{{ .Release.Service }}"
spec: spec:
updateStrategy:
type: RollingUpdate
serviceName: {{ template "memcached.fullname" . }} serviceName: {{ template "memcached.fullname" . }}
replicas: {{ .Values.replicaCount }} replicas: {{ .Values.replicaCount }}
template: template:
...@@ -39,7 +41,7 @@ spec: ...@@ -39,7 +41,7 @@ spec:
{{- end }} {{- end }}
containers: containers:
- name: {{ template "memcached.fullname" . }} - name: {{ template "memcached.fullname" . }}
image: {{ .Values.image }} image: "{{ .Values.image }}:{{ .Values.imageTag }}"
imagePullPolicy: {{ default "" .Values.imagePullPolicy | quote }} imagePullPolicy: {{ default "" .Values.imagePullPolicy | quote }}
command: command:
- memcached - memcached
......
## Memcached image and tag ## Memcached image and tag
## ref: https://hub.docker.com/r/library/memcached/tags/ ## ref: https://hub.docker.com/r/library/memcached/tags/
## ##
image: memcached:1.5.6-alpine image: memcached
imageTag: 1.5.6-alpine
## Specify a imagePullPolicy ## Specify a imagePullPolicy
## 'Always' if imageTag is 'latest', else set to 'IfNotPresent' ## 'Always' if imageTag is 'latest', else set to 'IfNotPresent'
......
{{- if .Values.runtest }}
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:
...@@ -10,3 +11,4 @@ metadata: ...@@ -10,3 +11,4 @@ metadata:
data: data:
mongodb-up-test.sh: | mongodb-up-test.sh: |
{{ .Files.Get "tests/mongodb-up-test.sh" | indent 4 }} {{ .Files.Get "tests/mongodb-up-test.sh" | indent 4 }}
{{- end }}
{{- if .Values.runtest }}
apiVersion: v1 apiVersion: v1
kind: Pod kind: Pod
metadata: metadata:
...@@ -47,3 +48,4 @@ spec: ...@@ -47,3 +48,4 @@ spec:
configMap: configMap:
name: {{ template "mongodb-replicaset.fullname" . }}-tests name: {{ template "mongodb-replicaset.fullname" . }}-tests
restartPolicy: Never restartPolicy: Never
{{- end }}
...@@ -103,3 +103,6 @@ livenessProbe: ...@@ -103,3 +103,6 @@ livenessProbe:
failureThreshold: 3 failureThreshold: 3
periodSeconds: 10 periodSeconds: 10
successThreshold: 1 successThreshold: 1
# whether run helm test or nnot
runtest: false
...@@ -9,11 +9,6 @@ questions: ...@@ -9,11 +9,6 @@ questions:
type: boolean type: boolean
show_subquestion_if: false show_subquestion_if: false
subquestions: subquestions:
- variable: image.registry
default: "docker.io"
description: "MongoDB image registry"
type: string
label: MongoDB Image Registry
- variable: image.repository - variable: image.repository
default: "bitnami/mongodb" default: "bitnami/mongodb"
description: "MongoDB image name" description: "MongoDB image name"
...@@ -28,7 +23,7 @@ questions: ...@@ -28,7 +23,7 @@ questions:
default: "false" default: "false"
description: "Enabling access control on a MongoDB deployment enforces authentication, requiring users to identify themselves" description: "Enabling access control on a MongoDB deployment enforces authentication, requiring users to identify themselves"
type: boolean type: boolean
label: Enable Auth label: Enable Auth
required: true required: true
show_subquestion_if: true show_subquestion_if: true
subquestions: subquestions:
...@@ -62,7 +57,9 @@ questions: ...@@ -62,7 +57,9 @@ questions:
- variable: service.nodePort - variable: service.nodePort
default: "" default: ""
description: "NodePort port number(to set explicitly, choose port between 30000-32767)" description: "NodePort port number(to set explicitly, choose port between 30000-32767)"
type: string type: int
min: 30000
max: 32767
show_if: "service.type=NodePort" show_if: "service.type=NodePort"
label: Service NodePort number label: Service NodePort number
- variable: persistence.enabled - variable: persistence.enabled
......
...@@ -25,7 +25,7 @@ spec: ...@@ -25,7 +25,7 @@ spec:
{{- end }} {{- end }}
containers: containers:
- name: {{ template "mongodb.fullname" . }} - name: {{ template "mongodb.fullname" . }}
image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}" image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy | quote }} imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
env: env:
- name: MONGODB_ROOT_PASSWORD - name: MONGODB_ROOT_PASSWORD
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
## ref: https://hub.docker.com/r/bitnami/mongodb/tags/ ## ref: https://hub.docker.com/r/bitnami/mongodb/tags/
## ##
image: image:
registry: docker.io # registry: docker.io DISABLED
repository: bitnami/mongodb repository: bitnami/mongodb
tag: 3.7.3 tag: 3.7.3
## Specify a imagePullPolicy ## Specify a imagePullPolicy
......
...@@ -73,6 +73,8 @@ questions: ...@@ -73,6 +73,8 @@ questions:
- variable: service.nodePort - variable: service.nodePort
default: "" default: ""
description: "NodePort port number(to set explicitly, choose port between 30000-32767)" description: "NodePort port number(to set explicitly, choose port between 30000-32767)"
type: string type: int
min: 30000
max: 32767
show_if: "service.type=NodePort" show_if: "service.type=NodePort"
label: Service NodePort number label: Service NodePort number
...@@ -91,7 +91,7 @@ Specify each parameter using the `--set key=value[,key=value]` argument to `helm ...@@ -91,7 +91,7 @@ Specify each parameter using the `--set key=value[,key=value]` argument to `helm
```bash ```bash
$ helm install --name my-release \ $ helm install --name my-release \
--set redisPassword=secretpassword \ --set password=secretpassword \
stable/redis stable/redis
``` ```
......
...@@ -9,11 +9,6 @@ questions: ...@@ -9,11 +9,6 @@ questions:
type: boolean type: boolean
show_subquestion_if: false show_subquestion_if: false
subquestions: subquestions:
- variable: image.registry
default: "docker.io"
description: "Docker image registry"
type: string
label: Redis Image Registry
- variable: image.repository - variable: image.repository
default: "bitnami/redis" default: "bitnami/redis"
description: "Docker image name" description: "Docker image name"
...@@ -44,7 +39,7 @@ questions: ...@@ -44,7 +39,7 @@ questions:
label: Enable Redis Password label: Enable Redis Password
show_subquestion_if: true show_subquestion_if: true
subquestions: subquestions:
- variable: redisPassword - variable: password
default: "" default: ""
description: "Redis password, defaults to a random 10-character alphanumeric string if not set" description: "Redis password, defaults to a random 10-character alphanumeric string if not set"
type: password type: password
...@@ -64,9 +59,9 @@ questions: ...@@ -64,9 +59,9 @@ questions:
label: Persistent Volume Size label: Persistent Volume Size
- variable: master.persistence.path - variable: master.persistence.path
default: "/redis/data" default: "/redis/data"
description: "Persistent volume size" description: "Persistent volume path"
type: string type: string
label: Persistent Volume Size label: Persistent Volume Path
- variable: master.persistence.storageClass - variable: master.persistence.storageClass
default: "" default: ""
description: "If undefined or null, uses the default StorageClass. Defaults to null." description: "If undefined or null, uses the default StorageClass. Defaults to null."
......
...@@ -46,18 +46,16 @@ Return the appropriate apiVersion for networkpolicy. ...@@ -46,18 +46,16 @@ Return the appropriate apiVersion for networkpolicy.
Return the proper image name Return the proper image name
*/}} */}}
{{- define "redis.image" -}} {{- define "redis.image" -}}
{{- $registryName := default .Values.image.registry "docker.io" -}}
{{- $tag := .Values.image.tag | default "latest" -}} {{- $tag := .Values.image.tag | default "latest" -}}
{{- printf "%s/%s:%s" $registryName .Values.image.repository $tag -}} {{- printf "%s:%s" .Values.image.repository $tag -}}
{{- end -}} {{- end -}}
{{/* {{/*
Return the proper image name (for the metrics image) Return the proper image name (for the metrics image)
*/}} */}}
{{- define "metrics.image" -}} {{- define "metrics.image" -}}
{{- $registryName := default .Values.metrics.image.registry "docker.io" -}}
{{- $tag := .Values.metrics.image.tag | default "latest" -}} {{- $tag := .Values.metrics.image.tag | default "latest" -}}
{{- printf "%s/%s:%s" $registryName .Values.metrics.image.repository $tag -}} {{- printf "%s:%s" .Values.metrics.image.repository $tag -}}
{{- end -}} {{- end -}}
{{/* {{/*
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
## ref: https://hub.docker.com/r/bitnami/redis/tags/ ## ref: https://hub.docker.com/r/bitnami/redis/tags/
## ##
image: image:
registry: docker.io # registry: docker.io
repository: bitnami/redis repository: bitnami/redis
tag: 4.0.9 tag: 4.0.9
## Specify a imagePullPolicy ## Specify a imagePullPolicy
...@@ -31,7 +31,7 @@ metrics: ...@@ -31,7 +31,7 @@ metrics:
# prometheus.io/scrape: "true" # prometheus.io/scrape: "true"
# prometheus.io/port: "9121" # prometheus.io/port: "9121"
image: image:
registry: docker.io # registry: docker.io
repository: oliver006/redis_exporter repository: oliver006/redis_exporter
tag: v0.11 tag: v0.11
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
...@@ -113,21 +113,21 @@ master: ...@@ -113,21 +113,21 @@ master:
## Redis Master Liveness Probe ## Redis Master Liveness Probe
livenessProbe: livenessProbe:
enabled: false enabled: true
# initialDelaySeconds: 30 initialDelaySeconds: 30
# periodSeconds: 10 periodSeconds: 10
# timeoutSeconds: 5 timeoutSeconds: 5
# successThreshold: 1 successThreshold: 1
# failureThreshold: 5 failureThreshold: 5
## Redis Master Readiness Probe ## Redis Master Readiness Probe
readinessProbe: readinessProbe:
enabled: false enabled: true
# initialDelaySeconds: 5 initialDelaySeconds: 5
# periodSeconds: 10 periodSeconds: 10
# timeoutSeconds: 1 timeoutSeconds: 1
# successThreshold: 1 successThreshold: 1
# failureThreshold: 5 failureThreshold: 5
## Redis Master Node labels and tolerations for pod assignment ## Redis Master Node labels and tolerations for pod assignment
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#taints-and-tolerations-beta-feature ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#taints-and-tolerations-beta-feature
......
dependencies:
- name: mariadb
repository: https://kubernetes-charts.storage.googleapis.com/
version: 2.1.1
digest: sha256:abb98724b82fbb89b183dbd016f18c207c3bfb4970d5c8770a884af1c5304dbc
generated: 2017-12-13T12:24:01.108769296Z
name: wordpress name: wordpress
version: 1.0.2 version: 1.0.5
appVersion: 4.9.4 appVersion: 4.9.5
description: Web publishing platform for building blogs and websites. description: Web publishing platform for building blogs and websites.
icon: https://bitnami.com/assets/stacks/wordpress/img/wordpress-stack-220x234.png icon: https://bitnami.com/assets/stacks/wordpress/img/wordpress-stack-220x234.png
keywords: keywords:
......
...@@ -90,6 +90,7 @@ The following table lists the configurable parameters of the WordPress chart and ...@@ -90,6 +90,7 @@ The following table lists the configurable parameters of the WordPress chart and
| `ingress.secrets[0].certificate` | TLS Secret Certificate | `nil` | | `ingress.secrets[0].certificate` | TLS Secret Certificate | `nil` |
| `ingress.secrets[0].key` | TLS Secret Key | `nil` | | `ingress.secrets[0].key` | TLS Secret Key | `nil` |
| `persistence.enabled` | Enable persistence using PVC | `true` | | `persistence.enabled` | Enable persistence using PVC | `true` |
| `persistence.existingClaim` | Enable persistence using an existing PVC | `nil` |
| `persistence.storageClass` | PVC Storage Class | `nil` (uses alpha storage class annotation) | | `persistence.storageClass` | PVC Storage Class | `nil` (uses alpha storage class annotation) |
| `persistence.accessMode` | PVC Access Mode | `ReadWriteOnce` | | `persistence.accessMode` | PVC Access Mode | `ReadWriteOnce` |
| `persistence.size` | PVC Storage Request | `10Gi` | | `persistence.size` | PVC Storage Request | `10Gi` |
......
...@@ -9,11 +9,6 @@ questions: ...@@ -9,11 +9,6 @@ questions:
type: boolean type: boolean
show_subquestion_if: false show_subquestion_if: false
subquestions: subquestions:
- variable: image.registry
default: "docker.io"
description: "WordPress image registry "
type: string
label: WordPress Image Registry
- variable: image.repository - variable: image.repository
default: "bitnami/wordpress" default: "bitnami/wordpress"
description: "WordPress image name" description: "WordPress image name"
...@@ -24,6 +19,16 @@ questions: ...@@ -24,6 +19,16 @@ questions:
description: "WordPress image tag" description: "WordPress image tag"
type: string type: string
label: Image Tag label: Image Tag
- variable: mariadb.image.repository
default: "bitnami/mariadb"
description: "WordPress image name"
type: string
label: WordPress Image Name
- variable: mariadb.image.tag
default: "10.1.32"
description: "WordPress image tag"
type: string
label: Image Tag
- variable: wordpressUsername - variable: wordpressUsername
default: "user" default: "user"
description: "User of the application" description: "User of the application"
...@@ -132,43 +137,42 @@ questions: ...@@ -132,43 +137,42 @@ questions:
type: storageclass type: storageclass
label: Default StorageClass for WordPress label: Default StorageClass for WordPress
- variable: serviceType - variable: serviceType
default: "NodePort" default: "ClusterIP"
description: "WordPress Service type" description: "WordPress Service type"
type: enum type: enum
show_if: "ingress.enabled=false"
options: options:
- "ClusterIP" - "ClusterIP"
- "NodePort" - "NodePort"
- "LoadBalancer" - "LoadBalancer"
required: true required: true
label: WordPress Service Type label: WordPress Service Type
- variable: nodePorts.http show_subquestion_if: "NodePort"
default: "32763" subquestions:
description: "NodePort http port(to set explicitly, choose port between 30000-32767)" - variable: nodePorts.http
type: string default: ""
label: NodePort Http Port description: "NodePort http port(to set explicitly, choose port between 30000-32767)"
show_if: "serviceType=NodePort" type: int
- variable: nodePorts.https min: 30000
default: "32764" max: 32767
description: "NodePort https port(to set explicitly, choose port between 30000-32767)" label: NodePort Http Port
type: string - variable: nodePorts.https
label: NodePort Https Port default: ""
show_if: "serviceType=NodePort" description: "NodePort https port(to set explicitly, choose port between 30000-32767)"
type: int
min: 30000
max: 32767
label: NodePort Https Port
- variable: ingress.enabled - variable: ingress.enabled
default: "false" default: "true"
description: "Enable ingress controller resource" description: "Enable ingress controller resource"
type: boolean type: boolean
label: Enable External Access label: Expose app using Layer 7 Load Balancer
show_subquestion_if: true show_subquestion_if: true
subquestions: subquestions:
- variable: ingress.hosts[0].name - variable: ingress.hosts[0].name
default: "wordpress.local" default: ""
description: "Hostname to your WordPress installation" description: "Hostname to your WordPress installation"
type: string type: hostname
required: true
label: Hostname
- variable: ingress.hosts[0].path
default: "/"
description: "Path within the url structure"
type: string
required: true required: true
label: Hostname label: Hostname
dependencies:
- name: mariadb
repository: file://../../mariadb/v3.0.3
version: 3.0.3
digest: sha256:eb60f6d26271c1f638fef6090e664a880fdd03daf066c26da37cc07a5b8367cd
generated: 2018-04-27T15:27:47.416541908+08:00
dependencies: dependencies:
- name: mariadb - name: mariadb
version: 2.1.1 version: 3.0.3
repository: https://kubernetes-charts.storage.googleapis.com/ repository: "file://../../mariadb/v3.0.3"
condition: mariadb.enabled condition: mariadb.enabled
tags: tags:
- wordpress-database - wordpress-database
...@@ -22,7 +22,7 @@ spec: ...@@ -22,7 +22,7 @@ spec:
{{- end }} {{- end }}
containers: containers:
- name: {{ template "fullname" . }} - name: {{ template "fullname" . }}
image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}" image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy | quote }} imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
env: env:
- name: ALLOW_EMPTY_PASSWORD - name: ALLOW_EMPTY_PASSWORD
...@@ -138,7 +138,7 @@ spec: ...@@ -138,7 +138,7 @@ spec:
- name: wordpress-data - name: wordpress-data
{{- if .Values.persistence.enabled }} {{- if .Values.persistence.enabled }}
persistentVolumeClaim: persistentVolumeClaim:
claimName: {{ template "fullname" . }} claimName: {{ .Values.persistence.existingClaim | default (include "fullname" .) }}
{{- else }} {{- else }}
emptyDir: {} emptyDir: {}
{{ end }} {{ end }}
......
{{- if .Values.persistence.enabled -}} {{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }}
kind: PersistentVolumeClaim kind: PersistentVolumeClaim
apiVersion: v1 apiVersion: v1
metadata: metadata:
......
...@@ -9,7 +9,7 @@ metadata: ...@@ -9,7 +9,7 @@ metadata:
heritage: "{{ .Release.Service }}" heritage: "{{ .Release.Service }}"
spec: spec:
type: {{ .Values.serviceType }} type: {{ .Values.serviceType }}
{{- if ne .Values.serviceType "ClusterIP" }} {{- if (or (eq .Values.serviceType "LoadBalancer") (eq .Values.serviceType "NodePort")) }}
externalTrafficPolicy: {{ .Values.serviceExternalTrafficPolicy | quote }} externalTrafficPolicy: {{ .Values.serviceExternalTrafficPolicy | quote }}
{{- end }} {{- end }}
ports: ports:
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
## ref: https://hub.docker.com/r/bitnami/wordpress/tags/ ## ref: https://hub.docker.com/r/bitnami/wordpress/tags/
## ##
image: image:
registry: docker.io # registry: docker.io
repository: bitnami/wordpress repository: bitnami/wordpress
tag: 4.9.4 tag: 4.9.5
## Specify a imagePullPolicy ## Specify a imagePullPolicy
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
...@@ -129,7 +129,7 @@ mariadb: ...@@ -129,7 +129,7 @@ mariadb:
size: 8Gi size: 8Gi
## Kubernetes configuration ## Kubernetes configuration
## For minikube, set this to NodePort, elsewhere use LoadBalancer ## For minikube, set this to NodePort, elsewhere use LoadBalancer or ClusterIP
## ##
serviceType: LoadBalancer serviceType: LoadBalancer
## ##
...@@ -222,6 +222,10 @@ persistence: ...@@ -222,6 +222,10 @@ persistence:
## GKE, AWS & OpenStack) ## GKE, AWS & OpenStack)
## ##
# storageClass: "-" # storageClass: "-"
##
## If you want to reuse an existing claim, you can pass the name of the PVC using
## the existingClaim variable
# existingClaim: your-claim
accessMode: ReadWriteOnce accessMode: ReadWriteOnce
size: 10Gi size: 10Gi
......
...@@ -10,6 +10,14 @@ questions: ...@@ -10,6 +10,14 @@ questions:
- "NodePort" - "NodePort"
- "LoadBalancer" - "LoadBalancer"
label: Longhorn UI Service label: Longhorn UI Service
- variable: service.ui.nodePort
default: ""
description: "NodePort port number(to set explicitly, choose port between 30000-32767)"
type: int
min: 30000
max: 32767
show_if: "service.ui.type=NodePort"
label: UI Service NodePort number
- variable: service.manager.type - variable: service.manager.type
default: "ClusterIP" default: "ClusterIP"
description: "Define Longhorn manager service type" description: "Define Longhorn manager service type"
...@@ -18,6 +26,14 @@ questions: ...@@ -18,6 +26,14 @@ questions:
- "ClusterIP" - "ClusterIP"
- "NodePort" - "NodePort"
label: Longhorn Manager Service label: Longhorn Manager Service
- variable: service.manager.nodePort
default: ""
description: "NodePort port number(to set explicitly, choose port between 30000-32767)"
type: int
min: 30000
max: 32767
show_if: "service.manager.type=NodePort"
label: Manager Service NodePort number
- variable: persistence.defaultClass - variable: persistence.defaultClass
default: "true" default: "true"
description: "Set as default StorageClass" description: "Set as default StorageClass"
......
...@@ -96,3 +96,6 @@ spec: ...@@ -96,3 +96,6 @@ spec:
- name: manager - name: manager
port: 9500 port: 9500
targetPort: manager targetPort: manager
{{- if .Values.service.manager.nodePort }}
nodePort: {{ .Values.service.manager.nodePort }}
{{- end }}
...@@ -30,10 +30,13 @@ metadata: ...@@ -30,10 +30,13 @@ metadata:
name: longhorn-frontend name: longhorn-frontend
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
spec: spec:
type: {{ .Values.service.ui.type }}
selector: selector:
app: {{ .Release.Namespace }}-ui app: {{ .Release.Namespace }}-ui
ports: ports:
- name: longhorn-ui - name: longhorn-ui
port: 80 port: 80
targetPort: longhorn-ui targetPort: longhorn-ui
type: {{ .Values.service.ui.type }} {{- if .Values.service.ui.nodePort }}
nodePort: {{ .Values.service.ui.nodePort }}
{{- end }}
...@@ -9,7 +9,7 @@ metadata: ...@@ -9,7 +9,7 @@ metadata:
annotations: annotations:
storageclass.beta.kubernetes.io/is-default-class: "false" storageclass.beta.kubernetes.io/is-default-class: "false"
{{- end }} {{- end }}
provisioner: rancher.io/longhorn provisioner: rancher.io/{{ .Release.Name }}
parameters: parameters:
numberOfReplicas: "3" numberOfReplicas: "3"
staleReplicaTimeout: "30" staleReplicaTimeout: "30"
......
...@@ -11,8 +11,10 @@ image: ...@@ -11,8 +11,10 @@ image:
service: service:
ui: ui:
type: NodePort type: NodePort
nodePort: ""
manager: manager:
type: ClusterIP type: ClusterIP
nodePort: ""
persistence: persistence:
# for GKE uses /home/kubernetes/flexvolume/ instead, User can find the correct directory by running ps aux|grep kubelet on the host and check the --volume-plugin-dir parameter. # for GKE uses /home/kubernetes/flexvolume/ instead, User can find the correct directory by running ps aux|grep kubelet on the host and check the --volume-plugin-dir parameter.
......
...@@ -29,9 +29,16 @@ questions: ...@@ -29,9 +29,16 @@ questions:
- "true" - "true"
- "false" - "false"
required: true required: true
label: Set to Default StorageClass label: Set NFS to Default StorageClass
- variable: persistence.hostPath - variable: persistence.hostPath
default: "/srv" default: ""
description: "for GKE uses /home/kubernetes/nfs/ instead, custom nfs host path read and write permission are required, default to /srv" description: "for GKE uses /home/kubernetes/nfs/ instead, custom nfs host path read and write permission are required, default to /srv"
type: string type: string
label: NFS Host Path label: NFS Host Path
required: true
- variable: nfs.hostPort
default: ""
required: true
description: "specify the host port used for nfs-provisioner server"
type: int
label: NFS Host Port
...@@ -11,6 +11,5 @@ Create a default fully qualified app name. ...@@ -11,6 +11,5 @@ 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). We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}} */}}
{{- define "nfs.fullname" -}} {{- define "nfs.fullname" -}}
{{- $name := default .Chart.Name .Values.nameOverride -}} {{- printf "%s" .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}} {{- end -}}
...@@ -22,7 +22,7 @@ spec: ...@@ -22,7 +22,7 @@ spec:
ports: ports:
- name: nfs - name: nfs
containerPort: 2049 containerPort: 2049
hostPort: 2049 hostPort: {{ .Values.nfs.hostPort }}
- name: mountd - name: mountd
containerPort: 20048 containerPort: 20048
- name: rpcbind - name: rpcbind
......
kind: StorageClass kind: StorageClass
apiVersion: storage.k8s.io/v1 apiVersion: storage.k8s.io/v1
metadata: metadata:
name: {{ .Release.Name }} name: {{ template "nfs.fullname" . }}
{{- if .Values.persistence.defaultClass }} {{- if .Values.persistence.defaultClass }}
annotations: annotations:
storageclass.beta.kubernetes.io/is-default-class: "true" storageclass.beta.kubernetes.io/is-default-class: "true"
...@@ -11,4 +11,4 @@ metadata: ...@@ -11,4 +11,4 @@ metadata:
{{- end }} {{- end }}
labels: labels:
kubernetes.io/cluster-service: "true" kubernetes.io/cluster-service: "true"
provisioner: rancher.io/{{ .Release.Name }} provisioner: rancher.io/{{ template "nfs.fullname" . }}
...@@ -6,6 +6,9 @@ image: ...@@ -6,6 +6,9 @@ image:
tag: v1.0.8 tag: v1.0.8
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
nfs:
hostPort: 2049
persistence: persistence:
defaultClass: true defaultClass: true
hostPath: /srv hostPath: /srv
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment