From 60499d8044f83c80cd2f66e7c36b8aad21c3d4e5 Mon Sep 17 00:00:00 2001 From: Dennis Sieben Date: Mon, 19 Jun 2023 19:04:16 +0200 Subject: [PATCH 1/7] - added K8s CronJob implementation --- charts/owncloud/templates/_helpers.tpl | 362 ++++++++++++++++++++++ charts/owncloud/templates/cronjob.yaml | 49 +++ charts/owncloud/templates/deployment.yaml | 361 +-------------------- 3 files changed, 412 insertions(+), 360 deletions(-) create mode 100644 charts/owncloud/templates/cronjob.yaml diff --git a/charts/owncloud/templates/_helpers.tpl b/charts/owncloud/templates/_helpers.tpl index d71e424..9d75288 100644 --- a/charts/owncloud/templates/_helpers.tpl +++ b/charts/owncloud/templates/_helpers.tpl @@ -86,3 +86,365 @@ ownCloud image logic "{{ $.Values.image.repository }}:{{ $tag }}" {{- end -}} {{- end -}} + +{{/* +ownCloud environment settings +*/}} +{{- define "owncloud.environment" -}} +- name: OWNCLOUD_ACCESSLOG_LOCATION + value: {{ .Values.owncloud.accesslogLocation | quote }} +- name: OWNCLOUD_ACCOUNTS_ENABLE_MEDIAL_SEARCH + value: {{ .Values.owncloud.accountsEnableMedialSearch | quote }} +- name: OWNCLOUD_ADMIN_PASSWORD + value: {{ .Values.owncloud.adminPassword | quote }} +- name: OWNCLOUD_ADMIN_USERNAME + value: {{ .Values.owncloud.adminUsername | quote }} +- name: OWNCLOUD_ALLOW_USER_TO_CHANGE_DISPLAY_NAME + value: {{ .Values.owncloud.allowUserToChangeDisplayName | quote }} +- name: OWNCLOUD_APPS_DEPRECATED + value: {{ .Values.owncloud.apps.deprecated | quote }} +- name: OWNCLOUD_APPS_DISABLE + value: {{ .Values.owncloud.apps.disable | quote }} +- name: OWNCLOUD_APPS_ENABLE + value: {{ .Values.owncloud.apps.enable | quote }} +- name: OWNCLOUD_APPS_INSTALL + value: {{ .Values.owncloud.apps.install | quote }} +- name: OWNCLOUD_APPS_INSTALL_MAJOR + value: {{ .Values.owncloud.apps.installMajor | quote }} +- name: OWNCLOUD_APPS_UNINSTALL + value: {{ .Values.owncloud.apps.uninstall | quote }} +- name: OWNCLOUD_BACKGROUND_MODE + value: {{ .Values.owncloud.backgroundMode | quote }} +- name: OWNCLOUD_BLACKLISTED_FILES + value: {{ .Values.owncloud.blacklistedFiles | quote }} +- name: OWNCLOUD_CACHE_CHUNK_GC_TTL + value: {{ .Values.owncloud.cacheChunkGcTtl | quote }} +- name: OWNCLOUD_CACHE_PATH + value: {{ .Values.owncloud.cachePath | quote }} +- name: OWNCLOUD_CHECK_FOR_WORKING_WELLKNOWN_SETUP + value: {{ .Values.owncloud.checkForWorkingWellknownSetup | quote }} +- name: OWNCLOUD_CIPHER + value: {{ .Values.owncloud.cipher | quote }} +- name: OWNCLOUD_COMMENTS_MANAGER_FACTORY + value: {{ .Values.owncloud.commentsManagerFactory | quote }} +- name: OWNCLOUD_CORS_ALLOWED_DOMAINS + value: {{ .Values.owncloud.corsAllowedDomains | quote }} +- name: OWNCLOUD_CROND_ENABLED + value: "false" # Disable ownCloud container's cronJob in Kubernetes in favor of Kubernetes' own CronJob +- name: OWNCLOUD_CSRF_DISABLED + value: {{ .Values.owncloud.csrfDisabled | quote }} +- name: OWNCLOUD_DAV_CHUNK_BASE_DIR + value: {{ .Values.owncloud.davChunkBaseDir | quote }} +- name: OWNCLOUD_DAV_ENABLE_ASYNC + value: {{ .Values.owncloud.davEnableAsync | quote }} +- name: OWNCLOUD_DB_FAIL + value: {{ .Values.owncloud.db.fail | quote }} +- name: OWNCLOUD_DB_HOST + value: {{ .Values.owncloud.db.host | quote }} +- name: OWNCLOUD_DB_NAME + value: {{ .Values.owncloud.db.name | quote }} +- name: OWNCLOUD_DB_PASSWORD + value: {{ .Values.owncloud.db.password | quote }} +- name: OWNCLOUD_DB_PREFIX + value: {{ .Values.owncloud.db.prefix | quote }} +- name: OWNCLOUD_DB_TIMEOUT + value: {{ .Values.owncloud.db.timeout | quote }} +- name: OWNCLOUD_DB_TYPE + value: {{ .Values.owncloud.db.type | quote }} +- name: OWNCLOUD_DB_USERNAME + value: {{ .Values.owncloud.db.username | quote }} +- name: OWNCLOUD_DEBUG + value: {{ .Values.owncloud.debug | quote }} +- name: OWNCLOUD_DEFAULT_APP + value: {{ .Values.owncloud.defaultApp | quote }} +- name: OWNCLOUD_DEFAULT_LANGUAGE + value: {{ .Values.owncloud.defaultLanguage | quote }} +- name: OWNCLOUD_DOMAIN + value: {{ .Values.owncloud.domain | quote }} +- name: OWNCLOUD_TRUSTED_DOMAINS + value: {{ include "owncloud.trustedDomains" . }} +- name: OWNCLOUD_ENABLED_PREVIEW_PROVIDERS + value: {{ .Values.owncloud.enabledPreviewProviders | quote }} +- name: OWNCLOUD_ENABLE_AVATARS + value: {{ .Values.owncloud.enableAvatars | quote }} +- name: OWNCLOUD_ENABLE_CERTIFICATE_MANAGEMENT + value: {{ .Values.owncloud.enableCertificateManagement | quote }} +- name: OWNCLOUD_ENABLE_PREVIEWS + value: {{ .Values.owncloud.enablePreviews | quote }} +- name: OWNCLOUD_ENABLE_OIDC_REWRITE_URL + value: {{ .Values.owncloud.enableOidcRewriteUrl | quote }} +- name: OWNCLOUD_ENTRYPOINT_INITIALIZED + value: {{ .Values.owncloud.entrypointInitialized | quote }} +- name: OWNCLOUD_ERRORLOG_LOCATION + value: {{ .Values.owncloud.errorlogLocation | quote }} +- name: OWNCLOUD_EXCLUDED_DIRECTORIES + value: {{ .Values.owncloud.excludedDirectories | quote }} +- name: OWNCLOUD_FILELOCKING_ENABLED + value: {{ .Values.owncloud.filelockingEnabled | quote }} +- name: OWNCLOUD_FILELOCKING_TTL + value: {{ .Values.owncloud.filelockingTtl | quote }} +- name: OWNCLOUD_FILESYSTEM_CACHE_READONLY + value: {{ .Values.owncloud.filesystemCacheReadonly | quote }} +- name: OWNCLOUD_FILESYSTEM_CHECK_CHANGES + value: {{ .Values.owncloud.filesystemCheckChanges | quote }} +- name: OWNCLOUD_FILES_EXTERNAL_ALLOW_NEW_LOCAL + value: {{ .Values.owncloud.filesExternalAllowNewLocal | quote }} +- name: OWNCLOUD_FORWARDED_FOR_HEADERS + value: {{ .Values.owncloud.forwardedForHeaders | quote }} +- name: OWNCLOUD_HASHING_COST + value: {{ .Values.owncloud.hashingCost | quote }} +- name: OWNCLOUD_HAS_INTERNET_CONNECTION + value: {{ .Values.owncloud.hasInternetConnection | quote }} +- name: OWNCLOUD_HTACCESS_REWRITE_BASE + value: {{ .Values.owncloud.htaccessRewriteBase | quote }} +- name: OWNCLOUD_HTTP_COOKIE_SAMESITE + value: {{ .Values.owncloud.httpCookieSamesite | quote }} +- name: OWNCLOUD_INTEGRITY_EXCLUDED_FILES + value: {{ .Values.owncloud.integrityExcludedFiles | quote }} +- name: OWNCLOUD_INTEGRITY_IGNORE_MISSING_APP_SIGNATURE + value: {{ .Values.owncloud.integrityIgnoreMissingAppSignature | quote }} +- name: OWNCLOUD_KNOWLEDGEBASE_ENABLED + value: {{ .Values.owncloud.knowledgebaseEnabled | quote }} +- name: OWNCLOUD_APPSTORE_ENABLED + value: {{ .Values.owncloud.appstoreEnabled | quote }} +- name: OWNCLOUD_LICENSE_KEY + value: {{ .Values.owncloud.licenseKey | quote }} +- name: OWNCLOUD_LICENSE_CLASS + value: {{ .Values.owncloud.licenseClass | quote }} +- name: OWNCLOUD_LOGIN_ALTERNATIVES + value: {{ .Values.owncloud.loginAlternatives | quote }} +- name: OWNCLOUD_LOG_DATE_FORMAT + value: {{ .Values.owncloud.log.dateFormat | quote }} +- name: OWNCLOUD_LOG_FILE + value: {{ .Values.owncloud.log.file | quote }} +- name: OWNCLOUD_LOG_LEVEL + value: {{ .Values.owncloud.log.level | quote }} +- name: OWNCLOUD_LOG_ROTATE_SIZE + value: {{ .Values.owncloud.log.rotateSize | quote }} +- name: OWNCLOUD_LOG_TIMEZONE + value: {{ .Values.owncloud.log.timezone | quote }} +- name: OWNCLOUD_LOST_PASSWORD_LINK + value: {{ .Values.owncloud.lostPasswordLink | quote }} +- name: OWNCLOUD_MAIL_DOMAIN + value: {{ .Values.owncloud.mail.domain | quote }} +- name: OWNCLOUD_MAIL_FROM_ADDRESS + value: {{ .Values.owncloud.mail.fromAddress | quote }} +- name: OWNCLOUD_MAIL_SMTP_AUTH + value: {{ .Values.owncloud.mail.smtp.auth | quote }} +- name: OWNCLOUD_MAIL_SMTP_AUTH_TYPE + value: {{ .Values.owncloud.mail.smtp.authType | quote }} +- name: OWNCLOUD_MAIL_SMTP_DEBUG + value: {{ .Values.owncloud.mail.smtp.debug | quote }} +- name: OWNCLOUD_MAIL_SMTP_HOST + value: {{ .Values.owncloud.mail.smtp.host | quote }} +- name: OWNCLOUD_MAIL_SMTP_MODE + value: {{ .Values.owncloud.mail.smtp.mode | quote }} +- name: OWNCLOUD_MAIL_SMTP_NAME + value: {{ .Values.owncloud.mail.smtp.name | quote }} +- name: OWNCLOUD_MAIL_SMTP_PASSWORD + value: {{ .Values.owncloud.mail.smtp.password | quote }} +- name: OWNCLOUD_MAIL_SMTP_PORT + value: {{ .Values.owncloud.mail.smtp.port | quote }} +- name: OWNCLOUD_MAIL_SMTP_SECURE + value: {{ .Values.owncloud.mail.smtp.secure | quote }} +- name: OWNCLOUD_MAIL_SMTP_TIMEOUT + value: {{ .Values.owncloud.mail.smtp.timeout | quote }} +- name: OWNCLOUD_MAINTENANCE + value: {{ .Values.owncloud.maintenance | quote }} +- name: OWNCLOUD_MARKETPLACE_CA + value: {{ .Values.owncloud.marketplace.ca | quote }} +- name: OWNCLOUD_MARKETPLACE_KEY + value: {{ .Values.owncloud.marketplace.key | quote }} +- name: OWNCLOUD_MAX_EXECUTION_TIME + value: {{ .Values.owncloud.maxExecutionTime | quote }} +- name: OWNCLOUD_MAX_FILESIZE_ANIMATED_GIFS_PUBLIC_SHARING + value: {{ .Values.owncloud.maxFilesizeAnimatedGifsPublicSharing | quote }} +- name: OWNCLOUD_MAX_INPUT_TIME + value: {{ .Values.owncloud.maxInputTime | quote }} +- name: OWNCLOUD_MAX_UPLOAD + value: {{ .Values.owncloud.maxUpload | quote }} +- name: OWNCLOUD_MEMCACHED_ENABLED + value: {{ .Values.owncloud.memcachedEnabled | quote }} +- name: OWNCLOUD_MEMCACHED_HOST + value: {{ .Values.owncloud.memcachedHost | quote }} +- name: OWNCLOUD_MEMCACHED_OPTIONS + value: {{ .Values.owncloud.memcachedOptions | quote }} +- name: OWNCLOUD_MEMCACHED_PORT + value: {{ .Values.owncloud.memcachedPort | quote }} +- name: OWNCLOUD_MEMCACHED_STARTUP_TIMEOUT + value: {{ .Values.owncloud.memcachedStartupTimeout | quote }} +- name: OWNCLOUD_MEMCACHE_LOCAL + value: {{ .Values.owncloud.memcacheLocal | quote }} +- name: OWNCLOUD_MEMCACHE_LOCKING + value: {{ .Values.owncloud.memcacheLocking | quote }} +- name: OWNCLOUD_MINIMUM_SUPPORTED_DESKTOP_VERSION + value: {{ .Values.owncloud.minimumSupportedDesktopVersion | quote }} +- name: OWNCLOUD_MOUNT_FILE + value: {{ .Values.owncloud.mountFile | quote }} +- name: OWNCLOUD_MYSQL_UTF8MB4 + value: {{ .Values.owncloud.mysqlUtf8Mb4 | quote }} +{{- if .Values.owncloud.objectstore.enabled }} +- name: OWNCLOUD_OBJECTSTORE_BUCKET + value: {{ .Values.owncloud.objectstore.bucket | quote }} +- name: OWNCLOUD_OBJECTSTORE_CLASS + value: {{ .Values.owncloud.objectstore.class | quote }} +- name: OWNCLOUD_OBJECTSTORE_ENABLED + value: {{ .Values.owncloud.objectstore.enabled | quote }} +- name: OWNCLOUD_OBJECTSTORE_ENDPOINT + value: {{ .Values.owncloud.objectstore.endpoint | quote }} +- name: OWNCLOUD_OBJECTSTORE_KEY + value: {{ .Values.owncloud.objectstore.key | quote }} +- name: OWNCLOUD_OBJECTSTORE_PATHSTYLE + value: {{ .Values.owncloud.objectstore.pathstyle | quote }} +- name: OWNCLOUD_OBJECTSTORE_REGION + value: {{ .Values.owncloud.objectstore.region | quote }} +- name: OWNCLOUD_OBJECTSTORE_SECRET + value: {{ .Values.owncloud.objectstore.secret | quote }} +- name: OWNCLOUD_OBJECTSTORE_VERSION + value: {{ .Values.owncloud.objectstore.version | quote }} +{{- end }} +- name: OWNCLOUD_OPERATION_MODE + value: {{ .Values.owncloud.operationMode | quote }} +- name: OWNCLOUD_OVERWRITE_CLI_URL + value: {{ .Values.owncloud.overwriteCliUrl | quote }} +- name: OWNCLOUD_OVERWRITE_COND_ADDR + value: {{ .Values.owncloud.overwriteCondAddr | quote }} +- name: OWNCLOUD_OVERWRITE_HOST + value: {{ .Values.owncloud.overwriteHost | quote }} +- name: OWNCLOUD_OVERWRITE_PROTOCOL + value: {{ .Values.owncloud.overwriteProtocol | quote }} +- name: OWNCLOUD_OVERWRITE_WEBROOT + value: {{ .Values.owncloud.overwriteWebroot | quote }} +- name: OWNCLOUD_PART_FILE_IN_STORAGE + value: {{ .Values.owncloud.partFileInStorage | quote }} +- name: OWNCLOUD_POST_CRONJOB_PATH + value: {{ .Values.owncloud.postCronjobPath | quote }} +- name: OWNCLOUD_POST_INSTALL_PATH + value: {{ .Values.owncloud.postInstallPath | quote }} +- name: OWNCLOUD_POST_SERVER_PATH + value: {{ .Values.owncloud.postServerPath | quote }} +- name: OWNCLOUD_PREVIEW_LIBREOFFICE_PATH + value: {{ .Values.owncloud.preview.libreofficePath | quote }} +- name: OWNCLOUD_PREVIEW_MAX_FILESIZE_IMAGE + value: {{ .Values.owncloud.preview.maxFilesizeImage | quote }} +- name: OWNCLOUD_PREVIEW_MAX_SCALE_FACTOR + value: {{ .Values.owncloud.preview.maxScaleFactor | quote }} +- name: OWNCLOUD_PREVIEW_MAX_X + value: {{ .Values.owncloud.preview.maxX | quote }} +- name: OWNCLOUD_PREVIEW_MAX_Y + value: {{ .Values.owncloud.preview.maxY | quote }} +- name: OWNCLOUD_PREVIEW_OFFICE_CL_PARAMETERS + value: {{ .Values.owncloud.preview.officeClParameters | quote }} +- name: OWNCLOUD_PRE_CRONJOB_PATH + value: {{ .Values.owncloud.preCronjobPath | quote }} +- name: OWNCLOUD_PRE_INSTALL_PATH + value: {{ .Values.owncloud.preInstallPath | quote }} +- name: OWNCLOUD_PRE_SERVER_PATH + value: {{ .Values.owncloud.preServerPath | quote }} +- name: OWNCLOUD_PROTOCOL + value: {{ .Values.owncloud.protocol | quote }} +- name: OWNCLOUD_PROXY + value: {{ .Values.owncloud.proxy | quote }} +- name: OWNCLOUD_PROXY_USERPWD + value: {{ .Values.owncloud.proxyUserpwd | quote }} +- name: OWNCLOUD_QUOTA_INCLUDE_EXTERNAL_STORAGE + value: {{ .Values.owncloud.quotaIncludeExternalStorage | quote }} +{{- if .Values.owncloud.redis.enabled }} +- name: OWNCLOUD_REDIS_DB + value: {{ .Values.owncloud.redis.db | quote }} +- name: OWNCLOUD_REDIS_ENABLED + value: "true" +- name: OWNCLOUD_REDIS_FAILOVER_MODE + value: {{ .Values.owncloud.redis.failoverMode | quote }} +- name: OWNCLOUD_REDIS_HOST + value: {{ .Values.owncloud.redis.host | quote }} +- name: OWNCLOUD_REDIS_PASSWORD + value: {{ .Values.owncloud.redis.password | quote }} +{{- end }} +- name: OWNCLOUD_REDIS_PORT + value: {{ .Values.owncloud.redis.port | quote }} +- name: OWNCLOUD_REDIS_READ_TIMEOUT + value: {{ .Values.owncloud.redis.readTimeout | quote }} +- name: OWNCLOUD_REDIS_SEEDS + value: {{ .Values.owncloud.redis.seeds | quote }} +- name: OWNCLOUD_REDIS_SESSION_LOCKING_ENABLED + value: {{ .Values.owncloud.redis.sessionLockingEnabled | quote }} +- name: OWNCLOUD_REDIS_SESSION_LOCK_RETRIES + value: {{ .Values.owncloud.redis.sessionLockRetries | quote }} +- name: OWNCLOUD_REDIS_SESSION_LOCK_WAIT_TIME + value: {{ .Values.owncloud.redis.sessionLockWaitTime | quote }} +- name: OWNCLOUD_REDIS_STARTUP_TIMEOUT + value: {{ .Values.owncloud.redis.startupTimeout | quote }} +- name: OWNCLOUD_REDIS_TIMEOUT + value: {{ .Values.owncloud.redis.timeout | quote }} +- name: OWNCLOUD_REMEMBER_LOGIN_COOKIE_LIFETIME + value: {{ .Values.owncloud.rememberLoginCookieLifetime | quote }} +- name: OWNCLOUD_SECRET + value: {{ .Values.owncloud.secret | quote }} +- name: OWNCLOUD_SESSION_KEEPALIVE + value: {{ .Values.owncloud.session.keepalive | quote }} +- name: OWNCLOUD_SESSION_LIFETIME + value: {{ .Values.owncloud.session.lifetime | quote }} +- name: OWNCLOUD_SESSION_FORCED_LOGOUT_TIMEOUT + value: {{ .Values.owncloud.session.forcedLogoutTimeout | quote }} +- name: OWNCLOUD_SESSION_SAVE_HANDLER + value: {{ .Values.owncloud.session.saveHandler | quote }} +- name: OWNCLOUD_SESSION_SAVE_PATH + value: {{ .Values.owncloud.session.savePath | quote }} +- name: OWNCLOUD_SHARE_FOLDER + value: {{ .Values.owncloud.shareFolder | quote }} +- name: OWNCLOUD_SHARING_FEDERATION_ALLOW_HTTP_FALLBACK + value: {{ .Values.owncloud.sharingFederationAllowHttpFallback | quote }} +- name: OWNCLOUD_SHARING_MANAGER_FACTORY + value: {{ .Values.owncloud.sharingManagerFactory | quote }} +- name: OWNCLOUD_SHOW_SERVER_HOSTNAME + value: {{ .Values.owncloud.showServerHostname | quote }} +- name: OWNCLOUD_SINGLEUSER + value: {{ .Values.owncloud.singleuser | quote }} +- name: OWNCLOUD_SKELETON_DIRECTORY + value: {{ .Values.owncloud.skeletonDirectory | quote }} +- name: OWNCLOUD_SKIP_CHMOD + value: {{ .Values.owncloud.skipChmod | quote }} +- name: OWNCLOUD_SKIP_CHOWN + value: "true" +- name: OWNCLOUD_SMB_LOGGING_ENABLE + value: {{ .Values.owncloud.smbLoggingEnable | quote }} +- name: OWNCLOUD_SQLITE_JOURNAL_MODE + value: {{ .Values.owncloud.sqliteJournalMode | quote }} +- name: OWNCLOUD_SUB_URL + value: {{ .Values.owncloud.subUrl | quote }} +- name: OWNCLOUD_SYSTEMTAGS_MANAGER_FACTORY + value: {{ .Values.owncloud.systemtagsManagerFactory | quote }} +- name: OWNCLOUD_TEMP_DIRECTORY + value: {{ .Values.owncloud.tempDirectory | quote }} +- name: OWNCLOUD_TOKEN_AUTH_ENFORCED + value: {{ .Values.owncloud.tokenAuthEnforced | quote }} +- name: OWNCLOUD_TRASHBIN_PURGE_LIMIT + value: {{ .Values.owncloud.trashbin.purgeLimit | quote }} +- name: OWNCLOUD_TRASHBIN_RETENTION_OBLIGATION + value: {{ .Values.owncloud.trashbin.retentionObligation | quote }} +- name: OWNCLOUD_TRUSTED_PROXIES + value: {{ .Values.owncloud.trustedProxies | quote }} +- name: OWNCLOUD_UPDATER_SERVER_URL + value: {{ .Values.owncloud.updaterServerUrl | quote }} +- name: OWNCLOUD_UPDATE_CHECKER + value: {{ .Values.owncloud.updateChecker | quote }} +- name: OWNCLOUD_UPGRADE_AUTOMATIC_APP_UPDATES + value: {{ .Values.owncloud.upgradeAutomaticAppUpdates | quote }} +- name: OWNCLOUD_USER_SEARCH_MIN_LENGTH + value: {{ .Values.owncloud.userSearchMinLength | quote }} +- name: OWNCLOUD_VERSIONS_RETENTION_OBLIGATION + value: {{ .Values.owncloud.versionsRetentionObligation | quote }} +- name: OWNCLOUD_VERSION_HIDE + value: {{ .Values.owncloud.versionHide | quote }} +- name: OWNCLOUD_VOLUME_APPS + value: {{ .Values.owncloud.volumeApps | quote }} +- name: OWNCLOUD_VOLUME_CONFIG + value: {{ .Values.owncloud.volumeConfig | quote }} +- name: OWNCLOUD_VOLUME_FILES + value: {{ .Values.owncloud.volumeFiles | quote }} +- name: OWNCLOUD_VOLUME_ROOT + value: {{ .Values.owncloud.volumeRoot | quote }} +- name: OWNCLOUD_VOLUME_SESSIONS + value: {{ .Values.owncloud.volumeSessions | quote }} +{{- end -}} diff --git a/charts/owncloud/templates/cronjob.yaml b/charts/owncloud/templates/cronjob.yaml new file mode 100644 index 0000000..f2ffba2 --- /dev/null +++ b/charts/owncloud/templates/cronjob.yaml @@ -0,0 +1,49 @@ +apiVersion: batch/v1 +kind: CronJob +metadata: + name: {{ include "owncloud.fullname" . }} +spec: + schedule: {{ .Values.owncloud.crondSchedule | quote }} + concurrencyPolicy: Forbid + jobTemplate: + spec: + parallelism: 1 + backoffLimit: 0 + template: + metadata: + annotations: + checksum/config: {{ print .Values.owncloud.configExtra | sha256sum }} + {{- with .Values.podAnnotations }} + {{- toYaml . | nindent 12 }} + {{- end }} + labels: + {{- include "owncloud.selectorLabels" . | nindent 12 }} + spec: + restartPolicy: Never + containers: + - name: {{ .Chart.Name }} + securityContext: + {{- toYaml .Values.securityContext | nindent 14 }} + image: {{ template "owncloud.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + env: + {{- include "owncloud.environment" . | nindent 14 }} + command: ['/usr/bin/entrypoint', "/usr/bin/owncloud", "/usr/bin/cronjob"] + resources: + {{- toYaml .Values.resources | nindent 14 }} + volumeMounts: + - name: owncloud-data + mountPath: {{ .Values.owncloud.volume.root }} + - name: config-volume + mountPath: {{ .Values.owncloud.volume.config }}/configmap.config.php + subPath: configmap.config.php + restartPolicy: OnFailure + volumes: + - name: owncloud-data + {{- if .Values.persistence.enabled }} + persistentVolumeClaim: + claimName: {{ include "owncloud.fullname" . }} + {{- end }} + - name: config-volume + secret: + secretName: owncloud-config diff --git a/charts/owncloud/templates/deployment.yaml b/charts/owncloud/templates/deployment.yaml index 618af58..e3283f9 100644 --- a/charts/owncloud/templates/deployment.yaml +++ b/charts/owncloud/templates/deployment.yaml @@ -59,366 +59,7 @@ spec: image: {{ template "owncloud.image" . }} imagePullPolicy: {{ .Values.image.pullPolicy }} env: - - name: OWNCLOUD_ACCESSLOG_LOCATION - value: {{ .Values.owncloud.accesslogLocation | quote }} - - name: OWNCLOUD_ACCOUNTS_ENABLE_MEDIAL_SEARCH - value: {{ .Values.owncloud.accountsEnableMedialSearch | quote }} - - name: OWNCLOUD_ADMIN_PASSWORD - value: {{ .Values.owncloud.adminPassword | quote }} - - name: OWNCLOUD_ADMIN_USERNAME - value: {{ .Values.owncloud.adminUsername | quote }} - - name: OWNCLOUD_ALLOW_USER_TO_CHANGE_DISPLAY_NAME - value: {{ .Values.owncloud.allowUserToChangeDisplayName | quote }} - - name: OWNCLOUD_APPS_DEPRECATED - value: {{ .Values.owncloud.apps.deprecated | quote }} - - name: OWNCLOUD_APPS_DISABLE - value: {{ .Values.owncloud.apps.disable | quote }} - - name: OWNCLOUD_APPS_ENABLE - value: {{ .Values.owncloud.apps.enable | quote }} - - name: OWNCLOUD_APPS_INSTALL - value: {{ .Values.owncloud.apps.install | quote }} - - name: OWNCLOUD_APPS_INSTALL_MAJOR - value: {{ .Values.owncloud.apps.installMajor | quote }} - - name: OWNCLOUD_APPS_UNINSTALL - value: {{ .Values.owncloud.apps.uninstall | quote }} - - name: OWNCLOUD_BACKGROUND_MODE - value: {{ .Values.owncloud.backgroundMode | quote }} - - name: OWNCLOUD_BLACKLISTED_FILES - value: {{ .Values.owncloud.blacklistedFiles | quote }} - - name: OWNCLOUD_CACHE_CHUNK_GC_TTL - value: {{ .Values.owncloud.cacheChunkGcTtl | quote }} - - name: OWNCLOUD_CACHE_PATH - value: {{ .Values.owncloud.cachePath | quote }} - - name: OWNCLOUD_CHECK_FOR_WORKING_WELLKNOWN_SETUP - value: {{ .Values.owncloud.checkForWorkingWellknownSetup | quote }} - - name: OWNCLOUD_CIPHER - value: {{ .Values.owncloud.cipher | quote }} - - name: OWNCLOUD_COMMENTS_MANAGER_FACTORY - value: {{ .Values.owncloud.commentsManagerFactory | quote }} - - name: OWNCLOUD_CORS_ALLOWED_DOMAINS - value: {{ .Values.owncloud.corsAllowedDomains | quote }} - - name: OWNCLOUD_CROND_ENABLED - value: {{ .Values.owncloud.crondEnabled | quote }} - - name: OWNCLOUD_CROND_SCHEDULE - value: {{ .Values.owncloud.crondSchedule | quote }} - - name: OWNCLOUD_CRON_LOG - value: {{ .Values.owncloud.cronLog | quote }} - - name: OWNCLOUD_CSRF_DISABLED - value: {{ .Values.owncloud.csrfDisabled | quote }} - - name: OWNCLOUD_DAV_CHUNK_BASE_DIR - value: {{ .Values.owncloud.davChunkBaseDir | quote }} - - name: OWNCLOUD_DAV_ENABLE_ASYNC - value: {{ .Values.owncloud.davEnableAsync | quote }} - - name: OWNCLOUD_DB_FAIL - value: {{ .Values.owncloud.db.fail | quote }} - - name: OWNCLOUD_DB_HOST - value: {{ .Values.owncloud.db.host | quote }} - - name: OWNCLOUD_DB_NAME - value: {{ .Values.owncloud.db.name | quote }} - - name: OWNCLOUD_DB_PASSWORD - value: {{ .Values.owncloud.db.password | quote }} - - name: OWNCLOUD_DB_PREFIX - value: {{ .Values.owncloud.db.prefix | quote }} - - name: OWNCLOUD_DB_TIMEOUT - value: {{ .Values.owncloud.db.timeout | quote }} - - name: OWNCLOUD_DB_TYPE - value: {{ .Values.owncloud.db.type | quote }} - - name: OWNCLOUD_DB_USERNAME - value: {{ .Values.owncloud.db.username | quote }} - - name: OWNCLOUD_DEBUG - value: {{ .Values.owncloud.debug | quote }} - - name: OWNCLOUD_DEFAULT_APP - value: {{ .Values.owncloud.defaultApp | quote }} - - name: OWNCLOUD_DEFAULT_LANGUAGE - value: {{ .Values.owncloud.defaultLanguage | quote }} - - name: OWNCLOUD_DOMAIN - value: {{ .Values.owncloud.domain | quote }} - - name: OWNCLOUD_TRUSTED_DOMAINS - value: {{ include "owncloud.trustedDomains" . }} - - name: OWNCLOUD_ENABLED_PREVIEW_PROVIDERS - value: {{ .Values.owncloud.enabledPreviewProviders | quote }} - - name: OWNCLOUD_ENABLE_AVATARS - value: {{ .Values.owncloud.enableAvatars | quote }} - - name: OWNCLOUD_ENABLE_CERTIFICATE_MANAGEMENT - value: {{ .Values.owncloud.enableCertificateManagement | quote }} - - name: OWNCLOUD_ENABLE_PREVIEWS - value: {{ .Values.owncloud.enablePreviews | quote }} - - name: OWNCLOUD_ENABLE_OIDC_REWRITE_URL - value: {{ .Values.owncloud.enableOidcRewriteUrl | quote }} - - name: OWNCLOUD_ENTRYPOINT_INITIALIZED - value: {{ .Values.owncloud.entrypointInitialized | quote }} - - name: OWNCLOUD_ERRORLOG_LOCATION - value: {{ .Values.owncloud.errorlogLocation | quote }} - - name: OWNCLOUD_EXCLUDED_DIRECTORIES - value: {{ .Values.owncloud.excludedDirectories | quote }} - - name: OWNCLOUD_FILELOCKING_ENABLED - value: {{ .Values.owncloud.filelockingEnabled | quote }} - - name: OWNCLOUD_FILELOCKING_TTL - value: {{ .Values.owncloud.filelockingTtl | quote }} - - name: OWNCLOUD_FILESYSTEM_CACHE_READONLY - value: {{ .Values.owncloud.filesystemCacheReadonly | quote }} - - name: OWNCLOUD_FILESYSTEM_CHECK_CHANGES - value: {{ .Values.owncloud.filesystemCheckChanges | quote }} - - name: OWNCLOUD_FILES_EXTERNAL_ALLOW_NEW_LOCAL - value: {{ .Values.owncloud.filesExternalAllowNewLocal | quote }} - - name: OWNCLOUD_FORWARDED_FOR_HEADERS - value: {{ .Values.owncloud.forwardedForHeaders | quote }} - - name: OWNCLOUD_HASHING_COST - value: {{ .Values.owncloud.hashingCost | quote }} - - name: OWNCLOUD_HAS_INTERNET_CONNECTION - value: {{ .Values.owncloud.hasInternetConnection | quote }} - - name: OWNCLOUD_HTACCESS_REWRITE_BASE - value: {{ .Values.owncloud.htaccessRewriteBase | quote }} - - name: OWNCLOUD_HTTP_COOKIE_SAMESITE - value: {{ .Values.owncloud.httpCookieSamesite | quote }} - - name: OWNCLOUD_INTEGRITY_EXCLUDED_FILES - value: {{ .Values.owncloud.integrityExcludedFiles | quote }} - - name: OWNCLOUD_INTEGRITY_IGNORE_MISSING_APP_SIGNATURE - value: {{ .Values.owncloud.integrityIgnoreMissingAppSignature | quote }} - - name: OWNCLOUD_KNOWLEDGEBASE_ENABLED - value: {{ .Values.owncloud.knowledgebaseEnabled | quote }} - - name: OWNCLOUD_APPSTORE_ENABLED - value: {{ .Values.owncloud.appstoreEnabled | quote }} - - name: OWNCLOUD_LICENSE_KEY - value: {{ .Values.owncloud.licenseKey | quote }} - - name: OWNCLOUD_LICENSE_CLASS - value: {{ .Values.owncloud.licenseClass | quote }} - - name: OWNCLOUD_LOGIN_ALTERNATIVES - value: {{ .Values.owncloud.loginAlternatives | quote }} - - name: OWNCLOUD_LOG_DATE_FORMAT - value: {{ .Values.owncloud.log.dateFormat | quote }} - - name: OWNCLOUD_LOG_FILE - value: {{ .Values.owncloud.log.file | quote }} - - name: OWNCLOUD_LOG_LEVEL - value: {{ .Values.owncloud.log.level | quote }} - - name: OWNCLOUD_LOG_ROTATE_SIZE - value: {{ .Values.owncloud.log.rotateSize | quote }} - - name: OWNCLOUD_LOG_TIMEZONE - value: {{ .Values.owncloud.log.timezone | quote }} - - name: OWNCLOUD_LOST_PASSWORD_LINK - value: {{ .Values.owncloud.lostPasswordLink | quote }} - - name: OWNCLOUD_MAIL_DOMAIN - value: {{ .Values.owncloud.mail.domain | quote }} - - name: OWNCLOUD_MAIL_FROM_ADDRESS - value: {{ .Values.owncloud.mail.fromAddress | quote }} - - name: OWNCLOUD_MAIL_SMTP_AUTH - value: {{ .Values.owncloud.mail.smtp.auth | quote }} - - name: OWNCLOUD_MAIL_SMTP_AUTH_TYPE - value: {{ .Values.owncloud.mail.smtp.authType | quote }} - - name: OWNCLOUD_MAIL_SMTP_DEBUG - value: {{ .Values.owncloud.mail.smtp.debug | quote }} - - name: OWNCLOUD_MAIL_SMTP_HOST - value: {{ .Values.owncloud.mail.smtp.host | quote }} - - name: OWNCLOUD_MAIL_SMTP_MODE - value: {{ .Values.owncloud.mail.smtp.mode | quote }} - - name: OWNCLOUD_MAIL_SMTP_NAME - value: {{ .Values.owncloud.mail.smtp.name | quote }} - - name: OWNCLOUD_MAIL_SMTP_PASSWORD - value: {{ .Values.owncloud.mail.smtp.password | quote }} - - name: OWNCLOUD_MAIL_SMTP_PORT - value: {{ .Values.owncloud.mail.smtp.port | quote }} - - name: OWNCLOUD_MAIL_SMTP_SECURE - value: {{ .Values.owncloud.mail.smtp.secure | quote }} - - name: OWNCLOUD_MAIL_SMTP_TIMEOUT - value: {{ .Values.owncloud.mail.smtp.timeout | quote }} - - name: OWNCLOUD_MAINTENANCE - value: {{ .Values.owncloud.maintenance | quote }} - - name: OWNCLOUD_MARKETPLACE_CA - value: {{ .Values.owncloud.marketplace.ca | quote }} - - name: OWNCLOUD_MARKETPLACE_KEY - value: {{ .Values.owncloud.marketplace.key | quote }} - - name: OWNCLOUD_MAX_EXECUTION_TIME - value: {{ .Values.owncloud.maxExecutionTime | quote }} - - name: OWNCLOUD_MAX_FILESIZE_ANIMATED_GIFS_PUBLIC_SHARING - value: {{ .Values.owncloud.maxFilesizeAnimatedGifsPublicSharing | quote }} - - name: OWNCLOUD_MAX_INPUT_TIME - value: {{ .Values.owncloud.maxInputTime | quote }} - - name: OWNCLOUD_MAX_UPLOAD - value: {{ .Values.owncloud.maxUpload | quote }} - - name: OWNCLOUD_MEMCACHED_ENABLED - value: {{ .Values.owncloud.memcachedEnabled | quote }} - - name: OWNCLOUD_MEMCACHED_HOST - value: {{ .Values.owncloud.memcachedHost | quote }} - - name: OWNCLOUD_MEMCACHED_OPTIONS - value: {{ .Values.owncloud.memcachedOptions | quote }} - - name: OWNCLOUD_MEMCACHED_PORT - value: {{ .Values.owncloud.memcachedPort | quote }} - - name: OWNCLOUD_MEMCACHED_STARTUP_TIMEOUT - value: {{ .Values.owncloud.memcachedStartupTimeout | quote }} - - name: OWNCLOUD_MEMCACHE_LOCAL - value: {{ .Values.owncloud.memcacheLocal | quote }} - - name: OWNCLOUD_MEMCACHE_LOCKING - value: {{ .Values.owncloud.memcacheLocking | quote }} - - name: OWNCLOUD_MINIMUM_SUPPORTED_DESKTOP_VERSION - value: {{ .Values.owncloud.minimumSupportedDesktopVersion | quote }} - - name: OWNCLOUD_MOUNT_FILE - value: {{ .Values.owncloud.mountFile | quote }} - - name: OWNCLOUD_MYSQL_UTF8MB4 - value: {{ .Values.owncloud.mysqlUtf8Mb4 | quote }} - {{- if .Values.owncloud.objectstore.enabled }} - - name: OWNCLOUD_OBJECTSTORE_BUCKET - value: {{ .Values.owncloud.objectstore.bucket | quote }} - - name: OWNCLOUD_OBJECTSTORE_CLASS - value: {{ .Values.owncloud.objectstore.class | quote }} - - name: OWNCLOUD_OBJECTSTORE_ENABLED - value: {{ .Values.owncloud.objectstore.enabled | quote }} - - name: OWNCLOUD_OBJECTSTORE_ENDPOINT - value: {{ .Values.owncloud.objectstore.endpoint | quote }} - - name: OWNCLOUD_OBJECTSTORE_KEY - value: {{ .Values.owncloud.objectstore.key | quote }} - - name: OWNCLOUD_OBJECTSTORE_PATHSTYLE - value: {{ .Values.owncloud.objectstore.pathstyle | quote }} - - name: OWNCLOUD_OBJECTSTORE_REGION - value: {{ .Values.owncloud.objectstore.region | quote }} - - name: OWNCLOUD_OBJECTSTORE_SECRET - value: {{ .Values.owncloud.objectstore.secret | quote }} - - name: OWNCLOUD_OBJECTSTORE_VERSION - value: {{ .Values.owncloud.objectstore.version | quote }} - {{- end }} - - name: OWNCLOUD_OPERATION_MODE - value: {{ .Values.owncloud.operationMode | quote }} - - name: OWNCLOUD_OVERWRITE_CLI_URL - value: {{ .Values.owncloud.overwriteCliUrl | quote }} - - name: OWNCLOUD_OVERWRITE_COND_ADDR - value: {{ .Values.owncloud.overwriteCondAddr | quote }} - - name: OWNCLOUD_OVERWRITE_HOST - value: {{ .Values.owncloud.overwriteHost | quote }} - - name: OWNCLOUD_OVERWRITE_PROTOCOL - value: {{ .Values.owncloud.overwriteProtocol | quote }} - - name: OWNCLOUD_OVERWRITE_WEBROOT - value: {{ .Values.owncloud.overwriteWebroot | quote }} - - name: OWNCLOUD_PART_FILE_IN_STORAGE - value: {{ .Values.owncloud.partFileInStorage | quote }} - - name: OWNCLOUD_POST_CRONJOB_PATH - value: {{ .Values.owncloud.postCronjobPath | quote }} - - name: OWNCLOUD_POST_INSTALL_PATH - value: {{ .Values.owncloud.postInstallPath | quote }} - - name: OWNCLOUD_POST_SERVER_PATH - value: {{ .Values.owncloud.postServerPath | quote }} - - name: OWNCLOUD_PREVIEW_LIBREOFFICE_PATH - value: {{ .Values.owncloud.preview.libreofficePath | quote }} - - name: OWNCLOUD_PREVIEW_MAX_FILESIZE_IMAGE - value: {{ .Values.owncloud.preview.maxFilesizeImage | quote }} - - name: OWNCLOUD_PREVIEW_MAX_SCALE_FACTOR - value: {{ .Values.owncloud.preview.maxScaleFactor | quote }} - - name: OWNCLOUD_PREVIEW_MAX_X - value: {{ .Values.owncloud.preview.maxX | quote }} - - name: OWNCLOUD_PREVIEW_MAX_Y - value: {{ .Values.owncloud.preview.maxY | quote }} - - name: OWNCLOUD_PREVIEW_OFFICE_CL_PARAMETERS - value: {{ .Values.owncloud.preview.officeClParameters | quote }} - - name: OWNCLOUD_PRE_CRONJOB_PATH - value: {{ .Values.owncloud.preCronjobPath | quote }} - - name: OWNCLOUD_PRE_INSTALL_PATH - value: {{ .Values.owncloud.preInstallPath | quote }} - - name: OWNCLOUD_PRE_SERVER_PATH - value: {{ .Values.owncloud.preServerPath | quote }} - - name: OWNCLOUD_PROTOCOL - value: {{ .Values.owncloud.protocol | quote }} - - name: OWNCLOUD_PROXY - value: {{ .Values.owncloud.proxy | quote }} - - name: OWNCLOUD_PROXY_USERPWD - value: {{ .Values.owncloud.proxyUserpwd | quote }} - - name: OWNCLOUD_QUOTA_INCLUDE_EXTERNAL_STORAGE - value: {{ .Values.owncloud.quotaIncludeExternalStorage | quote }} - {{- if .Values.owncloud.redis.enabled }} - - name: OWNCLOUD_REDIS_DB - value: {{ .Values.owncloud.redis.db | quote }} - - name: OWNCLOUD_REDIS_ENABLED - value: "true" - - name: OWNCLOUD_REDIS_FAILOVER_MODE - value: {{ .Values.owncloud.redis.failoverMode | quote }} - - name: OWNCLOUD_REDIS_HOST - value: {{ .Values.owncloud.redis.host | quote }} - - name: OWNCLOUD_REDIS_PASSWORD - value: {{ .Values.owncloud.redis.password | quote }} - {{- end }} - - name: OWNCLOUD_REDIS_PORT - value: {{ .Values.owncloud.redis.port | quote }} - - name: OWNCLOUD_REDIS_READ_TIMEOUT - value: {{ .Values.owncloud.redis.readTimeout | quote }} - - name: OWNCLOUD_REDIS_SEEDS - value: {{ .Values.owncloud.redis.seeds | quote }} - - name: OWNCLOUD_REDIS_SESSION_LOCKING_ENABLED - value: {{ .Values.owncloud.redis.sessionLockingEnabled | quote }} - - name: OWNCLOUD_REDIS_SESSION_LOCK_RETRIES - value: {{ .Values.owncloud.redis.sessionLockRetries | quote }} - - name: OWNCLOUD_REDIS_SESSION_LOCK_WAIT_TIME - value: {{ .Values.owncloud.redis.sessionLockWaitTime | quote }} - - name: OWNCLOUD_REDIS_STARTUP_TIMEOUT - value: {{ .Values.owncloud.redis.startupTimeout | quote }} - - name: OWNCLOUD_REDIS_TIMEOUT - value: {{ .Values.owncloud.redis.timeout | quote }} - - name: OWNCLOUD_REMEMBER_LOGIN_COOKIE_LIFETIME - value: {{ .Values.owncloud.rememberLoginCookieLifetime | quote }} - - name: OWNCLOUD_SECRET - value: {{ .Values.owncloud.secret | quote }} - - name: OWNCLOUD_SESSION_KEEPALIVE - value: {{ .Values.owncloud.session.keepalive | quote }} - - name: OWNCLOUD_SESSION_LIFETIME - value: {{ .Values.owncloud.session.lifetime | quote }} - - name: OWNCLOUD_SESSION_FORCED_LOGOUT_TIMEOUT - value: {{ .Values.owncloud.session.forcedLogoutTimeout | quote }} - - name: OWNCLOUD_SESSION_SAVE_HANDLER - value: {{ .Values.owncloud.session.saveHandler | quote }} - - name: OWNCLOUD_SESSION_SAVE_PATH - value: {{ .Values.owncloud.session.savePath | quote }} - - name: OWNCLOUD_SHARE_FOLDER - value: {{ .Values.owncloud.shareFolder | quote }} - - name: OWNCLOUD_SHARING_FEDERATION_ALLOW_HTTP_FALLBACK - value: {{ .Values.owncloud.sharingFederationAllowHttpFallback | quote }} - - name: OWNCLOUD_SHARING_MANAGER_FACTORY - value: {{ .Values.owncloud.sharingManagerFactory | quote }} - - name: OWNCLOUD_SHOW_SERVER_HOSTNAME - value: {{ .Values.owncloud.showServerHostname | quote }} - - name: OWNCLOUD_SINGLEUSER - value: {{ .Values.owncloud.singleuser | quote }} - - name: OWNCLOUD_SKELETON_DIRECTORY - value: {{ .Values.owncloud.skeletonDirectory | quote }} - - name: OWNCLOUD_SKIP_CHMOD - value: {{ .Values.owncloud.skipChmod | quote }} - - name: OWNCLOUD_SKIP_CHOWN - value: "true" - - name: OWNCLOUD_SMB_LOGGING_ENABLE - value: {{ .Values.owncloud.smbLoggingEnable | quote }} - - name: OWNCLOUD_SQLITE_JOURNAL_MODE - value: {{ .Values.owncloud.sqliteJournalMode | quote }} - - name: OWNCLOUD_SUB_URL - value: {{ .Values.owncloud.subUrl | quote }} - - name: OWNCLOUD_SYSTEMTAGS_MANAGER_FACTORY - value: {{ .Values.owncloud.systemtagsManagerFactory | quote }} - - name: OWNCLOUD_TEMP_DIRECTORY - value: {{ .Values.owncloud.tempDirectory | quote }} - - name: OWNCLOUD_TOKEN_AUTH_ENFORCED - value: {{ .Values.owncloud.tokenAuthEnforced | quote }} - - name: OWNCLOUD_TRASHBIN_PURGE_LIMIT - value: {{ .Values.owncloud.trashbin.purgeLimit | quote }} - - name: OWNCLOUD_TRASHBIN_RETENTION_OBLIGATION - value: {{ .Values.owncloud.trashbin.retentionObligation | quote }} - - name: OWNCLOUD_TRUSTED_PROXIES - value: {{ .Values.owncloud.trustedProxies | quote }} - - name: OWNCLOUD_UPDATER_SERVER_URL - value: {{ .Values.owncloud.updaterServerUrl | quote }} - - name: OWNCLOUD_UPDATE_CHECKER - value: {{ .Values.owncloud.updateChecker | quote }} - - name: OWNCLOUD_UPGRADE_AUTOMATIC_APP_UPDATES - value: {{ .Values.owncloud.upgradeAutomaticAppUpdates | quote }} - - name: OWNCLOUD_USER_SEARCH_MIN_LENGTH - value: {{ .Values.owncloud.userSearchMinLength | quote }} - - name: OWNCLOUD_VERSIONS_RETENTION_OBLIGATION - value: {{ .Values.owncloud.versionsRetentionObligation | quote }} - - name: OWNCLOUD_VERSION_HIDE - value: {{ .Values.owncloud.versionHide | quote }} - - name: OWNCLOUD_VOLUME_APPS - value: {{ .Values.owncloud.volumeApps | quote }} - - name: OWNCLOUD_VOLUME_CONFIG - value: {{ .Values.owncloud.volumeConfig | quote }} - - name: OWNCLOUD_VOLUME_FILES - value: {{ .Values.owncloud.volumeFiles | quote }} - - name: OWNCLOUD_VOLUME_ROOT - value: {{ .Values.owncloud.volumeRoot | quote }} - - name: OWNCLOUD_VOLUME_SESSIONS - value: {{ .Values.owncloud.volumeSessions | quote }} + {{- include "owncloud.environment" . | nindent 12 }} ports: - name: http containerPort: 8080 From 17ec439cde381e17726d153870252cc012922cbc Mon Sep 17 00:00:00 2001 From: Dennis Sieben Date: Tue, 20 Jun 2023 15:37:16 +0200 Subject: [PATCH 2/7] - removed `cronLog` setting - added annotation for non-root containers --- charts/owncloud/templates/cronjob.yaml | 5 +++++ charts/owncloud/values.yaml | 2 -- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/charts/owncloud/templates/cronjob.yaml b/charts/owncloud/templates/cronjob.yaml index f2ffba2..82ce7a0 100644 --- a/charts/owncloud/templates/cronjob.yaml +++ b/charts/owncloud/templates/cronjob.yaml @@ -2,6 +2,11 @@ apiVersion: batch/v1 kind: CronJob metadata: name: {{ include "owncloud.fullname" . }} + labels: + {{- include "owncloud.labels" . | nindent 4 }} + annotations: + ignore-check.kube-linter.io/run-as-non-root : "ownCloud does not support non-root containers" + ignore-check.kube-linter.io/no-read-only-root-fs : "ownCloud need to write /etc/environment on startup" spec: schedule: {{ .Values.owncloud.crondSchedule | quote }} concurrencyPolicy: Forbid diff --git a/charts/owncloud/values.yaml b/charts/owncloud/values.yaml index cc5ea80..4988b4a 100644 --- a/charts/owncloud/values.yaml +++ b/charts/owncloud/values.yaml @@ -66,8 +66,6 @@ owncloud: # -- Cron schedule to run ownCloud background jobs. crondSchedule: "*/1 * * * *" # -- Define logging if cron ran successfully(see [documentation](https://doc.owncloud.com/server/latest/admin_manual/configuration/server/config_sample_php_parameters.html#define-logging-if-cron-ran-successfully)) - cronLog: "" - # -- Enable or disable ownCloud’s built-in CSRF protection mechanism (see [documentation](https://doc.owncloud.com/server/latest/admin_manual/configuration/server/config_sample_php_parameters.html#enable-or-disable-ownclouds-built-in-csrf-protection-mechanism)). csrfDisabled: "" # -- Define the DAV chunk base directory (see [documentation](https://doc.owncloud.com/server/latest/admin_manual/configuration/server/config_sample_php_parameters.html#define-the-dav-chunk-base-directory)). davChunkBaseDir: "" From 8df2ebea9163c377447a26eb866203046369f1c9 Mon Sep 17 00:00:00 2001 From: Dennis Sieben Date: Tue, 20 Jun 2023 15:42:28 +0200 Subject: [PATCH 3/7] - updated docs - changed deleted comment line --- charts/owncloud/README.md | 1 - charts/owncloud/values.yaml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/charts/owncloud/README.md b/charts/owncloud/README.md index f1d1127..7ea40a2 100644 --- a/charts/owncloud/README.md +++ b/charts/owncloud/README.md @@ -95,7 +95,6 @@ A major chart version change (like v1.2.3 -> v2.0.0) indicates that there is an | owncloud.commentsManagerFactory | string | `""` | Define an alternative Comments Manager (see [documentation](https://doc.owncloud.com/server/latest/admin_manual/configuration/server/config_sample_php_parameters.html#define-an-alternative-comments-manager)). | | owncloud.configExtra | object | `{}` | | | owncloud.corsAllowedDomains | string | `""` | Define global list of CORS domains (see [documentation](https://doc.owncloud.com/server/latest/admin_manual/configuration/server/config_sample_php_parameters.html#define-global-list-of-cors-domains)). | -| owncloud.cronLog | string | `""` | Define logging if cron ran successfully(see [documentation](https://doc.owncloud.com/server/latest/admin_manual/configuration/server/config_sample_php_parameters.html#define-logging-if-cron-ran-successfully)) | | owncloud.crondEnabled | string | `"true"` | Enable or disable the system cron service. Required for `.Values.owncloud.backgroundMode: "cron"`. | | owncloud.crondSchedule | string | `"*/1 * * * *"` | Cron schedule to run ownCloud background jobs. | | owncloud.csrfDisabled | string | `""` | Enable or disable ownCloud’s built-in CSRF protection mechanism (see [documentation](https://doc.owncloud.com/server/latest/admin_manual/configuration/server/config_sample_php_parameters.html#enable-or-disable-ownclouds-built-in-csrf-protection-mechanism)). | diff --git a/charts/owncloud/values.yaml b/charts/owncloud/values.yaml index 4988b4a..f80631b 100644 --- a/charts/owncloud/values.yaml +++ b/charts/owncloud/values.yaml @@ -65,7 +65,7 @@ owncloud: crondEnabled: "true" # -- Cron schedule to run ownCloud background jobs. crondSchedule: "*/1 * * * *" - # -- Define logging if cron ran successfully(see [documentation](https://doc.owncloud.com/server/latest/admin_manual/configuration/server/config_sample_php_parameters.html#define-logging-if-cron-ran-successfully)) + # -- Enable or disable ownCloud’s built-in CSRF protection mechanism (see [documentation](https://doc.owncloud.com/server/latest/admin_manual/configuration/server/config_sample_php_parameters.html#enable-or-disable-ownclouds-built-in-csrf-protection-mechanism)). csrfDisabled: "" # -- Define the DAV chunk base directory (see [documentation](https://doc.owncloud.com/server/latest/admin_manual/configuration/server/config_sample_php_parameters.html#define-the-dav-chunk-base-directory)). davChunkBaseDir: "" From 079a84920efc42f5d096d8502324c1daebde7f75 Mon Sep 17 00:00:00 2001 From: Dennis Sieben Date: Tue, 20 Jun 2023 15:44:55 +0200 Subject: [PATCH 4/7] - removed duplicate restartPolicy --- charts/owncloud/templates/cronjob.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/charts/owncloud/templates/cronjob.yaml b/charts/owncloud/templates/cronjob.yaml index 82ce7a0..59a4a3e 100644 --- a/charts/owncloud/templates/cronjob.yaml +++ b/charts/owncloud/templates/cronjob.yaml @@ -42,7 +42,6 @@ spec: - name: config-volume mountPath: {{ .Values.owncloud.volume.config }}/configmap.config.php subPath: configmap.config.php - restartPolicy: OnFailure volumes: - name: owncloud-data {{- if .Values.persistence.enabled }} From 1341509e22119fd39d5accb0c629716a81a43e3b Mon Sep 17 00:00:00 2001 From: Dennis Sieben Date: Tue, 20 Jun 2023 19:09:59 +0200 Subject: [PATCH 5/7] - removed template - added configmap with all environment variables - added -cronjob to cronjob names - added container restart on config changes via checksum --- charts/owncloud/templates/_helpers.tpl | 362 -------------------- charts/owncloud/templates/cronjob.yaml | 9 +- charts/owncloud/templates/deployment.yaml | 6 +- charts/owncloud/templates/envconfigmap.yaml | 187 ++++++++++ 4 files changed, 196 insertions(+), 368 deletions(-) create mode 100644 charts/owncloud/templates/envconfigmap.yaml diff --git a/charts/owncloud/templates/_helpers.tpl b/charts/owncloud/templates/_helpers.tpl index 9d75288..d71e424 100644 --- a/charts/owncloud/templates/_helpers.tpl +++ b/charts/owncloud/templates/_helpers.tpl @@ -86,365 +86,3 @@ ownCloud image logic "{{ $.Values.image.repository }}:{{ $tag }}" {{- end -}} {{- end -}} - -{{/* -ownCloud environment settings -*/}} -{{- define "owncloud.environment" -}} -- name: OWNCLOUD_ACCESSLOG_LOCATION - value: {{ .Values.owncloud.accesslogLocation | quote }} -- name: OWNCLOUD_ACCOUNTS_ENABLE_MEDIAL_SEARCH - value: {{ .Values.owncloud.accountsEnableMedialSearch | quote }} -- name: OWNCLOUD_ADMIN_PASSWORD - value: {{ .Values.owncloud.adminPassword | quote }} -- name: OWNCLOUD_ADMIN_USERNAME - value: {{ .Values.owncloud.adminUsername | quote }} -- name: OWNCLOUD_ALLOW_USER_TO_CHANGE_DISPLAY_NAME - value: {{ .Values.owncloud.allowUserToChangeDisplayName | quote }} -- name: OWNCLOUD_APPS_DEPRECATED - value: {{ .Values.owncloud.apps.deprecated | quote }} -- name: OWNCLOUD_APPS_DISABLE - value: {{ .Values.owncloud.apps.disable | quote }} -- name: OWNCLOUD_APPS_ENABLE - value: {{ .Values.owncloud.apps.enable | quote }} -- name: OWNCLOUD_APPS_INSTALL - value: {{ .Values.owncloud.apps.install | quote }} -- name: OWNCLOUD_APPS_INSTALL_MAJOR - value: {{ .Values.owncloud.apps.installMajor | quote }} -- name: OWNCLOUD_APPS_UNINSTALL - value: {{ .Values.owncloud.apps.uninstall | quote }} -- name: OWNCLOUD_BACKGROUND_MODE - value: {{ .Values.owncloud.backgroundMode | quote }} -- name: OWNCLOUD_BLACKLISTED_FILES - value: {{ .Values.owncloud.blacklistedFiles | quote }} -- name: OWNCLOUD_CACHE_CHUNK_GC_TTL - value: {{ .Values.owncloud.cacheChunkGcTtl | quote }} -- name: OWNCLOUD_CACHE_PATH - value: {{ .Values.owncloud.cachePath | quote }} -- name: OWNCLOUD_CHECK_FOR_WORKING_WELLKNOWN_SETUP - value: {{ .Values.owncloud.checkForWorkingWellknownSetup | quote }} -- name: OWNCLOUD_CIPHER - value: {{ .Values.owncloud.cipher | quote }} -- name: OWNCLOUD_COMMENTS_MANAGER_FACTORY - value: {{ .Values.owncloud.commentsManagerFactory | quote }} -- name: OWNCLOUD_CORS_ALLOWED_DOMAINS - value: {{ .Values.owncloud.corsAllowedDomains | quote }} -- name: OWNCLOUD_CROND_ENABLED - value: "false" # Disable ownCloud container's cronJob in Kubernetes in favor of Kubernetes' own CronJob -- name: OWNCLOUD_CSRF_DISABLED - value: {{ .Values.owncloud.csrfDisabled | quote }} -- name: OWNCLOUD_DAV_CHUNK_BASE_DIR - value: {{ .Values.owncloud.davChunkBaseDir | quote }} -- name: OWNCLOUD_DAV_ENABLE_ASYNC - value: {{ .Values.owncloud.davEnableAsync | quote }} -- name: OWNCLOUD_DB_FAIL - value: {{ .Values.owncloud.db.fail | quote }} -- name: OWNCLOUD_DB_HOST - value: {{ .Values.owncloud.db.host | quote }} -- name: OWNCLOUD_DB_NAME - value: {{ .Values.owncloud.db.name | quote }} -- name: OWNCLOUD_DB_PASSWORD - value: {{ .Values.owncloud.db.password | quote }} -- name: OWNCLOUD_DB_PREFIX - value: {{ .Values.owncloud.db.prefix | quote }} -- name: OWNCLOUD_DB_TIMEOUT - value: {{ .Values.owncloud.db.timeout | quote }} -- name: OWNCLOUD_DB_TYPE - value: {{ .Values.owncloud.db.type | quote }} -- name: OWNCLOUD_DB_USERNAME - value: {{ .Values.owncloud.db.username | quote }} -- name: OWNCLOUD_DEBUG - value: {{ .Values.owncloud.debug | quote }} -- name: OWNCLOUD_DEFAULT_APP - value: {{ .Values.owncloud.defaultApp | quote }} -- name: OWNCLOUD_DEFAULT_LANGUAGE - value: {{ .Values.owncloud.defaultLanguage | quote }} -- name: OWNCLOUD_DOMAIN - value: {{ .Values.owncloud.domain | quote }} -- name: OWNCLOUD_TRUSTED_DOMAINS - value: {{ include "owncloud.trustedDomains" . }} -- name: OWNCLOUD_ENABLED_PREVIEW_PROVIDERS - value: {{ .Values.owncloud.enabledPreviewProviders | quote }} -- name: OWNCLOUD_ENABLE_AVATARS - value: {{ .Values.owncloud.enableAvatars | quote }} -- name: OWNCLOUD_ENABLE_CERTIFICATE_MANAGEMENT - value: {{ .Values.owncloud.enableCertificateManagement | quote }} -- name: OWNCLOUD_ENABLE_PREVIEWS - value: {{ .Values.owncloud.enablePreviews | quote }} -- name: OWNCLOUD_ENABLE_OIDC_REWRITE_URL - value: {{ .Values.owncloud.enableOidcRewriteUrl | quote }} -- name: OWNCLOUD_ENTRYPOINT_INITIALIZED - value: {{ .Values.owncloud.entrypointInitialized | quote }} -- name: OWNCLOUD_ERRORLOG_LOCATION - value: {{ .Values.owncloud.errorlogLocation | quote }} -- name: OWNCLOUD_EXCLUDED_DIRECTORIES - value: {{ .Values.owncloud.excludedDirectories | quote }} -- name: OWNCLOUD_FILELOCKING_ENABLED - value: {{ .Values.owncloud.filelockingEnabled | quote }} -- name: OWNCLOUD_FILELOCKING_TTL - value: {{ .Values.owncloud.filelockingTtl | quote }} -- name: OWNCLOUD_FILESYSTEM_CACHE_READONLY - value: {{ .Values.owncloud.filesystemCacheReadonly | quote }} -- name: OWNCLOUD_FILESYSTEM_CHECK_CHANGES - value: {{ .Values.owncloud.filesystemCheckChanges | quote }} -- name: OWNCLOUD_FILES_EXTERNAL_ALLOW_NEW_LOCAL - value: {{ .Values.owncloud.filesExternalAllowNewLocal | quote }} -- name: OWNCLOUD_FORWARDED_FOR_HEADERS - value: {{ .Values.owncloud.forwardedForHeaders | quote }} -- name: OWNCLOUD_HASHING_COST - value: {{ .Values.owncloud.hashingCost | quote }} -- name: OWNCLOUD_HAS_INTERNET_CONNECTION - value: {{ .Values.owncloud.hasInternetConnection | quote }} -- name: OWNCLOUD_HTACCESS_REWRITE_BASE - value: {{ .Values.owncloud.htaccessRewriteBase | quote }} -- name: OWNCLOUD_HTTP_COOKIE_SAMESITE - value: {{ .Values.owncloud.httpCookieSamesite | quote }} -- name: OWNCLOUD_INTEGRITY_EXCLUDED_FILES - value: {{ .Values.owncloud.integrityExcludedFiles | quote }} -- name: OWNCLOUD_INTEGRITY_IGNORE_MISSING_APP_SIGNATURE - value: {{ .Values.owncloud.integrityIgnoreMissingAppSignature | quote }} -- name: OWNCLOUD_KNOWLEDGEBASE_ENABLED - value: {{ .Values.owncloud.knowledgebaseEnabled | quote }} -- name: OWNCLOUD_APPSTORE_ENABLED - value: {{ .Values.owncloud.appstoreEnabled | quote }} -- name: OWNCLOUD_LICENSE_KEY - value: {{ .Values.owncloud.licenseKey | quote }} -- name: OWNCLOUD_LICENSE_CLASS - value: {{ .Values.owncloud.licenseClass | quote }} -- name: OWNCLOUD_LOGIN_ALTERNATIVES - value: {{ .Values.owncloud.loginAlternatives | quote }} -- name: OWNCLOUD_LOG_DATE_FORMAT - value: {{ .Values.owncloud.log.dateFormat | quote }} -- name: OWNCLOUD_LOG_FILE - value: {{ .Values.owncloud.log.file | quote }} -- name: OWNCLOUD_LOG_LEVEL - value: {{ .Values.owncloud.log.level | quote }} -- name: OWNCLOUD_LOG_ROTATE_SIZE - value: {{ .Values.owncloud.log.rotateSize | quote }} -- name: OWNCLOUD_LOG_TIMEZONE - value: {{ .Values.owncloud.log.timezone | quote }} -- name: OWNCLOUD_LOST_PASSWORD_LINK - value: {{ .Values.owncloud.lostPasswordLink | quote }} -- name: OWNCLOUD_MAIL_DOMAIN - value: {{ .Values.owncloud.mail.domain | quote }} -- name: OWNCLOUD_MAIL_FROM_ADDRESS - value: {{ .Values.owncloud.mail.fromAddress | quote }} -- name: OWNCLOUD_MAIL_SMTP_AUTH - value: {{ .Values.owncloud.mail.smtp.auth | quote }} -- name: OWNCLOUD_MAIL_SMTP_AUTH_TYPE - value: {{ .Values.owncloud.mail.smtp.authType | quote }} -- name: OWNCLOUD_MAIL_SMTP_DEBUG - value: {{ .Values.owncloud.mail.smtp.debug | quote }} -- name: OWNCLOUD_MAIL_SMTP_HOST - value: {{ .Values.owncloud.mail.smtp.host | quote }} -- name: OWNCLOUD_MAIL_SMTP_MODE - value: {{ .Values.owncloud.mail.smtp.mode | quote }} -- name: OWNCLOUD_MAIL_SMTP_NAME - value: {{ .Values.owncloud.mail.smtp.name | quote }} -- name: OWNCLOUD_MAIL_SMTP_PASSWORD - value: {{ .Values.owncloud.mail.smtp.password | quote }} -- name: OWNCLOUD_MAIL_SMTP_PORT - value: {{ .Values.owncloud.mail.smtp.port | quote }} -- name: OWNCLOUD_MAIL_SMTP_SECURE - value: {{ .Values.owncloud.mail.smtp.secure | quote }} -- name: OWNCLOUD_MAIL_SMTP_TIMEOUT - value: {{ .Values.owncloud.mail.smtp.timeout | quote }} -- name: OWNCLOUD_MAINTENANCE - value: {{ .Values.owncloud.maintenance | quote }} -- name: OWNCLOUD_MARKETPLACE_CA - value: {{ .Values.owncloud.marketplace.ca | quote }} -- name: OWNCLOUD_MARKETPLACE_KEY - value: {{ .Values.owncloud.marketplace.key | quote }} -- name: OWNCLOUD_MAX_EXECUTION_TIME - value: {{ .Values.owncloud.maxExecutionTime | quote }} -- name: OWNCLOUD_MAX_FILESIZE_ANIMATED_GIFS_PUBLIC_SHARING - value: {{ .Values.owncloud.maxFilesizeAnimatedGifsPublicSharing | quote }} -- name: OWNCLOUD_MAX_INPUT_TIME - value: {{ .Values.owncloud.maxInputTime | quote }} -- name: OWNCLOUD_MAX_UPLOAD - value: {{ .Values.owncloud.maxUpload | quote }} -- name: OWNCLOUD_MEMCACHED_ENABLED - value: {{ .Values.owncloud.memcachedEnabled | quote }} -- name: OWNCLOUD_MEMCACHED_HOST - value: {{ .Values.owncloud.memcachedHost | quote }} -- name: OWNCLOUD_MEMCACHED_OPTIONS - value: {{ .Values.owncloud.memcachedOptions | quote }} -- name: OWNCLOUD_MEMCACHED_PORT - value: {{ .Values.owncloud.memcachedPort | quote }} -- name: OWNCLOUD_MEMCACHED_STARTUP_TIMEOUT - value: {{ .Values.owncloud.memcachedStartupTimeout | quote }} -- name: OWNCLOUD_MEMCACHE_LOCAL - value: {{ .Values.owncloud.memcacheLocal | quote }} -- name: OWNCLOUD_MEMCACHE_LOCKING - value: {{ .Values.owncloud.memcacheLocking | quote }} -- name: OWNCLOUD_MINIMUM_SUPPORTED_DESKTOP_VERSION - value: {{ .Values.owncloud.minimumSupportedDesktopVersion | quote }} -- name: OWNCLOUD_MOUNT_FILE - value: {{ .Values.owncloud.mountFile | quote }} -- name: OWNCLOUD_MYSQL_UTF8MB4 - value: {{ .Values.owncloud.mysqlUtf8Mb4 | quote }} -{{- if .Values.owncloud.objectstore.enabled }} -- name: OWNCLOUD_OBJECTSTORE_BUCKET - value: {{ .Values.owncloud.objectstore.bucket | quote }} -- name: OWNCLOUD_OBJECTSTORE_CLASS - value: {{ .Values.owncloud.objectstore.class | quote }} -- name: OWNCLOUD_OBJECTSTORE_ENABLED - value: {{ .Values.owncloud.objectstore.enabled | quote }} -- name: OWNCLOUD_OBJECTSTORE_ENDPOINT - value: {{ .Values.owncloud.objectstore.endpoint | quote }} -- name: OWNCLOUD_OBJECTSTORE_KEY - value: {{ .Values.owncloud.objectstore.key | quote }} -- name: OWNCLOUD_OBJECTSTORE_PATHSTYLE - value: {{ .Values.owncloud.objectstore.pathstyle | quote }} -- name: OWNCLOUD_OBJECTSTORE_REGION - value: {{ .Values.owncloud.objectstore.region | quote }} -- name: OWNCLOUD_OBJECTSTORE_SECRET - value: {{ .Values.owncloud.objectstore.secret | quote }} -- name: OWNCLOUD_OBJECTSTORE_VERSION - value: {{ .Values.owncloud.objectstore.version | quote }} -{{- end }} -- name: OWNCLOUD_OPERATION_MODE - value: {{ .Values.owncloud.operationMode | quote }} -- name: OWNCLOUD_OVERWRITE_CLI_URL - value: {{ .Values.owncloud.overwriteCliUrl | quote }} -- name: OWNCLOUD_OVERWRITE_COND_ADDR - value: {{ .Values.owncloud.overwriteCondAddr | quote }} -- name: OWNCLOUD_OVERWRITE_HOST - value: {{ .Values.owncloud.overwriteHost | quote }} -- name: OWNCLOUD_OVERWRITE_PROTOCOL - value: {{ .Values.owncloud.overwriteProtocol | quote }} -- name: OWNCLOUD_OVERWRITE_WEBROOT - value: {{ .Values.owncloud.overwriteWebroot | quote }} -- name: OWNCLOUD_PART_FILE_IN_STORAGE - value: {{ .Values.owncloud.partFileInStorage | quote }} -- name: OWNCLOUD_POST_CRONJOB_PATH - value: {{ .Values.owncloud.postCronjobPath | quote }} -- name: OWNCLOUD_POST_INSTALL_PATH - value: {{ .Values.owncloud.postInstallPath | quote }} -- name: OWNCLOUD_POST_SERVER_PATH - value: {{ .Values.owncloud.postServerPath | quote }} -- name: OWNCLOUD_PREVIEW_LIBREOFFICE_PATH - value: {{ .Values.owncloud.preview.libreofficePath | quote }} -- name: OWNCLOUD_PREVIEW_MAX_FILESIZE_IMAGE - value: {{ .Values.owncloud.preview.maxFilesizeImage | quote }} -- name: OWNCLOUD_PREVIEW_MAX_SCALE_FACTOR - value: {{ .Values.owncloud.preview.maxScaleFactor | quote }} -- name: OWNCLOUD_PREVIEW_MAX_X - value: {{ .Values.owncloud.preview.maxX | quote }} -- name: OWNCLOUD_PREVIEW_MAX_Y - value: {{ .Values.owncloud.preview.maxY | quote }} -- name: OWNCLOUD_PREVIEW_OFFICE_CL_PARAMETERS - value: {{ .Values.owncloud.preview.officeClParameters | quote }} -- name: OWNCLOUD_PRE_CRONJOB_PATH - value: {{ .Values.owncloud.preCronjobPath | quote }} -- name: OWNCLOUD_PRE_INSTALL_PATH - value: {{ .Values.owncloud.preInstallPath | quote }} -- name: OWNCLOUD_PRE_SERVER_PATH - value: {{ .Values.owncloud.preServerPath | quote }} -- name: OWNCLOUD_PROTOCOL - value: {{ .Values.owncloud.protocol | quote }} -- name: OWNCLOUD_PROXY - value: {{ .Values.owncloud.proxy | quote }} -- name: OWNCLOUD_PROXY_USERPWD - value: {{ .Values.owncloud.proxyUserpwd | quote }} -- name: OWNCLOUD_QUOTA_INCLUDE_EXTERNAL_STORAGE - value: {{ .Values.owncloud.quotaIncludeExternalStorage | quote }} -{{- if .Values.owncloud.redis.enabled }} -- name: OWNCLOUD_REDIS_DB - value: {{ .Values.owncloud.redis.db | quote }} -- name: OWNCLOUD_REDIS_ENABLED - value: "true" -- name: OWNCLOUD_REDIS_FAILOVER_MODE - value: {{ .Values.owncloud.redis.failoverMode | quote }} -- name: OWNCLOUD_REDIS_HOST - value: {{ .Values.owncloud.redis.host | quote }} -- name: OWNCLOUD_REDIS_PASSWORD - value: {{ .Values.owncloud.redis.password | quote }} -{{- end }} -- name: OWNCLOUD_REDIS_PORT - value: {{ .Values.owncloud.redis.port | quote }} -- name: OWNCLOUD_REDIS_READ_TIMEOUT - value: {{ .Values.owncloud.redis.readTimeout | quote }} -- name: OWNCLOUD_REDIS_SEEDS - value: {{ .Values.owncloud.redis.seeds | quote }} -- name: OWNCLOUD_REDIS_SESSION_LOCKING_ENABLED - value: {{ .Values.owncloud.redis.sessionLockingEnabled | quote }} -- name: OWNCLOUD_REDIS_SESSION_LOCK_RETRIES - value: {{ .Values.owncloud.redis.sessionLockRetries | quote }} -- name: OWNCLOUD_REDIS_SESSION_LOCK_WAIT_TIME - value: {{ .Values.owncloud.redis.sessionLockWaitTime | quote }} -- name: OWNCLOUD_REDIS_STARTUP_TIMEOUT - value: {{ .Values.owncloud.redis.startupTimeout | quote }} -- name: OWNCLOUD_REDIS_TIMEOUT - value: {{ .Values.owncloud.redis.timeout | quote }} -- name: OWNCLOUD_REMEMBER_LOGIN_COOKIE_LIFETIME - value: {{ .Values.owncloud.rememberLoginCookieLifetime | quote }} -- name: OWNCLOUD_SECRET - value: {{ .Values.owncloud.secret | quote }} -- name: OWNCLOUD_SESSION_KEEPALIVE - value: {{ .Values.owncloud.session.keepalive | quote }} -- name: OWNCLOUD_SESSION_LIFETIME - value: {{ .Values.owncloud.session.lifetime | quote }} -- name: OWNCLOUD_SESSION_FORCED_LOGOUT_TIMEOUT - value: {{ .Values.owncloud.session.forcedLogoutTimeout | quote }} -- name: OWNCLOUD_SESSION_SAVE_HANDLER - value: {{ .Values.owncloud.session.saveHandler | quote }} -- name: OWNCLOUD_SESSION_SAVE_PATH - value: {{ .Values.owncloud.session.savePath | quote }} -- name: OWNCLOUD_SHARE_FOLDER - value: {{ .Values.owncloud.shareFolder | quote }} -- name: OWNCLOUD_SHARING_FEDERATION_ALLOW_HTTP_FALLBACK - value: {{ .Values.owncloud.sharingFederationAllowHttpFallback | quote }} -- name: OWNCLOUD_SHARING_MANAGER_FACTORY - value: {{ .Values.owncloud.sharingManagerFactory | quote }} -- name: OWNCLOUD_SHOW_SERVER_HOSTNAME - value: {{ .Values.owncloud.showServerHostname | quote }} -- name: OWNCLOUD_SINGLEUSER - value: {{ .Values.owncloud.singleuser | quote }} -- name: OWNCLOUD_SKELETON_DIRECTORY - value: {{ .Values.owncloud.skeletonDirectory | quote }} -- name: OWNCLOUD_SKIP_CHMOD - value: {{ .Values.owncloud.skipChmod | quote }} -- name: OWNCLOUD_SKIP_CHOWN - value: "true" -- name: OWNCLOUD_SMB_LOGGING_ENABLE - value: {{ .Values.owncloud.smbLoggingEnable | quote }} -- name: OWNCLOUD_SQLITE_JOURNAL_MODE - value: {{ .Values.owncloud.sqliteJournalMode | quote }} -- name: OWNCLOUD_SUB_URL - value: {{ .Values.owncloud.subUrl | quote }} -- name: OWNCLOUD_SYSTEMTAGS_MANAGER_FACTORY - value: {{ .Values.owncloud.systemtagsManagerFactory | quote }} -- name: OWNCLOUD_TEMP_DIRECTORY - value: {{ .Values.owncloud.tempDirectory | quote }} -- name: OWNCLOUD_TOKEN_AUTH_ENFORCED - value: {{ .Values.owncloud.tokenAuthEnforced | quote }} -- name: OWNCLOUD_TRASHBIN_PURGE_LIMIT - value: {{ .Values.owncloud.trashbin.purgeLimit | quote }} -- name: OWNCLOUD_TRASHBIN_RETENTION_OBLIGATION - value: {{ .Values.owncloud.trashbin.retentionObligation | quote }} -- name: OWNCLOUD_TRUSTED_PROXIES - value: {{ .Values.owncloud.trustedProxies | quote }} -- name: OWNCLOUD_UPDATER_SERVER_URL - value: {{ .Values.owncloud.updaterServerUrl | quote }} -- name: OWNCLOUD_UPDATE_CHECKER - value: {{ .Values.owncloud.updateChecker | quote }} -- name: OWNCLOUD_UPGRADE_AUTOMATIC_APP_UPDATES - value: {{ .Values.owncloud.upgradeAutomaticAppUpdates | quote }} -- name: OWNCLOUD_USER_SEARCH_MIN_LENGTH - value: {{ .Values.owncloud.userSearchMinLength | quote }} -- name: OWNCLOUD_VERSIONS_RETENTION_OBLIGATION - value: {{ .Values.owncloud.versionsRetentionObligation | quote }} -- name: OWNCLOUD_VERSION_HIDE - value: {{ .Values.owncloud.versionHide | quote }} -- name: OWNCLOUD_VOLUME_APPS - value: {{ .Values.owncloud.volumeApps | quote }} -- name: OWNCLOUD_VOLUME_CONFIG - value: {{ .Values.owncloud.volumeConfig | quote }} -- name: OWNCLOUD_VOLUME_FILES - value: {{ .Values.owncloud.volumeFiles | quote }} -- name: OWNCLOUD_VOLUME_ROOT - value: {{ .Values.owncloud.volumeRoot | quote }} -- name: OWNCLOUD_VOLUME_SESSIONS - value: {{ .Values.owncloud.volumeSessions | quote }} -{{- end -}} diff --git a/charts/owncloud/templates/cronjob.yaml b/charts/owncloud/templates/cronjob.yaml index 59a4a3e..c08271a 100644 --- a/charts/owncloud/templates/cronjob.yaml +++ b/charts/owncloud/templates/cronjob.yaml @@ -1,7 +1,7 @@ apiVersion: batch/v1 kind: CronJob metadata: - name: {{ include "owncloud.fullname" . }} + name: {{ include "owncloud.fullname" . }}-cronjob labels: {{- include "owncloud.labels" . | nindent 4 }} annotations: @@ -26,13 +26,14 @@ spec: spec: restartPolicy: Never containers: - - name: {{ .Chart.Name }} + - name: {{ .Chart.Name }}-cronjob securityContext: {{- toYaml .Values.securityContext | nindent 14 }} image: {{ template "owncloud.image" . }} imagePullPolicy: {{ .Values.image.pullPolicy }} - env: - {{- include "owncloud.environment" . | nindent 14 }} + envFrom: + - configMapRef: + name: owncloud-env-config command: ['/usr/bin/entrypoint', "/usr/bin/owncloud", "/usr/bin/cronjob"] resources: {{- toYaml .Values.resources | nindent 14 }} diff --git a/charts/owncloud/templates/deployment.yaml b/charts/owncloud/templates/deployment.yaml index e3283f9..8f48e24 100644 --- a/charts/owncloud/templates/deployment.yaml +++ b/charts/owncloud/templates/deployment.yaml @@ -19,6 +19,7 @@ spec: metadata: annotations: checksum/config: {{ print .Values.owncloud.configExtra | sha256sum }} + checksum/env-config: {{ include (print .Template.BasePath "/envconfigmap.yaml") . | sha256sum }} {{- with .Values.podAnnotations }} {{- toYaml . | nindent 8 }} {{- end }} @@ -58,8 +59,9 @@ spec: {{- toYaml .Values.securityContext | nindent 12 }} image: {{ template "owncloud.image" . }} imagePullPolicy: {{ .Values.image.pullPolicy }} - env: - {{- include "owncloud.environment" . | nindent 12 }} + envFrom: + - configMapRef: + name: owncloud-env-config ports: - name: http containerPort: 8080 diff --git a/charts/owncloud/templates/envconfigmap.yaml b/charts/owncloud/templates/envconfigmap.yaml new file mode 100644 index 0000000..b3ac446 --- /dev/null +++ b/charts/owncloud/templates/envconfigmap.yaml @@ -0,0 +1,187 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: owncloud-env-config + labels: + {{- include "owncloud.labels" . | nindent 4 }} +data: + OWNCLOUD_ACCESSLOG_LOCATION: {{ .Values.owncloud.accesslogLocation | quote }} + OWNCLOUD_ACCOUNTS_ENABLE_MEDIAL_SEARCH: {{ .Values.owncloud.accountsEnableMedialSearch | quote }} + OWNCLOUD_ADMIN_PASSWORD: {{ .Values.owncloud.adminPassword | quote }} + OWNCLOUD_ADMIN_USERNAME: {{ .Values.owncloud.adminUsername | quote }} + OWNCLOUD_ALLOW_USER_TO_CHANGE_DISPLAY_NAME: {{ .Values.owncloud.allowUserToChangeDisplayName | quote }} + OWNCLOUD_APPS_DEPRECATED: {{ .Values.owncloud.apps.deprecated | quote }} + OWNCLOUD_APPS_DISABLE: {{ .Values.owncloud.apps.disable | quote }} + OWNCLOUD_APPS_ENABLE: {{ .Values.owncloud.apps.enable | quote }} + OWNCLOUD_APPS_INSTALL: {{ .Values.owncloud.apps.install | quote }} + OWNCLOUD_APPS_INSTALL_MAJOR: {{ .Values.owncloud.apps.installMajor | quote }} + OWNCLOUD_APPS_UNINSTALL: {{ .Values.owncloud.apps.uninstall | quote }} + OWNCLOUD_BACKGROUND_MODE: {{ .Values.owncloud.backgroundMode | quote }} + OWNCLOUD_BLACKLISTED_FILES: {{ .Values.owncloud.blacklistedFiles | quote }} + OWNCLOUD_CACHE_CHUNK_GC_TTL: {{ .Values.owncloud.cacheChunkGcTtl | quote }} + OWNCLOUD_CACHE_PATH: {{ .Values.owncloud.cachePath | quote }} + OWNCLOUD_CHECK_FOR_WORKING_WELLKNOWN_SETUP: {{ .Values.owncloud.checkForWorkingWellknownSetup | quote }} + OWNCLOUD_CIPHER: {{ .Values.owncloud.cipher | quote }} + OWNCLOUD_COMMENTS_MANAGER_FACTORY: {{ .Values.owncloud.commentsManagerFactory | quote }} + OWNCLOUD_CORS_ALLOWED_DOMAINS: {{ .Values.owncloud.corsAllowedDomains | quote }} + OWNCLOUD_CROND_ENABLED: "false" # Disable ownCloud container's cronJob in Kubernetes in favor of Kubernetes' own CronJob + OWNCLOUD_CSRF_DISABLED: {{ .Values.owncloud.csrfDisabled | quote }} + OWNCLOUD_DAV_CHUNK_BASE_DIR: {{ .Values.owncloud.davChunkBaseDir | quote }} + OWNCLOUD_DAV_ENABLE_ASYNC: {{ .Values.owncloud.davEnableAsync | quote }} + OWNCLOUD_DB_FAIL: {{ .Values.owncloud.db.fail | quote }} + OWNCLOUD_DB_HOST: {{ .Values.owncloud.db.host | quote }} + OWNCLOUD_DB_NAME: {{ .Values.owncloud.db.name | quote }} + OWNCLOUD_DB_PASSWORD: {{ .Values.owncloud.db.password | quote }} + OWNCLOUD_DB_PREFIX: {{ .Values.owncloud.db.prefix | quote }} + OWNCLOUD_DB_TIMEOUT: {{ .Values.owncloud.db.timeout | quote }} + OWNCLOUD_DB_TYPE: {{ .Values.owncloud.db.type | quote }} + OWNCLOUD_DB_USERNAME: {{ .Values.owncloud.db.username | quote }} + OWNCLOUD_DEBUG: {{ .Values.owncloud.debug | quote }} + OWNCLOUD_DEFAULT_APP: {{ .Values.owncloud.defaultApp | quote }} + OWNCLOUD_DEFAULT_LANGUAGE: {{ .Values.owncloud.defaultLanguage | quote }} + OWNCLOUD_DOMAIN: {{ .Values.owncloud.domain | quote }} + OWNCLOUD_TRUSTED_DOMAINS: {{ include "owncloud.trustedDomains" . }} + OWNCLOUD_ENABLED_PREVIEW_PROVIDERS: {{ .Values.owncloud.enabledPreviewProviders | quote }} + OWNCLOUD_ENABLE_AVATARS: {{ .Values.owncloud.enableAvatars | quote }} + OWNCLOUD_ENABLE_CERTIFICATE_MANAGEMENT: {{ .Values.owncloud.enableCertificateManagement | quote }} + OWNCLOUD_ENABLE_PREVIEWS: {{ .Values.owncloud.enablePreviews | quote }} + OWNCLOUD_ENABLE_OIDC_REWRITE_URL: {{ .Values.owncloud.enableOidcRewriteUrl | quote }} + OWNCLOUD_ENTRYPOINT_INITIALIZED: {{ .Values.owncloud.entrypointInitialized | quote }} + OWNCLOUD_ERRORLOG_LOCATION: {{ .Values.owncloud.errorlogLocation | quote }} + OWNCLOUD_EXCLUDED_DIRECTORIES: {{ .Values.owncloud.excludedDirectories | quote }} + OWNCLOUD_FILELOCKING_ENABLED: {{ .Values.owncloud.filelockingEnabled | quote }} + OWNCLOUD_FILELOCKING_TTL: {{ .Values.owncloud.filelockingTtl | quote }} + OWNCLOUD_FILESYSTEM_CACHE_READONLY: {{ .Values.owncloud.filesystemCacheReadonly | quote }} + OWNCLOUD_FILESYSTEM_CHECK_CHANGES: {{ .Values.owncloud.filesystemCheckChanges | quote }} + OWNCLOUD_FILES_EXTERNAL_ALLOW_NEW_LOCAL: {{ .Values.owncloud.filesExternalAllowNewLocal | quote }} + OWNCLOUD_FORWARDED_FOR_HEADERS: {{ .Values.owncloud.forwardedForHeaders | quote }} + OWNCLOUD_HASHING_COST: {{ .Values.owncloud.hashingCost | quote }} + OWNCLOUD_HAS_INTERNET_CONNECTION: {{ .Values.owncloud.hasInternetConnection | quote }} + OWNCLOUD_HTACCESS_REWRITE_BASE: {{ .Values.owncloud.htaccessRewriteBase | quote }} + OWNCLOUD_HTTP_COOKIE_SAMESITE: {{ .Values.owncloud.httpCookieSamesite | quote }} + OWNCLOUD_INTEGRITY_EXCLUDED_FILES: {{ .Values.owncloud.integrityExcludedFiles | quote }} + OWNCLOUD_INTEGRITY_IGNORE_MISSING_APP_SIGNATURE: {{ .Values.owncloud.integrityIgnoreMissingAppSignature | quote }} + OWNCLOUD_KNOWLEDGEBASE_ENABLED: {{ .Values.owncloud.knowledgebaseEnabled | quote }} + OWNCLOUD_APPSTORE_ENABLED: {{ .Values.owncloud.appstoreEnabled | quote }} + OWNCLOUD_LICENSE_KEY: {{ .Values.owncloud.licenseKey | quote }} + OWNCLOUD_LICENSE_CLASS: {{ .Values.owncloud.licenseClass | quote }} + OWNCLOUD_LOGIN_ALTERNATIVES: {{ .Values.owncloud.loginAlternatives | quote }} + OWNCLOUD_LOG_DATE_FORMAT: {{ .Values.owncloud.log.dateFormat | quote }} + OWNCLOUD_LOG_FILE: {{ .Values.owncloud.log.file | quote }} + OWNCLOUD_LOG_LEVEL: {{ .Values.owncloud.log.level | quote }} + OWNCLOUD_LOG_ROTATE_SIZE: {{ .Values.owncloud.log.rotateSize | quote }} + OWNCLOUD_LOG_TIMEZONE: {{ .Values.owncloud.log.timezone | quote }} + OWNCLOUD_LOST_PASSWORD_LINK: {{ .Values.owncloud.lostPasswordLink | quote }} + OWNCLOUD_MAIL_DOMAIN: {{ .Values.owncloud.mail.domain | quote }} + OWNCLOUD_MAIL_FROM_ADDRESS: {{ .Values.owncloud.mail.fromAddress | quote }} + OWNCLOUD_MAIL_SMTP_AUTH: {{ .Values.owncloud.mail.smtp.auth | quote }} + OWNCLOUD_MAIL_SMTP_AUTH_TYPE: {{ .Values.owncloud.mail.smtp.authType | quote }} + OWNCLOUD_MAIL_SMTP_DEBUG: {{ .Values.owncloud.mail.smtp.debug | quote }} + OWNCLOUD_MAIL_SMTP_HOST: {{ .Values.owncloud.mail.smtp.host | quote }} + OWNCLOUD_MAIL_SMTP_MODE: {{ .Values.owncloud.mail.smtp.mode | quote }} + OWNCLOUD_MAIL_SMTP_NAME: {{ .Values.owncloud.mail.smtp.name | quote }} + OWNCLOUD_MAIL_SMTP_PASSWORD: {{ .Values.owncloud.mail.smtp.password | quote }} + OWNCLOUD_MAIL_SMTP_PORT: {{ .Values.owncloud.mail.smtp.port | quote }} + OWNCLOUD_MAIL_SMTP_SECURE: {{ .Values.owncloud.mail.smtp.secure | quote }} + OWNCLOUD_MAIL_SMTP_TIMEOUT: {{ .Values.owncloud.mail.smtp.timeout | quote }} + OWNCLOUD_MAINTENANCE: {{ .Values.owncloud.maintenance | quote }} + OWNCLOUD_MARKETPLACE_CA: {{ .Values.owncloud.marketplace.ca | quote }} + OWNCLOUD_MARKETPLACE_KEY: {{ .Values.owncloud.marketplace.key | quote }} + OWNCLOUD_MAX_EXECUTION_TIME: {{ .Values.owncloud.maxExecutionTime | quote }} + OWNCLOUD_MAX_FILESIZE_ANIMATED_GIFS_PUBLIC_SHARING: {{ .Values.owncloud.maxFilesizeAnimatedGifsPublicSharing | quote }} + OWNCLOUD_MAX_INPUT_TIME: {{ .Values.owncloud.maxInputTime | quote }} + OWNCLOUD_MAX_UPLOAD: {{ .Values.owncloud.maxUpload | quote }} + OWNCLOUD_MEMCACHED_ENABLED: {{ .Values.owncloud.memcachedEnabled | quote }} + OWNCLOUD_MEMCACHED_HOST: {{ .Values.owncloud.memcachedHost | quote }} + OWNCLOUD_MEMCACHED_OPTIONS: {{ .Values.owncloud.memcachedOptions | quote }} + OWNCLOUD_MEMCACHED_PORT: {{ .Values.owncloud.memcachedPort | quote }} + OWNCLOUD_MEMCACHED_STARTUP_TIMEOUT: {{ .Values.owncloud.memcachedStartupTimeout | quote }} + OWNCLOUD_MEMCACHE_LOCAL: {{ .Values.owncloud.memcacheLocal | quote }} + OWNCLOUD_MEMCACHE_LOCKING: {{ .Values.owncloud.memcacheLocking | quote }} + OWNCLOUD_MINIMUM_SUPPORTED_DESKTOP_VERSION: {{ .Values.owncloud.minimumSupportedDesktopVersion | quote }} + OWNCLOUD_MOUNT_FILE: {{ .Values.owncloud.mountFile | quote }} + OWNCLOUD_MYSQL_UTF8MB4: {{ .Values.owncloud.mysqlUtf8Mb4 | quote }} + {{- if .Values.owncloud.objectstore.enabled }} + OWNCLOUD_OBJECTSTORE_BUCKET: {{ .Values.owncloud.objectstore.bucket | quote }} + OWNCLOUD_OBJECTSTORE_CLASS: {{ .Values.owncloud.objectstore.class | quote }} + OWNCLOUD_OBJECTSTORE_ENABLED: {{ .Values.owncloud.objectstore.enabled | quote }} + OWNCLOUD_OBJECTSTORE_ENDPOINT: {{ .Values.owncloud.objectstore.endpoint | quote }} + OWNCLOUD_OBJECTSTORE_KEY: {{ .Values.owncloud.objectstore.key | quote }} + OWNCLOUD_OBJECTSTORE_PATHSTYLE: {{ .Values.owncloud.objectstore.pathstyle | quote }} + OWNCLOUD_OBJECTSTORE_REGION: {{ .Values.owncloud.objectstore.region | quote }} + OWNCLOUD_OBJECTSTORE_SECRET: {{ .Values.owncloud.objectstore.secret | quote }} + OWNCLOUD_OBJECTSTORE_VERSION: {{ .Values.owncloud.objectstore.version | quote }} + {{- end }} + OWNCLOUD_OPERATION_MODE: {{ .Values.owncloud.operationMode | quote }} + OWNCLOUD_OVERWRITE_CLI_URL: {{ .Values.owncloud.overwriteCliUrl | quote }} + OWNCLOUD_OVERWRITE_COND_ADDR: {{ .Values.owncloud.overwriteCondAddr | quote }} + OWNCLOUD_OVERWRITE_HOST: {{ .Values.owncloud.overwriteHost | quote }} + OWNCLOUD_OVERWRITE_PROTOCOL: {{ .Values.owncloud.overwriteProtocol | quote }} + OWNCLOUD_OVERWRITE_WEBROOT: {{ .Values.owncloud.overwriteWebroot | quote }} + OWNCLOUD_PART_FILE_IN_STORAGE: {{ .Values.owncloud.partFileInStorage | quote }} + OWNCLOUD_POST_CRONJOB_PATH: {{ .Values.owncloud.postCronjobPath | quote }} + OWNCLOUD_POST_INSTALL_PATH: {{ .Values.owncloud.postInstallPath | quote }} + OWNCLOUD_POST_SERVER_PATH: {{ .Values.owncloud.postServerPath | quote }} + OWNCLOUD_PREVIEW_LIBREOFFICE_PATH: {{ .Values.owncloud.preview.libreofficePath | quote }} + OWNCLOUD_PREVIEW_MAX_FILESIZE_IMAGE: {{ .Values.owncloud.preview.maxFilesizeImage | quote }} + OWNCLOUD_PREVIEW_MAX_SCALE_FACTOR: {{ .Values.owncloud.preview.maxScaleFactor | quote }} + OWNCLOUD_PREVIEW_MAX_X: {{ .Values.owncloud.preview.maxX | quote }} + OWNCLOUD_PREVIEW_MAX_Y: {{ .Values.owncloud.preview.maxY | quote }} + OWNCLOUD_PREVIEW_OFFICE_CL_PARAMETERS: {{ .Values.owncloud.preview.officeClParameters | quote }} + OWNCLOUD_PRE_CRONJOB_PATH: {{ .Values.owncloud.preCronjobPath | quote }} + OWNCLOUD_PRE_INSTALL_PATH: {{ .Values.owncloud.preInstallPath | quote }} + OWNCLOUD_PRE_SERVER_PATH: {{ .Values.owncloud.preServerPath | quote }} + OWNCLOUD_PROTOCOL: {{ .Values.owncloud.protocol | quote }} + OWNCLOUD_PROXY: {{ .Values.owncloud.proxy | quote }} + OWNCLOUD_PROXY_USERPWD: {{ .Values.owncloud.proxyUserpwd | quote }} + OWNCLOUD_QUOTA_INCLUDE_EXTERNAL_STORAGE: {{ .Values.owncloud.quotaIncludeExternalStorage | quote }} + {{- if .Values.owncloud.redis.enabled }} + OWNCLOUD_REDIS_DB: {{ .Values.owncloud.redis.db | quote }} + OWNCLOUD_REDIS_ENABLED: "true" + OWNCLOUD_REDIS_FAILOVER_MODE: {{ .Values.owncloud.redis.failoverMode | quote }} + OWNCLOUD_REDIS_HOST: {{ .Values.owncloud.redis.host | quote }} + OWNCLOUD_REDIS_PASSWORD: {{ .Values.owncloud.redis.password | quote }} + {{- end }} + OWNCLOUD_REDIS_PORT: {{ .Values.owncloud.redis.port | quote }} + OWNCLOUD_REDIS_READ_TIMEOUT: {{ .Values.owncloud.redis.readTimeout | quote }} + OWNCLOUD_REDIS_SEEDS: {{ .Values.owncloud.redis.seeds | quote }} + OWNCLOUD_REDIS_SESSION_LOCKING_ENABLED: {{ .Values.owncloud.redis.sessionLockingEnabled | quote }} + OWNCLOUD_REDIS_SESSION_LOCK_RETRIES: {{ .Values.owncloud.redis.sessionLockRetries | quote }} + OWNCLOUD_REDIS_SESSION_LOCK_WAIT_TIME: {{ .Values.owncloud.redis.sessionLockWaitTime | quote }} + OWNCLOUD_REDIS_STARTUP_TIMEOUT: {{ .Values.owncloud.redis.startupTimeout | quote }} + OWNCLOUD_REDIS_TIMEOUT: {{ .Values.owncloud.redis.timeout | quote }} + OWNCLOUD_REMEMBER_LOGIN_COOKIE_LIFETIME: {{ .Values.owncloud.rememberLoginCookieLifetime | quote }} + OWNCLOUD_SECRET: {{ .Values.owncloud.secret | quote }} + OWNCLOUD_SESSION_KEEPALIVE: {{ .Values.owncloud.session.keepalive | quote }} + OWNCLOUD_SESSION_LIFETIME: {{ .Values.owncloud.session.lifetime | quote }} + OWNCLOUD_SESSION_FORCED_LOGOUT_TIMEOUT: {{ .Values.owncloud.session.forcedLogoutTimeout | quote }} + OWNCLOUD_SESSION_SAVE_HANDLER: {{ .Values.owncloud.session.saveHandler | quote }} + OWNCLOUD_SESSION_SAVE_PATH: {{ .Values.owncloud.session.savePath | quote }} + OWNCLOUD_SHARE_FOLDER: {{ .Values.owncloud.shareFolder | quote }} + OWNCLOUD_SHARING_FEDERATION_ALLOW_HTTP_FALLBACK: {{ .Values.owncloud.sharingFederationAllowHttpFallback | quote }} + OWNCLOUD_SHARING_MANAGER_FACTORY: {{ .Values.owncloud.sharingManagerFactory | quote }} + OWNCLOUD_SHOW_SERVER_HOSTNAME: {{ .Values.owncloud.showServerHostname | quote }} + OWNCLOUD_SINGLEUSER: {{ .Values.owncloud.singleuser | quote }} + OWNCLOUD_SKELETON_DIRECTORY: {{ .Values.owncloud.skeletonDirectory | quote }} + OWNCLOUD_SKIP_CHMOD: {{ .Values.owncloud.skipChmod | quote }} + OWNCLOUD_SKIP_CHOWN: "true" + OWNCLOUD_SMB_LOGGING_ENABLE: {{ .Values.owncloud.smbLoggingEnable | quote }} + OWNCLOUD_SQLITE_JOURNAL_MODE: {{ .Values.owncloud.sqliteJournalMode | quote }} + OWNCLOUD_SUB_URL: {{ .Values.owncloud.subUrl | quote }} + OWNCLOUD_SYSTEMTAGS_MANAGER_FACTORY: {{ .Values.owncloud.systemtagsManagerFactory | quote }} + OWNCLOUD_TEMP_DIRECTORY: {{ .Values.owncloud.tempDirectory | quote }} + OWNCLOUD_TOKEN_AUTH_ENFORCED: {{ .Values.owncloud.tokenAuthEnforced | quote }} + OWNCLOUD_TRASHBIN_PURGE_LIMIT: {{ .Values.owncloud.trashbin.purgeLimit | quote }} + OWNCLOUD_TRASHBIN_RETENTION_OBLIGATION: {{ .Values.owncloud.trashbin.retentionObligation | quote }} + OWNCLOUD_TRUSTED_PROXIES: {{ .Values.owncloud.trustedProxies | quote }} + OWNCLOUD_UPDATER_SERVER_URL: {{ .Values.owncloud.updaterServerUrl | quote }} + OWNCLOUD_UPDATE_CHECKER: {{ .Values.owncloud.updateChecker | quote }} + OWNCLOUD_UPGRADE_AUTOMATIC_APP_UPDATES: {{ .Values.owncloud.upgradeAutomaticAppUpdates | quote }} + OWNCLOUD_USER_SEARCH_MIN_LENGTH: {{ .Values.owncloud.userSearchMinLength | quote }} + OWNCLOUD_VERSIONS_RETENTION_OBLIGATION: {{ .Values.owncloud.versionsRetentionObligation | quote }} + OWNCLOUD_VERSION_HIDE: {{ .Values.owncloud.versionHide | quote }} + OWNCLOUD_VOLUME_APPS: {{ .Values.owncloud.volumeApps | quote }} + OWNCLOUD_VOLUME_CONFIG: {{ .Values.owncloud.volumeConfig | quote }} + OWNCLOUD_VOLUME_FILES: {{ .Values.owncloud.volumeFiles | quote }} + OWNCLOUD_VOLUME_ROOT: {{ .Values.owncloud.volumeRoot | quote }} + OWNCLOUD_VOLUME_SESSIONS: {{ .Values.owncloud.volumeSessions | quote }} From 3759f8e3ea4b9c762f19eef22d96633371350e23 Mon Sep 17 00:00:00 2001 From: Dennis Sieben Date: Wed, 21 Jun 2023 10:04:52 +0200 Subject: [PATCH 6/7] - aligned quotes --- charts/owncloud/templates/cronjob.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/owncloud/templates/cronjob.yaml b/charts/owncloud/templates/cronjob.yaml index c08271a..9206382 100644 --- a/charts/owncloud/templates/cronjob.yaml +++ b/charts/owncloud/templates/cronjob.yaml @@ -34,7 +34,7 @@ spec: envFrom: - configMapRef: name: owncloud-env-config - command: ['/usr/bin/entrypoint', "/usr/bin/owncloud", "/usr/bin/cronjob"] + command: ["/usr/bin/entrypoint", "/usr/bin/owncloud", "/usr/bin/cronjob"] resources: {{- toYaml .Values.resources | nindent 14 }} volumeMounts: From c85c92d74dbbfb05adb804fdd272aaa76c8aada2 Mon Sep 17 00:00:00 2001 From: Dennis Sieben Date: Wed, 21 Jun 2023 10:17:54 +0200 Subject: [PATCH 7/7] - added possibility to disable the CronJob via owncloud.crondEnabled --- charts/owncloud/templates/cronjob.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/charts/owncloud/templates/cronjob.yaml b/charts/owncloud/templates/cronjob.yaml index 9206382..29a529b 100644 --- a/charts/owncloud/templates/cronjob.yaml +++ b/charts/owncloud/templates/cronjob.yaml @@ -1,3 +1,4 @@ +{{- if .Values.owncloud.crondEnabled -}} apiVersion: batch/v1 kind: CronJob metadata: @@ -52,3 +53,4 @@ spec: - name: config-volume secret: secretName: owncloud-config +{{- end -}}