Commit db61b655 by Guangbo Chen

fixed chart bugs and update wp ingress setting

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