forked from helm/charts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add collabora-code chart (helm#10779)
* add collabora-code chart Signed-off-by: Christian Ingenhaag <[email protected]> * collabora-code - add home variable to Chart.yaml Signed-off-by: Christian Ingenhaag <[email protected]> * add owners file Signed-off-by: Christian Ingenhaag <[email protected]> * correct README to min req kubernetes api Signed-off-by: Christian Ingenhaag <[email protected]> * fix service port definition Signed-off-by: Christian Ingenhaag <[email protected]> * fix ingress servicePort definition Signed-off-by: Christian Ingenhaag <[email protected]> * [collabora] reenable port naming Signed-off-by: Christian Ingenhaag <[email protected]> * [collabora] linting Signed-off-by: Christian Ingenhaag <[email protected]>
- Loading branch information
1 parent
250ea38
commit dc2cf67
Showing
13 changed files
with
430 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: v1 | ||
appVersion: "4.0.0.2" | ||
description: A Helm chart for Collabora Office - CODE-Edition | ||
name: collabora-code | ||
version: 1.0.0 | ||
icon: https://avatars0.githubusercontent.com/u/22418908?s=200&v=4 | ||
sources: | ||
- https://github.com/CollaboraOnline/Docker-CODE | ||
maintainers: | ||
- name: Christian | ||
email: [email protected] | ||
home: https://www.collaboraoffice.com/code/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
approvers: | ||
- chrisingenhaag | ||
reviewers: | ||
- chrisingenhaag |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
# Collabora CODE | ||
|
||
[Collabora](https://www.collaboraoffice.com/code/) is a online office suite. | ||
|
||
## Introduction | ||
|
||
This chart creates a single Collabora CODE Pod to run Collabora CODE suite, for example as integration together with nextcloud. Installation is based on the docker documentation [CollaboraDocker](https://www.collaboraoffice.com/code/docker/). | ||
|
||
For most easy integration it´s recommended to use cert-manager together with your favorite ingress controller to get a fully working, ssl-terminated Collabora CODE server. | ||
|
||
## Prerequisites | ||
|
||
- Kubernetes 1.9+ with Beta APIs enabled | ||
|
||
## Installing the Chart | ||
|
||
To install the chart with the release name `my-release`, run: | ||
|
||
```bash | ||
$ helm install --name my-release stable/collabora | ||
``` | ||
|
||
This command deploys a Collabora Online Development Edition server. | ||
|
||
> **Tip**: List all releases using `helm list` | ||
## Uninstalling the Chart | ||
|
||
To uninstall/delete the `my-release` deployment: | ||
|
||
```bash | ||
$ helm delete my-release | ||
``` | ||
|
||
The command removes all the Kubernetes components associated with the chart and deletes the release. | ||
|
||
## Configuration | ||
|
||
Refer to [values.yaml](values.yaml) for the full run-down on defaults. These are a mixture of Kubernetes and Collabora-related directives that map to environment variables in the [CollaboraCODEDocker](https://github.com/CollaboraOnline/Docker-CODE) Docker image. | ||
|
||
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, | ||
|
||
```bash | ||
$ helm install --name my-release \ | ||
--set varname=true stable/collabora | ||
``` | ||
|
||
Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, | ||
|
||
```bash | ||
$ helm install --name my-release -f values.yaml stable/collabora | ||
``` | ||
|
||
> **Tip**: You can use the default [values.yaml](values.yaml) | ||
The following tables lists the configurable parameters of this chart and their default values. | ||
|
||
| Parameter | Description | Default | | ||
| ------------------------------------------------- | ------------------------------------------------------------- | ----------------------------------------------------------- | | ||
| `replicaCount` | Number of provisioner instances to deployed | `1` | | ||
| `strategy` | Specifies the strategy used to replace old Pods by new ones | `Recreate` | | ||
| `image.repository` | Provisioner image | `collabora/code` | | ||
| `image.tag` | Version of provisioner image | `4.0.0.2` | | ||
| `image.pullPolicy` | Image pull policy | `IfNotPresent` | | ||
| `collabora.DONT_GEN_SSL_CERT` | | `true` | | ||
| `collabora.domain` | Double escaped WOPI host | `wopihost\\.domain` | | ||
| `collabora.extra_params` | List of params to use as env var | `--o:ssl.termination=true --o:ssl.enable=false` | | ||
| `collabora.server_name` | Collabora server name (single escaped) | `collabora\.domain` | | ||
| `collabora.password` | Collabora admin panel pass | `examplepass` | | ||
| `collabora.username` | Collabora admin panel user | `admin` | | ||
| `collabora.dictionaries` | Collabora enabled dictionaries | `de_DE en_GB en_US es_ES fr_FR it nl pt_BR pt_PT ru` | | ||
| `ingress.enabled` | | `false` | | ||
| `ingress.annotations` | | `{}` | | ||
| `ingress.paths` | | `[]` | | ||
| `ingress.hosts` | | `[]` | | ||
| `ingress.tls` | | `[]` | | ||
| `securityContext.allowPrivilegeEscalation` | Create & use Pod Security Policy resources | `true` | | ||
| `securitycontext.capabilities.add` | Collabora needs to run with MKNOD as capabibility | `[MKNOD]` | | ||
| `resources` | Resources required (e.g. CPU, memory) | `{}` | | ||
| `nodeSelector` | Node labels for pod assignment | `{}` | | ||
| `affinity` | Affinity settings | `{}` | | ||
| `tolerations` | List of node taints to tolerate | `[]` | | ||
|
||
|
||
## Persistence | ||
|
||
There is no need for a persistent storage to run collabora code edition. All parameters in `/etc/loolwsd/loolwsd.xml` can be adjusted with using extra_params environment variable. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
1. Get the application URL by running these commands: | ||
{{- if .Values.ingress.enabled }} | ||
{{- range $host := .Values.ingress.hosts }} | ||
{{- range $.Values.ingress.paths }} | ||
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host }}{{ . }} | ||
{{- end }} | ||
{{- end }} | ||
{{- else if contains "NodePort" .Values.service.type }} | ||
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "collabora-code.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.service.type }} | ||
NOTE: It may take a few minutes for the LoadBalancer IP to be available. | ||
You can watch the status of by running 'kubectl get svc -w {{ include "collabora-code.fullname" . }}' | ||
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "collabora-code.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') | ||
echo http://$SERVICE_IP:{{ .Values.service.port }} | ||
{{- else if contains "ClusterIP" .Values.service.type }} | ||
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "collabora-code.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") | ||
echo "Visit http://127.0.0.1:9980 to use your application" | ||
kubectl port-forward $POD_NAME 9980:9980 | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{{/* vim: set filetype=mustache: */}} | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "collabora-code.name" -}} | ||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
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). | ||
If release name contains chart name it will be used as a full name. | ||
*/}} | ||
{{- define "collabora-code.fullname" -}} | ||
{{- if .Values.fullnameOverride -}} | ||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} | ||
{{- else -}} | ||
{{- $name := default .Chart.Name .Values.nameOverride -}} | ||
{{- if contains $name .Release.Name -}} | ||
{{- .Release.Name | trunc 63 | trimSuffix "-" -}} | ||
{{- else -}} | ||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Create chart name and version as used by the chart label. | ||
*/}} | ||
{{- define "collabora-code.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ include "collabora-code.fullname" . }} | ||
data: | ||
DONT_GEN_SSL_CERT: "{{ .Values.collabora.DONT_GEN_SSL_CERT }}" | ||
dictionaries: {{ .Values.collabora.dictionaries }} | ||
domain: {{ .Values.collabora.domain }} | ||
extra_params: {{ .Values.collabora.extra_params }} | ||
server_name: {{ .Values.collabora.server_name }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ include "collabora-code.fullname" . }} | ||
labels: | ||
app.kubernetes.io/name: {{ include "collabora-code.name" . }} | ||
helm.sh/chart: {{ include "collabora-code.chart" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
spec: | ||
replicas: {{ .Values.replicaCount }} | ||
strategy: | ||
type: {{ .Values.strategy }} | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: {{ include "collabora-code.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
template: | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: {{ include "collabora-code.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
spec: | ||
containers: | ||
- name: {{ .Chart.Name }} | ||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
env: | ||
- name: DONT_GEN_SSL_CERT | ||
valueFrom: | ||
configMapKeyRef: | ||
name: {{ include "collabora-code.fullname" . }} | ||
key: DONT_GEN_SSL_CERT | ||
- name: dictionaries | ||
valueFrom: | ||
configMapKeyRef: | ||
name: {{ include "collabora-code.fullname" . }} | ||
key: dictionaries | ||
- name: domain | ||
valueFrom: | ||
configMapKeyRef: | ||
name: {{ include "collabora-code.fullname" . }} | ||
key: domain | ||
- name: extra_params | ||
valueFrom: | ||
configMapKeyRef: | ||
name: {{ include "collabora-code.fullname" . }} | ||
key: extra_params | ||
- name: server_name | ||
valueFrom: | ||
configMapKeyRef: | ||
name: {{ include "collabora-code.fullname" . }} | ||
key: server_name | ||
- name: username | ||
valueFrom: | ||
secretKeyRef: | ||
name: {{ include "collabora-code.fullname" . }} | ||
key: username | ||
- name: password | ||
valueFrom: | ||
secretKeyRef: | ||
name: {{ include "collabora-code.fullname" . }} | ||
key: password | ||
livenessProbe: | ||
failureThreshold: 3 | ||
httpGet: | ||
path: / | ||
port: http | ||
scheme: HTTP | ||
initialDelaySeconds: 30 | ||
periodSeconds: 10 | ||
successThreshold: 1 | ||
timeoutSeconds: 2 | ||
readinessProbe: | ||
failureThreshold: 3 | ||
httpGet: | ||
path: / | ||
port: http | ||
scheme: HTTP | ||
initialDelaySeconds: 30 | ||
periodSeconds: 10 | ||
successThreshold: 1 | ||
timeoutSeconds: 2 | ||
ports: | ||
- name: http | ||
containerPort: {{ .Values.service.port }} | ||
protocol: TCP | ||
resources: | ||
{{- toYaml .Values.resources | nindent 12 }} | ||
securityContext: | ||
{{- toYaml .Values.securitycontext | nindent 12 }} | ||
{{- with .Values.nodeSelector }} | ||
nodeSelector: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.affinity }} | ||
affinity: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.tolerations }} | ||
tolerations: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{{- if .Values.ingress.enabled -}} | ||
{{- $fullName := include "collabora-code.fullname" . -}} | ||
{{- $ingressPaths := .Values.ingress.paths -}} | ||
apiVersion: extensions/v1beta1 | ||
kind: Ingress | ||
metadata: | ||
name: {{ $fullName }} | ||
labels: | ||
app.kubernetes.io/name: {{ include "collabora-code.name" . }} | ||
helm.sh/chart: {{ include "collabora-code.chart" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- with .Values.ingress.annotations }} | ||
annotations: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
{{- if .Values.ingress.tls }} | ||
tls: | ||
{{- range .Values.ingress.tls }} | ||
- hosts: | ||
{{- range .hosts }} | ||
- {{ . | quote }} | ||
{{- end }} | ||
secretName: {{ .secretName }} | ||
{{- end }} | ||
{{- end }} | ||
rules: | ||
{{- range .Values.ingress.hosts }} | ||
- host: {{ . | quote }} | ||
http: | ||
paths: | ||
{{- range $ingressPaths }} | ||
- path: {{ . }} | ||
backend: | ||
serviceName: {{ $fullName }} | ||
servicePort: http | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: {{ include "collabora-code.fullname" . }} | ||
data: | ||
username: {{ .Values.collabora.username | b64enc }} | ||
password: {{ .Values.collabora.password | b64enc }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ include "collabora-code.fullname" . }} | ||
labels: | ||
app.kubernetes.io/name: {{ include "collabora-code.name" . }} | ||
helm.sh/chart: {{ include "collabora-code.chart" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
spec: | ||
type: {{ .Values.service.type }} | ||
ports: | ||
- port: {{ .Values.service.port }} | ||
targetPort: http | ||
protocol: TCP | ||
name: http | ||
selector: | ||
app.kubernetes.io/name: {{ include "collabora-code.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} |
18 changes: 18 additions & 0 deletions
18
stable/collabora-code/templates/tests/test-connection.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: "{{ include "collabora-code.fullname" . }}-test-connection" | ||
labels: | ||
app.kubernetes.io/name: {{ include "collabora-code.name" . }} | ||
helm.sh/chart: {{ include "collabora-code.chart" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
annotations: | ||
"helm.sh/hook": test-success | ||
spec: | ||
containers: | ||
- name: wget | ||
image: busybox | ||
command: ['wget'] | ||
args: ['{{ include "collabora-code.fullname" . }}:{{ .Values.service.port }}'] | ||
restartPolicy: Never |
Oops, something went wrong.