Back to Charts

DEPRECATED - nextcloud

stable/nextcloud/README.md

latest24.6 KB
Original Source

DEPRECATED - nextcloud

|This chart has been deprecated and moved to its new home: | |- GitHub repo: https://github.com/nextcloud/helm/tree/master/charts/nextcloud |- Charts repo: https://nextcloud.github.io/helm/

nextcloud is a file sharing server that puts the control and security of your own data back into your hands.

TL;DR;

console
$ helm install stable/nextcloud

Introduction

This chart bootstraps an nextcloud deployment on a Kubernetes cluster using the Helm package manager.

It also packages the Bitnami MariaDB chart which is required for bootstrapping a MariaDB deployment for the database requirements of the nextcloud application.

Prerequisites

  • Kubernetes 1.9+ 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/nextcloud

The command deploys nextcloud on the Kubernetes cluster in the default configuration. The 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 table lists the configurable parameters of the nextcloud chart and their default values.

ParameterDescriptionDefault
image.repositorynextcloud Image namenextcloud
image.tagnextcloud Image tag{VERSION}
image.pullPolicyImage pull policyIfNotPresent
image.pullSecretsSpecify image pull secretsnil
ingress.enabledEnable use of ingress controllersfalse
ingress.servicePortIngress' backend servicePorthttp
ingress.annotationsAn array of service annotationsnil
ingress.labelsAn array of service labelsnil
ingress.tlsIngress TLS configuration[]
nextcloud.hostnextcloud host to create application URLsnextcloud.kube.home
nextcloud.usernameUser of the applicationadmin
nextcloud.passwordApplication passwordchangeme
nextcloud.updateTrigger update if custom command is used0
nextcloud.datadirnextcloud data dir location/var/www/html/data
nextcloud.tableprefixnextcloud db table prefix''
nextcloud.mail.enabledWhether to enable/disable email settingsfalse
nextcloud.mail.fromAddressnextcloud mail send from fieldnil
nextcloud.mail.domainnextcloud mail domainnil
nextcloud.mail.smtp.hostSMTP hostnamenil
nextcloud.mail.smtp.secureSMTP connection ssl or empty''
nextcloud.mail.smtp.portOptional SMTP portnil
nextcloud.mail.smtp.authtypeSMTP authentication methodLOGIN
nextcloud.mail.smtp.nameSMTP username''
nextcloud.mail.smtp.passwordSMTP password''
nextcloud.configsConfig files created in /var/www/html/config{}
nextcloud.persistence.subPathSet the subPath for nextcloud to use in volumenil
nextcloud.phpConfigsPHP Config files created in /usr/local/etc/php/conf.d{}
nextcloud.defaultConfigs.\.htaccessDefault .htaccess to protect /var/www/html/configtrue
nextcloud.defaultConfigs.\.redis\.config\.phpDefault Redis configurationtrue
nextcloud.defaultConfigs.\.apache-pretty-urls\.config\.phpDefault Apache configuration for rewrite urlstrue
nextcloud.defaultConfigs.\.apcu\.config\.phpDefault configuration to define APCu as local cachetrue
nextcloud.defaultConfigs.\.apps\.config\.phpDefault configuration for appstrue
nextcloud.defaultConfigs.\.autoconfig\.phpDefault auto-configuration for databasestrue
nextcloud.defaultConfigs.\.smtp\.config\.phpDefault configuration for smtptrue
nextcloud.strategyspecifies the strategy used to replace old Pods by new onestype: Recreate
nextcloud.extraEnvspecify additional environment variables{}
nextcloud.extraVolumesspecify additional volumes for the NextCloud pod{}
nextcloud.extraVolumeMountsspecify additional volume mounts for the NextCloud pod{}
nginx.enabledEnable nginx (requires you use php-fpm image)false
nginx.image.repositorynginx Image namenginx
nginx.image.tagnginx Image tagalpine
nginx.image.pullPolicynginx Image pull policyIfNotPresent
nginx.config.defaultWhether to use nextclouds recommended nginx configtrue
nginx.config.customSpecify a custom config for nginx{}
nginx.resourcesnginx resources{}
lifecycle.postStartCommandSpecify deployment lifecycle hook postStartCommandnil
lifecycle.preStopCommandSpecify deployment lifecycle hook preStopCommandnil
internalDatabase.enabledWhether to use internal sqlite databasetrue
internalDatabase.databaseName of the existing databasenextcloud
externalDatabase.enabledWhether to use external databasefalse
externalDatabase.typeExternal database type: mysql, postgresqlmysql
externalDatabase.hostHost of the external databasenil
externalDatabase.databaseName of the existing databasenextcloud
externalDatabase.userExisting username in the external dbnextcloud
externalDatabase.passwordPassword for the above usernamenil
externalDatabase.existingSecret.enabledWhether to use a existing secret or notfalse
externalDatabase.existingSecret.secretNameName of the existing secretnil
externalDatabase.existingSecret.usernameKeyName of the key that contains the usernamenil
externalDatabase.existingSecret.passwordKeyName of the key that contains the passwordnil
mariadb.enabledWhether to use the MariaDB chartfalse
mariadb.db.nameDatabase name to createnextcloud
mariadb.db.passwordPassword for the databasechangeme
mariadb.db.userDatabase user to createnextcloud
mariadb.rootUser.passwordMariaDB admin passwordnil
redis.enabledWhether to install/use redis for lockingfalse
cronjob.enabledWhether to enable/disable cronjobfalse
cronjob.scheduleSchedule for the CronJob*/15 * * * *
cronjob.annotationsAnnotations to add to the cronjob{}
cronjob.curlInsecureSet insecure (-k) option to curlfalse
cronjob.failedJobsHistoryLimitSpecify the number of failed Jobs to keep5
cronjob.successfulJobsHistoryLimitSpecify the number of completed Jobs to keep2
cronjob.resourcesCronjob Resourcesnil
cronjob.nodeSelectorCronjob Node selectornil
cronjob.tolerationsCronjob tolerationsnil
cronjob.affinityCronjob affinitynil
service.typeKubernetes Service typeClusterIp
service.loadBalancerIPLoadBalancerIp for service type LoadBalancernil
service.nodePortNodePort for service type NodePortnil
persistence.enabledEnable persistence using PVCfalse
persistence.annotationsPVC annotations{}
persistence.storageClassPVC Storage Class for nextcloud volumenil (uses alpha storage class annotation)
persistence.existingClaimAn Existing PVC name for nextcloud volumenil (uses alpha storage class annotation)
persistence.accessModePVC Access Mode for nextcloud volumeReadWriteOnce
persistence.sizePVC Storage Request for nextcloud volume8Gi
resourcesCPU/Memory resource requests/limits{}
livenessProbe.enabledTurn on and off liveness probetrue
livenessProbe.initialDelaySecondsDelay before liveness probe is initiated30
livenessProbe.periodSecondsHow often to perform the probe15
livenessProbe.timeoutSecondsWhen the probe times out5
livenessProbe.failureThresholdMinimum consecutive failures for the probe3
livenessProbe.successThresholdMinimum consecutive successes for the probe1
readinessProbe.enabledTurn on and off readiness probetrue
readinessProbe.initialDelaySecondsDelay before readiness probe is initiated30
readinessProbe.periodSecondsHow often to perform the probe15
readinessProbe.timeoutSecondsWhen the probe times out5
readinessProbe.failureThresholdMinimum consecutive failures for the probe3
readinessProbe.successThresholdMinimum consecutive successes for the probe1
hpa.enabledBoolean to create a HorizontalPodAutoscalerfalse
hpa.cputhresholdCPU threshold percent for the HorizontalPodAutoscale60
hpa.minPodsMin. pods for the Nextcloud HorizontalPodAutoscaler1
hpa.maxPodsMax. pods for the Nextcloud HorizontalPodAutoscaler10
deploymentAnnotationsAnnotations to be added at 'deployment' levelnot set
podAnnotationsAnnotations to be added at 'pod' levelnot set
metrics.enabledStart Prometheus metrics exporterfalse
metrics.httpsDefines if https is used to connect to nextcloudfalse (uses http)
metrics.timeoutWhen the scrape times out5s
metrics.image.repositoryNextcloud metrics exporter image namexperimental/nextcloud-exporter
metrics.image.tagNextcloud metrics exporter image tagv0.3.0
metrics.image.pullPolicyNextcloud metrics exporter image pull policyIfNotPresent
metrics.podAnnotationsAdditional annotations for metrics exporternot set
metrics.podLabelsAdditional labels for metrics exporternot set
metrics.service.typeMetrics: Kubernetes Service typeClusterIP
metrics.service.loadBalancerIPMetrics: LoadBalancerIp for service type LoadBalancernil
metrics.service.nodePortMetrics: NodePort for service type NodePortnil
metrics.service.annotationsAdditional annotations for service metrics exporter{prometheus.io/scrape: "true", prometheus.io/port: "9205"}
metrics.service.labelsAdditional labels for service metrics exporter{}

Note:

For nextcloud to function correctly, you should specify the nextcloud.host parameter to specify the FQDN (recommended) or the public IP address of the nextcloud service.

Optionally, you can specify the service.loadBalancerIP parameter to assign a reserved IP address to the nextcloud service of the chart. However please note that this feature is only available on a few cloud providers (f.e. GKE).

To reserve a public IP address on GKE:

bash
$ gcloud compute addresses create nextcloud-public-ip

The reserved IP address can be associated to the nextcloud service by specifying it as the value of the service.loadBalancerIP parameter while installing the chart.

Specify each parameter using the --set key=value[,key=value] argument to helm install. For example,

console
$ helm install --name my-release \
  --set nextcloud.username=admin,nextcloud.password=password,mariadb.rootUser.password=secretpassword \
    stable/nextcloud

The above command sets the nextcloud administrator account username and password to admin and password respectively. Additionally, it sets the MariaDB root user password to secretpassword.

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/nextcloud

Tip: You can use the default values.yaml

Persistence

The Nextcloud image stores the nextcloud data and configurations at the /var/www/html 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 section to enable persistence and configuration of the PVC.

Cronjob

This chart can utilize Kubernetes CronJob resource to execute background tasks.

To use this functionality, set cronjob.enabled parameter to true and switch background mode to Webcron in your nextcloud settings page. See the Configuration section for further configuration of the cronjob resource.

Note: For the cronjobs to work correctly, ingress must be also enabled (set ingress.enabled to true) and nextcloud.host has to be publicly resolvable.

Multiple config.php file

Nextcloud supports loading configuration parameters from multiple files. You can add arbitrary files ending with .config.php in the config/ directory. See documentation.

For example, following config will configure Nextcloud with S3 as primary storage by creating file /var/www/html/config/s3.config.php:

yaml
nextcloud:
  configs:
    s3.config.php: |-
      <?php
      $CONFIG = array (
        'objectstore' => array(
          'class' => '\\OC\\Files\\ObjectStore\\S3',
          'arguments' => array(
            'bucket'     => 'my-bucket',
            'autocreate' => true,
            'key'        => 'xxx',
            'secret'     => 'xxx',
            'region'     => 'us-east-1',
            'use_ssl'    => true
          )
        )
      );