From ee98ed41a8999eade5b54b0c57ead0abd59563c1 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 27 Sep 2022 20:44:43 +0200 Subject: [PATCH] feat: add docs generation and validation (#9) --- .drone.star | 60 ++++-------- .prettierignore | 1 + Makefile | 36 +++++++ README.md | 64 ++----------- charts/owncloud/Chart.yaml | 3 +- charts/owncloud/README.md | 93 ++++++++++++++++++ charts/owncloud/templates/_helpers.tpl | 12 +++ charts/owncloud/templates/deployment.yaml | 4 +- charts/owncloud/templates/hpa.yaml | 13 +-- charts/owncloud/templates/ingress.yaml | 33 +++---- charts/owncloud/values.yaml | 111 +++++++++++++++------- ci/README.md.gotmpl | 32 +++++++ ci/ci-values.yaml | 66 +++++-------- 13 files changed, 312 insertions(+), 216 deletions(-) create mode 100644 .prettierignore create mode 100644 Makefile create mode 100644 ci/README.md.gotmpl diff --git a/.drone.star b/.drone.star index d26db4e..07d53c1 100644 --- a/.drone.star +++ b/.drone.star @@ -15,14 +15,17 @@ config = { def main(ctx): pipeline_starlark = starlark(ctx) + pipeline_docs = documentation(ctx) + pipeline_docs[0]["depends_on"].append(pipeline_starlark[0]["name"]) + pipeline_kubernetes = kubernetes(ctx, config) - pipeline_kubernetes[0]["depends_on"].append(pipeline_starlark[0]["name"]) + pipeline_kubernetes[0]["depends_on"].append(pipeline_docs[0]["name"]) pipeline_deployments = deployments(ctx) for pipeline in pipeline_deployments: pipeline["depends_on"].append(pipeline_kubernetes[0]["name"]) - return pipeline_starlark + pipeline_kubernetes + pipeline_deployments + return pipeline_starlark + pipeline_docs + pipeline_kubernetes + pipeline_deployments def starlark(ctx): return [{ @@ -68,14 +71,14 @@ def kubernetes(ctx, config): "steps": [ { "name": "helm-lint", - "image": "owncloudci/alpine:latest", + "image": "owncloudci/alpine", "commands": [ "helm lint --strict charts/owncloud", ], }, { "name": "helm-template", - "image": "owncloudci/alpine:latest", + "image": "owncloudci/alpine", "commands": [ "helm template charts/owncloud -f ci/ci-values.yaml > ci/owncloud-ci-templated.yaml", ], @@ -83,7 +86,7 @@ def kubernetes(ctx, config): }, { "name": "kube-lint", - "image": "stackrox/kube-linter:latest", + "image": "stackrox/kube-linter", "entrypoint": [ "/kube-linter", "lint", @@ -105,7 +108,7 @@ def kubernetes(ctx, config): pipeline["steps"].append( { "name": "kubeconform-%s" % version, - "image": "ghcr.io/yannh/kubeconform:master", + "image": "ghcr.io/yannh/kubeconform", "entrypoint": [ "/kubeconform", "-kubernetes-version", @@ -121,7 +124,7 @@ def kubernetes(ctx, config): return [pipeline] def deployments(ctx): - pipeline = { + return [{ "kind": "pipeline", "type": "docker", "name": "k3d", @@ -150,14 +153,12 @@ def deployments(ctx): "refs/pull/**", ], }, - } - - return [pipeline] + }] def install(ctx): return [{ "name": "helm-install", - "image": "owncloudci/alpine:latest", + "image": "owncloudci/alpine", "commands": [ "export KUBECONFIG=kubeconfig-$${DRONE_BUILD_NUMBER}.yaml", "helm install -f ci/ci-values.yaml --atomic --timeout 5m0s owncloud charts/owncloud/", @@ -172,43 +173,14 @@ def documentation(ctx): "steps": [ { "name": "helm-docs-readme", - "image": "jnorwood/helm-docs:v1.11.0", - "commands": [ + "image": "jnorwood/helm-docs", + "entrypoint": [ "/usr/bin/helm-docs", - "--template-files=README.md.gotmpl", + "--badge-style=flat", + "--template-files=ci/README.md.gotmpl", "--output-file=README.md", ], }, - { - "name": "helm-docs-values-table-adoc", - "image": "jnorwood/helm-docs:v1.11.0", - "commands": [ - "/usr/bin/helm-docs", - "--template-files=charts/owncloud/docs/templates/values-desc-table.adoc.gotmpl", - "--output-file=docs/values-desc-table.adoc", - ], - }, - { - "name": "helm-docs-kube-versions-adoc", - "image": "jnorwood/helm-docs:v1.11.0", - "commands": [ - "/usr/bin/helm-docs", - "--template-files=charts/owncloud/docs/templates/kube-versions.adoc.gotmpl", - "--output-file=kube-versions.adoc", - ], - }, - { - "name": "gomplate-values-adoc", - "image": "hairyhenderson/gomplate:v3.10.0-alpine", - "enviornment": { - "ASSUME_NO_MOVING_GC_UNSAFE_RISK_IT_WITH": "go1.18", - }, - "commands": [ - "/bin/gomplate", - "--file=charts/owncloud/docs/templates/values.adoc.yaml.gotmpl", - "--out=charts/owncloud/docs/values.adoc.yaml", - ], - }, { "name": "check-unchanged", "image": "owncloudci/alpine", diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..96bdd33 --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +charts/**/README.md diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..c4a6ae8 --- /dev/null +++ b/Makefile @@ -0,0 +1,36 @@ +HELM_DOCS_PACKAGE_VERSION := latest +KUBE_LINTER_PACKAGE_VERSION := latest +KUBECONFORM_PACKAGE_VERSION := latest + +SHELL := bash +GO ?= go + +HELM_DOCS_PACKAGE ?= github.com/norwoodj/helm-docs/cmd/helm-docs@$(HELM_DOCS_PACKAGE_VERSION) +KUBE_LINTER_PACKAGE ?= golang.stackrox.io/kube-linter/cmd/kube-linter@$(KUBE_LINTER_PACKAGE_VERSION) +KUBECONFORM_PACKAGE ?= github.com/yannh/kubeconform/cmd/kubeconform@$(KUBECONFORM_PACKAGE_VERSION) + +all: docs lint api clean + +.PHONY: docs +docs: + $(GO) run $(HELM_DOCS_PACKAGE) --badge-style=flat --template-files ci/README.md.gotmpl --output-file=README.md + +.PHONY: ci-template +ci-template: + helm template charts/owncloud -f ci/ci-values.yaml > ci/owncloud-ci-templated.yaml + +.PHONY: clean +clean: + @rm ci/owncloud-ci-templated.yaml + +.PHONY: lint +lint: ci-template + helm lint charts/owncloud + $(GO) run $(KUBE_LINTER_PACKAGE) lint ci/owncloud-ci-templated.yaml + +.PHONY: api +api: ci-template + $(GO) run $(KUBECONFORM_PACKAGE) -kubernetes-version 1.21.0 -summary -strict ci/owncloud-ci-templated.yaml + $(GO) run $(KUBECONFORM_PACKAGE) -kubernetes-version 1.22.0 -summary -strict ci/owncloud-ci-templated.yaml + $(GO) run $(KUBECONFORM_PACKAGE) -kubernetes-version 1.23.0 -summary -strict ci/owncloud-ci-templated.yaml + $(GO) run $(KUBECONFORM_PACKAGE) -kubernetes-version 1.24.0 -summary -strict ci/owncloud-ci-templated.yaml diff --git a/README.md b/README.md index 8ed1e07..b72d3a9 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # ownCloud: Helm Charts -[![Build Status](https://img.shields.io/drone/build/owncloud-docker/helm?logo=drone&server=https%3A%2F%2Fdrone.owncloud.com)](https://drone.owncloud.com/owncloud-docker/helm) -[![GitHub contributors](https://img.shields.io/github/contributors/owncloud-docker/helm)](https://github.com/owncloud-docker/helm/graphs/contributors) -[![Source: GitHub](https://img.shields.io/badge/source-github-blue.svg?logo=github&logoColor=white)](https://github.com/owncloud-docker/helm) -[![License: MIT](https://img.shields.io/github/license/owncloud-docker/helm)](https://github.com/owncloud-docker/helm/blob/master/LICENSE) +[![Build Status](https://img.shields.io/drone/build/owncloud-docker/helm-charts?logo=drone&server=https%3A%2F%2Fdrone.owncloud.com)](https://drone.owncloud.com/owncloud-docker/helm-charts) +[![GitHub contributors](https://img.shields.io/github/contributors/owncloud-docker/helm-charts)](https://github.com/owncloud-docker/helm-charts/graphs/contributors) +[![Source: GitHub](https://img.shields.io/badge/source-github-blue.svg?logo=github&logoColor=white)](https://github.com/owncloud-docker/helm-charts) +[![License: MIT](https://img.shields.io/github/license/owncloud-docker/helm-charts)](https://github.com/owncloud-docker/helm-charts/blob/master/LICENSE) The code is provided as-is with no warranties. @@ -21,63 +21,11 @@ For instructions on how to run it anyways the the respective chart's readme. [//]: # "```" [//]: # "You can then run `helm search repo owncloud` to see the charts." -Chart documentation is available in the [owncloud directory](https://github.com/owncloud-docker/helm/blob/main/charts/owncloud/README.md). - -## Values - -| Key | Type | Default | Description | -| ------------------------------------------ | ------ | ----------------------------- | ----------- | -| affinity | object | `{}` | | -| autoscaling.enabled | bool | `false` | | -| autoscaling.maxReplicas | int | `100` | | -| autoscaling.minReplicas | int | `1` | | -| autoscaling.targetCPUUtilizationPercentage | int | `80` | | -| externalDatabase.host | string | `""` | | -| externalDatabase.name | string | `"owncloud"` | | -| externalDatabase.password | string | `"owncloud"` | | -| externalDatabase.port | int | `3306` | | -| externalDatabase.type | string | `""` | | -| externalDatabase.user | string | `"owncloud"` | | -| fullnameOverride | string | `""` | | -| image.pullPolicy | string | `"IfNotPresent"` | | -| image.repository | string | `"docker.io/owncloud/server"` | | -| image.tag | float | `10.6` | | -| imagePullSecrets | list | `[]` | | -| ingress.annotations | string | `nil` | | -| ingress.enabled | bool | `true` | | -| ingress.hosts[0].host | string | `"owncloud.chart.example"` | | -| ingress.hosts[0].paths[0] | string | `"/*"` | | -| ingress.hosts[0].servicePort | int | `80` | | -| ingress.tls[0].hosts[0] | string | `"owncloud.chart.example"` | | -| ingress.tls[0].secretName | string | `"owncloud"` | | -| mariadb.enabled | bool | `false` | | -| nameOverride | string | `""` | | -| nodeSelector | object | `{}` | | -| owncloud.domain | string | `"owncloud.chart.example"` | | -| owncloud.password | string | `"owncloud"` | | -| owncloud.username | string | `"owncloud"` | | -| persistence.enabled | bool | `true` | | -| persistence.owncloud.accessMode | string | `"ReadWriteOnce"` | | -| persistence.owncloud.nfs | string | `nil` | | -| persistence.owncloud.size | string | `"8Gi"` | | -| podAnnotations | object | `{}` | | -| podSecurityContext | object | `{}` | | -| redis.enabled | bool | `false` | | -| replicaCount | int | `1` | | -| resources | object | `{}` | | -| securityContext | object | `{}` | | -| service.port | int | `80` | | -| service.type | string | `"LoadBalancer"` | | -| serviceAccount.annotations | object | `{}` | | -| serviceAccount.create | bool | `true` | | -| serviceAccount.name | string | `""` | | -| tolerations | list | `[]` | | - ---- +Chart documentation is available in the [owncloud directory](https://github.com/owncloud-docker/helm-charts/blob/main/charts/owncloud/README.md). ## License -This project is licensed under the Apache 2.0 License - see the [LICENSE](https://github.com/owncloud-docker/helm/blob/master/LICENSE) file for details. +This project is licensed under the Apache 2.0 License - see the [LICENSE](https://github.com/owncloud-docker/helm-charts/blob/master/LICENSE) file for details. ## Copyright diff --git a/charts/owncloud/Chart.yaml b/charts/owncloud/Chart.yaml index 84a35e7..20e5028 100644 --- a/charts/owncloud/Chart.yaml +++ b/charts/owncloud/Chart.yaml @@ -4,6 +4,7 @@ name: owncloud version: 0.1.0 description: ownCloud Server Helm chart appVersion: 10.11.0 +home: https://owncloud.com/ keywords: - owncloud - files @@ -16,6 +17,6 @@ maintainers: type: application kubeVersion: "~1.21.0 || ~1.22.0 || ~1.23.0 || ~1.24.0 || ~1.25.0" # if this changes, also kubernetesVersions in .drone.star needs to be changed sources: - - https://github.com/owncloud-docker/helm + - https://github.com/owncloud-docker/helm-charts - https://github.com/owncloud-docker/server - https://github.com/owncloud/core diff --git a/charts/owncloud/README.md b/charts/owncloud/README.md index e69de29..869a63e 100644 --- a/charts/owncloud/README.md +++ b/charts/owncloud/README.md @@ -0,0 +1,93 @@ +# owncloud + +![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat) ![AppVersion: 10.11.0](https://img.shields.io/badge/AppVersion-10.11.0-informational?style=flat) + +ownCloud Server Helm chart +**Homepage:** +## Source Code + +* +* +* +## Requirements + +Kubernetes: `~1.21.0 || ~1.22.0 || ~1.23.0 || ~1.24.0 || ~1.25.0` + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| affinity | object | `{}` | Node affinity selection constraint. | +| autoscaling.enabled | bool | `false` | Enables autoscaling. When set to `true`, `replicas` is no longer applied. | +| autoscaling.maxReplicas | int | `10` | Sets maximum replicas for autoscaling. | +| autoscaling.metrics | list | `[]` | Metrics to use for autoscaling. | +| autoscaling.minReplicas | int | `1` | Sets minimum replicas for autoscaling. | +| externalDatabase.host | string | `""` | | +| externalDatabase.name | string | `"owncloud"` | | +| externalDatabase.password | string | `"owncloud"` | | +| externalDatabase.port | int | `3306` | | +| externalDatabase.type | string | `""` | | +| externalDatabase.user | string | `"owncloud"` | | +| fullnameOverride | string | `""` | | +| image.pullPolicy | string | `"IfNotPresent"` | Image pull policy | +| image.repository | string | `"docker.io/owncloud/server"` | Image repository | +| image.sha | string | `""` | Image sha/digest (optional). | +| image.tag | string | The `appVersion` of the Chart. | Image tag. | +| imagePullSecrets | object | `{}` | List of references to secrets in the same namespace to use for pulling images from a private registry. | +| ingress.annotations | object | `{}` | Ingress annotations. | +| ingress.enabled | bool | `false` | Enables the Ingress. | +| ingress.ingressClassName | string | `""` | Ingress class to use. Uses the default ingress class if not set. | +| ingress.labels | object | `{}` | Labels for the ingress. | +| ingress.tls | list | `[]` | Ingress TLS configuration. | +| initResources | object | `{}` | Resources to apply to all init containers. | +| mariadb.enabled | bool | `false` | | +| nameOverride | string | `""` | | +| nodeSelector | object | `{}` | Simple node selection constraint. | +| owncloud.configExtra | object | `{}` | | +| owncloud.domain | string | `"owncloud.chart.example"` | | +| owncloud.password | string | `"owncloud"` | | +| owncloud.username | string | `"owncloud"` | | +| owncloud.volume_apps | string | `"/mnt/data/apps"` | | +| owncloud.volume_config | string | `"/mnt/data/config"` | | +| owncloud.volume_files | string | `"/mnt/data/files"` | | +| owncloud.volume_root | string | `"/mnt/data"` | | +| persistence.enabled | bool | `true` | Enables persistence. | +| persistence.owncloud.accessMode[0] | string | `"ReadWriteOnce"` | | +| persistence.owncloud.nfs | object | `{}` | | +| persistence.owncloud.size | string | `"20Gi"` | | +| podAnnotations | object | `{}` | Annotations to attach metadata to the Pod. | +| podSecurityContext | object | `{}` | Security settings for the Pod. | +| redis.enabled | bool | `false` | | +| replicas | int | `1` | Number of replicas for each scalable service. Has no effect when `autoscaling.enabled` is set to `true`. | +| resources | object | `{}` | Resources to apply to all services. | +| securityContext | object | `{"readOnlyRootFilesystem":false}` | Security settings for the Container. | +| securityContext.readOnlyRootFilesystem | bool | `false` | Mounts the container's root filesystem as read-only. Currently only `false` is supported by ownCloud 10. | +| service.port | int | `8080` | | +| service.type | string | `"LoadBalancer"` | | +| serviceAccount.annotations | object | `{}` | Annotations to add to the service account. | +| serviceAccount.create | bool | `true` | Specifies whether a service account should be created or not. | +| serviceAccount.name | string | `""` | The name of the service account to use. If not set and `create` is set to `true`, a name is generated using the fullname template. | +| tolerations | list | `[]` | Tolerations are applied to pods and allow the scheduler to schedule pods with matching taints. One or more taints need to be applied to a node to instruct this node to not accept any pods that do not tolerate the taints. | + +## Examples + +### Configure OpenID Connect + +To configure OpenID Connect the configExtra object can be used. + +```YAML +configExtra: + openid-connect: + auto-provision: + enabled: true + email-claim: "email" + display-name-claim: "given_name" + picture-claim: "picture" + provider-url: "https://example.com" + client-id: "myclientid" + client-secret: "mysecret" + autoRedirectOnLoginPage: false + mode: "email" + scopes: [] + use-access-token-payload-for-user-info: false +``` diff --git a/charts/owncloud/templates/_helpers.tpl b/charts/owncloud/templates/_helpers.tpl index 63a4f9d..7249ef2 100644 --- a/charts/owncloud/templates/_helpers.tpl +++ b/charts/owncloud/templates/_helpers.tpl @@ -60,3 +60,15 @@ Create the name of the service account to use {{- default "default" .Values.serviceAccount.name }} {{- end }} {{- end }} + +{{/* +ownCloud image logic +*/}} +{{- define "owncloud.image" -}} + {{- $tag := default .Chart.AppVersion .Values.image.tag -}} + {{- if $.Values.image.sha -}} +"{{ $.Values.image.repository }}:{{ $tag }}@sha256:{{ $.Values.image.sha }}" + {{- else -}} +"{{ $.Values.image.repository }}:{{ $tag }}" + {{- end -}} +{{- end -}} diff --git a/charts/owncloud/templates/deployment.yaml b/charts/owncloud/templates/deployment.yaml index 030efc3..a04cc84 100644 --- a/charts/owncloud/templates/deployment.yaml +++ b/charts/owncloud/templates/deployment.yaml @@ -10,7 +10,7 @@ metadata: ignore-check.kube-linter.io/no-read-only-root-fs : "ownCloud need to write /etc/environment on startup" spec: {{- if not .Values.autoscaling.enabled }} - replicas: {{ .Values.replicaCount }} + replicas: {{ .Values.replicas }} {{- end }} selector: matchLabels: @@ -45,7 +45,7 @@ spec: - name: {{ .Chart.Name }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + image: {{ template "owncloud.image" . }} imagePullPolicy: {{ .Values.image.pullPolicy }} env: - name: OWNCLOUD_DOMAIN diff --git a/charts/owncloud/templates/hpa.yaml b/charts/owncloud/templates/hpa.yaml index 46c37ab..ab0a2bd 100644 --- a/charts/owncloud/templates/hpa.yaml +++ b/charts/owncloud/templates/hpa.yaml @@ -13,17 +13,8 @@ spec: name: {{ include "owncloud.fullname" . }} minReplicas: {{ .Values.autoscaling.minReplicas }} maxReplicas: {{ .Values.autoscaling.maxReplicas }} + {{- with .Values.autoscaling.metrics }} metrics: - {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} - {{- end }} - {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - - type: Resource - resource: - name: memory - targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + {{- toYaml . | nindent 4 }} {{- end }} {{- end }} diff --git a/charts/owncloud/templates/ingress.yaml b/charts/owncloud/templates/ingress.yaml index 7e64e4b..5d0e081 100644 --- a/charts/owncloud/templates/ingress.yaml +++ b/charts/owncloud/templates/ingress.yaml @@ -1,11 +1,9 @@ {{- if .Values.ingress.enabled -}} -{{- $fullName := include "owncloud.fullname" . -}} -{{- $svcPort := .Values.service.port -}} --- apiVersion: networking.k8s.io/v1 kind: Ingress metadata: - name: {{ $fullName }} + name: {{ template "owncloud.fullname" . }} labels: {{- include "owncloud.labels" . | nindent 4 }} {{- with .Values.ingress.annotations }} @@ -13,29 +11,22 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} spec: - {{- if .Values.ingress.tls }} - tls: - {{- range .Values.ingress.tls }} - - hosts: - {{- range .hosts }} - - {{ . | quote }} - {{- end }} - secretName: {{ .secretName }} - {{- end }} + {{- with .Values.ingress.className }} + ingressClassName: {{ . }} {{- end }} + {{- with .Values.ingress.tls }} + tls: + {{- toYaml . | nindent 4 }} + {{- end -}} rules: - {{- range .Values.ingress.hosts }} - - host: {{ .host | quote }} + - host: "{{ .Values.owncloud.domain }}" http: paths: - {{- range .paths }} - - path: {{ . }} + - path: / pathType: Prefix backend: service: - name: {{ $fullName }} + name: {{ template "owncloud.fullname" . }} port: - number: {{ $svcPort }} - {{- end }} - {{- end }} - {{- end }} + number: {{ .Values.service.port }} +{{- end }} diff --git a/charts/owncloud/values.yaml b/charts/owncloud/values.yaml index 990e3fd..1fc37f7 100644 --- a/charts/owncloud/values.yaml +++ b/charts/owncloud/values.yaml @@ -1,5 +1,20 @@ --- -replicaCount: 1 +image: + # -- Image repository + repository: docker.io/owncloud/server + # -- Image tag. + # @default -- The `appVersion` of the Chart. + tag: "" + # -- Image sha/digest (optional). + sha: "" + # -- Image pull policy + pullPolicy: IfNotPresent + +# -- List of references to secrets in the same namespace to use for pulling images from a private registry. +imagePullSecrets: {} + +nameOverride: "" +fullnameOverride: "" owncloud: domain: owncloud.chart.example @@ -28,6 +43,9 @@ owncloud: mariadb: enabled: false +redis: + enabled: false + externalDatabase: type: "" host: "" @@ -37,6 +55,7 @@ externalDatabase: password: owncloud persistence: + # -- Enables persistence. enabled: true owncloud: accessMode: @@ -44,61 +63,83 @@ persistence: size: 20Gi nfs: {} -redis: - enabled: false - -image: - repository: docker.io/owncloud/server - tag: 10.11.0 - pullPolicy: IfNotPresent - -imagePullSecrets: {} -nameOverride: "" -fullnameOverride: "" +# -- Number of replicas for each scalable service. Has no effect when `autoscaling.enabled` is set to `true`. +replicas: 1 serviceAccount: - # Specifies whether a service account should be created + # -- Specifies whether a service account should be created or not. create: true - # Annotations to add to the service account + # -- Annotations to add to the service account. annotations: {} - # The name of the service account to use. - # If not set and create is true, a name is generated using the fullname template + # -- The name of the service account to use. If not set and `create` is set to `true`, + # a name is generated using the fullname template. name: "" +# -- Annotations to attach metadata to the Pod. podAnnotations: {} - +# -- Security settings for the Pod. podSecurityContext: {} - +# -- Security settings for the Container. securityContext: + # -- Mounts the container's root filesystem as read-only. Currently only `false` is supported by ownCloud 10. readOnlyRootFilesystem: false service: type: LoadBalancer - port: 80 + port: 8080 ingress: - enabled: true + # -- Enables the Ingress. + enabled: false + # -- Ingress class to use. + # Uses the default ingress class if not set. + ingressClassName: "" + # -- Ingress annotations. annotations: {} - hosts: - - host: "owncloud.chart.example" - paths: ["/*"] - servicePort: 80 - tls: - - hosts: - - "owncloud.chart.example" - secretName: owncloud - + # -- Labels for the ingress. + labels: {} + # -- Ingress TLS configuration. + tls: [] + # tls: + # - secretName: owncloud + # hosts: + # - owncloud.example.com + +# -- Resources to apply to all init containers. initResources: {} +# -- Resources to apply to all services. resources: {} +# limits: +# cpu: 100m +# memory: 128Mi +# requests: +# cpu: 100m +# memory: 128Mi autoscaling: + # -- Enables autoscaling. When set to `true`, `replicas` is no longer applied. enabled: false + # -- Sets minimum replicas for autoscaling. minReplicas: 1 - maxReplicas: 100 - targetCPUUtilizationPercentage: 80 - + # -- Sets maximum replicas for autoscaling. + maxReplicas: 10 + # -- Metrics to use for autoscaling. + metrics: [] + # metrics: + # - type: Resource + # resource: + # name: cpu + # targetAverageUtilization: 60 + # - type: Resource + # resource: + # name: memory + # targetAverageUtilization: 60 + +# -- Simple node selection constraint. nodeSelector: {} - -tolerations: [] - +# -- Node affinity selection constraint. affinity: {} +# -- Tolerations are applied to pods and allow the scheduler to schedule pods with matching taints. +# One or more taints need to be applied to a node to instruct this node to not accept any pods +# that do not tolerate the taints. +tolerations: [] diff --git a/ci/README.md.gotmpl b/ci/README.md.gotmpl new file mode 100644 index 0000000..9eafa17 --- /dev/null +++ b/ci/README.md.gotmpl @@ -0,0 +1,32 @@ +{{ template "chart.header" . }} +{{ template "chart.deprecationWarning" . }} +{{ template "chart.badgesSection" . }} + +{{ template "chart.description" . }} +{{ template "chart.homepageLine" . }} +{{ template "chart.sourcesSection" . }} +{{ template "chart.requirementsSection" . }} +{{ template "chart.valuesSection" . }} + +## Examples + +### Configure OpenID Connect + +To configure OpenID Connect the configExtra object can be used. + +```YAML +configExtra: + openid-connect: + auto-provision: + enabled: true + email-claim: "email" + display-name-claim: "given_name" + picture-claim: "picture" + provider-url: "https://example.com" + client-id: "myclientid" + client-secret: "mysecret" + autoRedirectOnLoginPage: false + mode: "email" + scopes: [] + use-access-token-payload-for-user-info: false +``` diff --git a/ci/ci-values.yaml b/ci/ci-values.yaml index 15a0e1f..a0a1224 100644 --- a/ci/ci-values.yaml +++ b/ci/ci-values.yaml @@ -1,5 +1,14 @@ --- -replicaCount: 1 +image: + repository: docker.io/owncloud/server + tag: "" + sha: "" + pullPolicy: IfNotPresent + +imagePullSecrets: {} + +nameOverride: "" +fullnameOverride: "" owncloud: domain: owncloud.chart.example @@ -9,23 +18,14 @@ owncloud: volume_config: /mnt/data/config volume_files: /mnt/data/files volume_root: /mnt/data - configExtra: - openid-connect: - auto-provision: - enabled: true - email-claim: "email" - display-name-claim: "name" - provider-url: "https://example.com" - client-id: "myclientid" - client-secret: "mysecret" - autoRedirectOnLoginPage: false - mode: "email" - scopes: [] - use-access-token-payload-for-user-info: false + configExtra: {} mariadb: enabled: false +redis: + enabled: false + externalDatabase: type: "" host: "" @@ -36,23 +36,8 @@ externalDatabase: persistence: enabled: false - owncloud: - accessMode: - - ReadWriteOnce - size: 20Gi - nfs: {} -redis: - enabled: false - -image: - repository: docker.io/owncloud/server - pullPolicy: Always - tag: 10.11 - -imagePullSecrets: [] -nameOverride: "" -fullnameOverride: "" +replicas: 1 serviceAccount: create: true @@ -68,19 +53,14 @@ securityContext: service: type: NodePort - port: 80 + port: 8080 ingress: enabled: false + ingressClassName: "" annotations: {} - hosts: - - host: "owncloud.chart.example" - paths: ["/*"] - servicePort: 80 - tls: - - hosts: - - "owncloud.chart.example" - secretName: owncloud + labels: {} + tls: [] initResources: limits: @@ -101,11 +81,9 @@ resources: autoscaling: enabled: false minReplicas: 1 - maxReplicas: 100 - targetCPUUtilizationPercentage: 80 + maxReplicas: 10 + metrics: [] nodeSelector: {} - -tolerations: [] - affinity: {} +tolerations: []