mirror of
https://github.com/helm/charts.git
synced 2026-08-22 13:57:51 +00:00
adds dokuwiki chart (#319)
This commit is contained in:
committed by
Lachlan Evenson
parent
8f7eb844a3
commit
fe74b4e42e
@@ -0,0 +1 @@
|
||||
.git
|
||||
@@ -0,0 +1,15 @@
|
||||
name: dokuwiki
|
||||
version: 0.1.0
|
||||
description: DokuWiki is a standards-compliant, simple to use wiki optimized for creating documentation. It is targeted at developer teams, workgroups, and small companies. All data is stored in plain text files, so no database is required.
|
||||
keywords:
|
||||
- dokuwiki
|
||||
- wiki
|
||||
- php
|
||||
home: http://www.dokuwiki.org/
|
||||
sources:
|
||||
- https://github.com/bitnami/bitnami-docker-dokuwiki
|
||||
maintainers:
|
||||
- name: Bitnami
|
||||
email: containers@bitnami.com
|
||||
engine: gotpl
|
||||
icon: https://bitnami.com/assets/stacks/dokuwiki/img/dokuwiki-stack-110x117.png
|
||||
@@ -0,0 +1,90 @@
|
||||
# DokuWiki
|
||||
|
||||
[DokuWiki](https://www.dokuwiki.org) DokuWiki is a standards-compliant, simple to use wiki optimized for creating documentation. It is targeted at developer teams, workgroups, and small companies. All data is stored in plain text files, so no database is required.
|
||||
|
||||
## TL;DR;
|
||||
|
||||
```console
|
||||
$ helm install stable/dokuwiki
|
||||
```
|
||||
|
||||
## Introduction
|
||||
|
||||
This chart bootstraps a [DokuWiki](https://github.com/bitnami/bitnami-docker-dokuwiki) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Kubernetes 1.4+ with Beta APIs enabled
|
||||
- PV provisioner support in the underlying infrastructure
|
||||
|
||||
## Installing the Chart
|
||||
|
||||
To install the chart with the release name `my-release`:
|
||||
|
||||
```console
|
||||
$ helm install --name my-release stable/dokuwiki
|
||||
```
|
||||
|
||||
The command deploys DokuWiki on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.
|
||||
|
||||
> **Tip**: List all releases using `helm list`
|
||||
|
||||
## Uninstalling the Chart
|
||||
|
||||
To uninstall/delete the `my-release` deployment:
|
||||
|
||||
```console
|
||||
$ 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 DokuWiki chart and their default values.
|
||||
|
||||
| Parameter | Description | Default |
|
||||
|-------------------------------------|-----------------------------------------|---------------------------------------------------------|
|
||||
| `image` | DokuWiki image | `bitnami/dokuwiki:{VERSION}` |
|
||||
| `imagePullPolicy` | Image pull policy | `Always` if `imageTag` is `latest`, else `IfNotPresent` |
|
||||
| `dokuwikiUsername` | User of the application | `user` |
|
||||
| `dokuwikiFullName` | User's full name | `Full Name` |
|
||||
| `dokuwikiPassword` | Application password | _random 10 character alphanumeric string_ |
|
||||
| `dokuwikiEmail` | User email | `user@example.com` |
|
||||
| `dokuwikiWikiName` | Wiki name | `My Wiki` |
|
||||
| `serviceType` | Kubernetes Service type | `LoadBalancer` |
|
||||
| `persistence.enabled` | Enable persistence using PVC | `true` |
|
||||
| `persistence.apache.storageClass` | PVC Storage Class for apache volume | `generic` |
|
||||
| `persistence.apache.accessMode` | PVC Access Mode for apache volume | `ReadWriteOnce` |
|
||||
| `persistence.apache.size` | PVC Storage Request for apache volume | `1Gi` |
|
||||
| `persistence.dokuwiki.storageClass` | PVC Storage Class for DokuWiki volume | `generic` |
|
||||
| `persistence.dokuwiki.accessMode` | PVC Access Mode for DokuWiki volume | `ReadWriteOnce` |
|
||||
| `persistence.dokuwiki.size` | PVC Storage Request for DokuWiki volume | `8Gi` |
|
||||
| `resources` | CPU/Memory resource requests/limits | Memory: `512Mi`, CPU: `300m` |
|
||||
|
||||
The above parameters map to the env variables defined in [bitnami/dokuwiki](http://github.com/bitnami/bitnami-docker-dokuwiki). For more information please refer to the [bitnami/dokuwiki](http://github.com/bitnami/bitnami-docker-dokuwiki) image documentation.
|
||||
|
||||
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
|
||||
|
||||
```console
|
||||
$ helm install --name my-release \
|
||||
--set dokuwikiUsername=admin,dokuwikiPassword=password \
|
||||
stable/dokuwiki
|
||||
```
|
||||
|
||||
The above command sets the DokuWiki administrator account username and password to `admin` and `password` respectively.
|
||||
|
||||
Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example,
|
||||
|
||||
```console
|
||||
$ helm install --name my-release -f values.yaml stable/dokuwiki
|
||||
```
|
||||
|
||||
> **Tip**: You can use the default [values.yaml](values.yaml)
|
||||
|
||||
## Persistence
|
||||
|
||||
The [Bitnami DokuWiki](https://github.com/bitnami/bitnami-docker-dokuwiki) image stores the DokuWiki data and configurations at the `/bitnami/dokuwiki` and `/bitnami/apache` paths of the container.
|
||||
|
||||
Persistent Volume Claims are used to keep the data across deployments. This is known to work in GCE, AWS, and minikube.
|
||||
See the [Configuration](#configuration) section to configure the PVC or to disable persistence.
|
||||
@@ -0,0 +1,29 @@
|
||||
|
||||
** Please be patient while the chart is being deployed **
|
||||
|
||||
1. Get the DokuWiki URL by running:
|
||||
|
||||
{{- if contains "NodePort" .Values.serviceType }}
|
||||
|
||||
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "fullname" . }})
|
||||
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
|
||||
echo http://$NODE_IP:$NODE_PORT/
|
||||
|
||||
{{- else if contains "LoadBalancer" .Values.serviceType }}
|
||||
|
||||
** Please ensure an external IP is associated to the {{ template "fullname" . }} service before proceeding **
|
||||
** Watch the status using: kubectl get svc --namespace {{ .Release.Namespace }} -w {{ template "fullname" . }} **
|
||||
|
||||
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
|
||||
echo http://$SERVICE_IP/
|
||||
{{- else if contains "ClusterIP" .Values.serviceType }}
|
||||
|
||||
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "fullname" . }}" -o jsonpath="{.items[0].metadata.name}")
|
||||
echo http://127.0.0.1:8080/
|
||||
kubectl port-forward $POD_NAME 8080:80
|
||||
{{- end }}
|
||||
|
||||
2. Login with the following credentials
|
||||
|
||||
echo Username: {{ .Values.dokuwikiUsername }}
|
||||
echo Password: $(printf $(printf '\%o' `kubectl get secret --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath="{.data.dokuwiki-password[*]}"`))
|
||||
@@ -0,0 +1,16 @@
|
||||
{{/* vim: set filetype=mustache: */}}
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 24 -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 24 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
*/}}
|
||||
{{- define "fullname" -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 24 -}}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,19 @@
|
||||
{{- if .Values.persistence.enabled -}}
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: {{ template "fullname" . }}-apache
|
||||
labels:
|
||||
app: {{ template "fullname" . }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
release: "{{ .Release.Name }}"
|
||||
heritage: "{{ .Release.Service }}"
|
||||
annotations:
|
||||
volume.alpha.kubernetes.io/storage-class: {{ .Values.persistence.apache.storageClass | quote }}
|
||||
spec:
|
||||
accessModes:
|
||||
- {{ .Values.persistence.apache.accessMode | quote }}
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.persistence.apache.size | quote }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,72 @@
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ template "fullname" . }}
|
||||
labels:
|
||||
app: {{ template "fullname" . }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
release: "{{ .Release.Name }}"
|
||||
heritage: "{{ .Release.Service }}"
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ template "fullname" . }}
|
||||
spec:
|
||||
containers:
|
||||
- name: {{ template "fullname" . }}
|
||||
image: "{{ .Values.image }}"
|
||||
imagePullPolicy: {{ default "" .Values.imagePullPolicy | quote }}
|
||||
env:
|
||||
- name: DOKUWIKI_USERNAME
|
||||
value: {{ default "" .Values.dokuwikiUsername | quote }}
|
||||
- name: DOKUWIKI_FULL_NAME
|
||||
value: {{ default "" .Values.dokuwikiFullName | quote }}
|
||||
- name: DOKUWIKI_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "fullname" . }}
|
||||
key: dokuwiki-password
|
||||
- name: DOKUWIKI_EMAIL
|
||||
value: {{ default "" .Values.dokuwikiEmail | quote }}
|
||||
- name: DOKUWIKI_WIKI_NAME
|
||||
value: {{ default "" .Values.dokuwikiWikiName | quote }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 80
|
||||
- name: https
|
||||
containerPort: 443
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: http
|
||||
initialDelaySeconds: 120
|
||||
timeoutSeconds: 5
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: http
|
||||
initialDelaySeconds: 5
|
||||
timeoutSeconds: 1
|
||||
resources:
|
||||
{{ toYaml .Values.resources | indent 10 }}
|
||||
volumeMounts:
|
||||
- name: dokuwiki-data
|
||||
mountPath: /bitnami/dokuwiki
|
||||
- name: apache-data
|
||||
mountPath: /bitnami/apache
|
||||
volumes:
|
||||
- name: dokuwiki-data
|
||||
{{- if .Values.persistence.enabled }}
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ template "fullname" . }}-dokuwiki
|
||||
{{- else }}
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
- name: apache-data
|
||||
{{- if .Values.persistence.enabled }}
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ template "fullname" . }}-apache
|
||||
{{- else }}
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,19 @@
|
||||
{{- if .Values.persistence.enabled -}}
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: {{ template "fullname" . }}-dokuwiki
|
||||
labels:
|
||||
app: {{ template "fullname" . }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
release: "{{ .Release.Name }}"
|
||||
heritage: "{{ .Release.Service }}"
|
||||
annotations:
|
||||
volume.alpha.kubernetes.io/storage-class: {{ .Values.persistence.dokuwiki.storageClass | quote }}
|
||||
spec:
|
||||
accessModes:
|
||||
- {{ .Values.persistence.dokuwiki.accessMode | quote }}
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.persistence.dokuwiki.size | quote }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,16 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ template "fullname" . }}
|
||||
labels:
|
||||
app: {{ template "fullname" . }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
release: "{{ .Release.Name }}"
|
||||
heritage: "{{ .Release.Service }}"
|
||||
type: Opaque
|
||||
data:
|
||||
{{ if .Values.dokuwikiPassword }}
|
||||
dokuwiki-password: {{ default "" .Values.dokuwikiPassword | b64enc | quote }}
|
||||
{{ else }}
|
||||
dokuwiki-password: {{ randAlphaNum 10 | b64enc | quote }}
|
||||
{{ end }}
|
||||
@@ -0,0 +1,20 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ template "fullname" . }}
|
||||
labels:
|
||||
app: {{ template "fullname" . }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
release: "{{ .Release.Name }}"
|
||||
heritage: "{{ .Release.Service }}"
|
||||
spec:
|
||||
type: {{ .Values.serviceType }}
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
targetPort: http
|
||||
- name: https
|
||||
port: 443
|
||||
targetPort: https
|
||||
selector:
|
||||
app: {{ template "fullname" . }}
|
||||
@@ -0,0 +1,62 @@
|
||||
## Bitnami DokuWiki image version
|
||||
## ref: https://hub.docker.com/r/bitnami/dokuwiki/tags/
|
||||
##
|
||||
image: bitnami/dokuwiki:20160626a-r3
|
||||
|
||||
## 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
|
||||
##
|
||||
# imagePullPolicy:
|
||||
|
||||
## User of the application
|
||||
## ref: https://github.com/bitnami/bitnami-docker-dokuwiki#environment-variables
|
||||
##
|
||||
dokuwikiUsername: user
|
||||
|
||||
## Application password
|
||||
## Defaults to a random 10-character alphanumeric string if not set
|
||||
## ref: https://github.com/bitnami/bitnami-docker-dokuwiki#environment-variables
|
||||
# dokuwikiPassword:
|
||||
|
||||
## Admin email
|
||||
## ref: https://github.com/bitnami/bitnami-docker-dokuwiki#environment-variables
|
||||
##
|
||||
dokuwikiEmail: user@example.com
|
||||
|
||||
## User's Full Name
|
||||
## ref: https://github.com/bitnami/bitnami-docker-dokuwiki#environment-variables
|
||||
##
|
||||
dokuwikiFullName: Full Name
|
||||
|
||||
## Name of the Wiki
|
||||
## ref: https://github.com/bitnami/bitnami-docker-dokuwiki#environment-variables
|
||||
##
|
||||
dokuwikiWikiName: My Wiki
|
||||
|
||||
## Kubernetes configuration
|
||||
## For minikube, set this to NodePort, elsewhere use LoadBalancer
|
||||
##
|
||||
serviceType: LoadBalancer
|
||||
|
||||
## Enable persistence using Persistent Volume Claims
|
||||
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
|
||||
##
|
||||
persistence:
|
||||
enabled: true
|
||||
apache:
|
||||
storageClass: generic
|
||||
accessMode: ReadWriteOnce
|
||||
size: 1Gi
|
||||
dokuwiki:
|
||||
storageClass: generic
|
||||
accessMode: ReadWriteOnce
|
||||
size: 8Gi
|
||||
|
||||
## Configure resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources:
|
||||
requests:
|
||||
memory: 512Mi
|
||||
cpu: 300m
|
||||
Reference in New Issue
Block a user