From babd9c305a3db84fb787e833e5d5f8d80d5c2db7 Mon Sep 17 00:00:00 2001 From: Dustin Falgout Date: Tue, 1 Mar 2022 15:59:12 -0600 Subject: [PATCH] feat(cloud): add php opcache settings to cloud-server environment. --- charts/cloud-server/Chart.yaml | 2 +- .../cloud-server/templates/cloud-server.yml | 14 ++-- charts/cloud-server/templates/secrets.yml | 84 +++++++++---------- 3 files changed, 52 insertions(+), 48 deletions(-) diff --git a/charts/cloud-server/Chart.yaml b/charts/cloud-server/Chart.yaml index 4d5cc61..d0d30e0 100644 --- a/charts/cloud-server/Chart.yaml +++ b/charts/cloud-server/Chart.yaml @@ -5,4 +5,4 @@ maintainers: - email: dustin@elegantthemes.com name: Elegant Themes name: cloud-server -version: 0.9.2 +version: 0.9.3 diff --git a/charts/cloud-server/templates/cloud-server.yml b/charts/cloud-server/templates/cloud-server.yml index 6bfe3a3..dd7b18e 100644 --- a/charts/cloud-server/templates/cloud-server.yml +++ b/charts/cloud-server/templates/cloud-server.yml @@ -63,15 +63,19 @@ spec: fieldRef: fieldPath: spec.nodeName - name: CLOUD_SERVER_PATH - value: '{{ .Values.INSTALL_PATH }}' + value: {{ .Values.INSTALL_PATH | squote }} - name: VIRTUAL_HOST - value: '{{ .Values.VIRTUAL_HOST }}' + value: {{ .Values.VIRTUAL_HOST | squote }} - name: CLOUD_SERVER_REPO_URL - value: '{{ .Values.CLOUD_SERVER_REPO_URL }}' + value: {{ .Values.CLOUD_SERVER_REPO_URL | squote }} - name: IMAGE_VERSION - value: '{{ .Values.CLOUD_SERVER_VERSION }}' + value: {{ .Values.CLOUD_SERVER_VERSION | squote }} + - name: PHP_OPCACHE_FILE_CACHE + value: {{ ternary "/var/cache/php" "" (eq "production" .Values.WP_ENV) | squote }} + - name: PHP_OPCACHE_VALIDATE_TIMESTAMPS + value: {{ ternary "false" "true" (eq "production" .Values.WP_ENV) | squote }} - image: '{{ .Values.CLOUD_SERVER_IMAGE }}' + image: {{ .Values.CLOUD_SERVER_IMAGE | squote }} livenessProbe: exec: command: diff --git a/charts/cloud-server/templates/secrets.yml b/charts/cloud-server/templates/secrets.yml index 4b4355b..20f3341 100644 --- a/charts/cloud-server/templates/secrets.yml +++ b/charts/cloud-server/templates/secrets.yml @@ -9,47 +9,47 @@ stringData: ADMIN_EMAIL: {{ .Values.ADMIN_EMAIL }} GITHUB_TOKEN: {{ .Values.GITHUB_TOKEN }} .env: | - AUTH_KEY='{{ .Values.AUTH_KEY }}' - AUTH_SALT='{{ .Values.AUTH_SALT }}' - CLOUD_SERVER_PATH='{{ .Values.INSTALL_PATH }}' - CLOUD_SERVER_REPO_URL='{{ .Values.CLOUD_SERVER_REPO_URL }}' - COOKIE_SALT='{{ .Values.COOKIE_SALT }}' - DB_HOST_0='{{ .Values.DB_HOST_0 }}' - DB_HOST_1='{{ .Values.DB_HOST_1 }}' - DB_HOST_2='{{ .Values.DB_HOST_2 }}' - DB_NAME='{{ .Values.DB_NAME }}' - DB_PASSWORD='{{ .Values.DB_PASSWORD }}' - DB_PREFIX='{{ .Values.DB_PREFIX }}' - DB_USER='{{ .Values.DB_USER }}' - IMAGE_VERSION='{{ .Values.CLOUD_SERVER_VERSION }}' - LOGGED_IN_KEY='{{ .Values.LOGGED_IN_KEY }}' - LOGGED_IN_SALT='{{ .Values.LOGGED_IN_SALT }}' - NONCE_KEY='{{ .Values.NONCE_KEY }}' - NONCE_SALT='{{ .Values.NONCE_SALT }}' - S3_BUCKET_CLOUD_ITEMS='{{ .Values.S3_BUCKET_CLOUD_ITEMS }}' - S3_BUCKET_CLOUD_ITEMS_BACKUP_1='{{ .Values.S3_BUCKET_CLOUD_ITEMS_BACKUP_1 }}' - S3_BUCKET_CLOUD_ITEMS_BACKUP_2='{{ .Values.S3_BUCKET_CLOUD_ITEMS_BACKUP_2 }}' - S3_ENDPOINT_CLOUD_ITEMS='{{ .Values.S3_ENDPOINT_CLOUD_ITEMS }}' - S3_ENDPOINT_CLOUD_ITEMS_BACKUP_1='{{ .Values.S3_ENDPOINT_CLOUD_ITEMS_BACKUP_1 }}' - S3_ENDPOINT_CLOUD_ITEMS_BACKUP_2='{{ .Values.S3_ENDPOINT_CLOUD_ITEMS_BACKUP_2 }}' - S3_KEY_CLOUD_ITEMS='{{ .Values.S3_KEY_CLOUD_ITEMS }}' - S3_KEY_CLOUD_ITEMS_BACKUP_1='{{ .Values.S3_KEY_CLOUD_ITEMS_BACKUP_1 }}' - S3_KEY_CLOUD_ITEMS_BACKUP_2='{{ .Values.S3_KEY_CLOUD_ITEMS_BACKUP_2 }}' - S3_REGION_CLOUD_ITEMS='{{ .Values.S3_REGION_CLOUD_ITEMS }}' - S3_REGION_CLOUD_ITEMS_BACKUP_1='{{ .Values.S3_REGION_CLOUD_ITEMS_BACKUP_1 }}' - S3_REGION_CLOUD_ITEMS_BACKUP_2='{{ .Values.S3_REGION_CLOUD_ITEMS_BACKUP_2 }}' - S3_SECRET_CLOUD_ITEMS='{{ .Values.S3_SECRET_CLOUD_ITEMS }}' - S3_SECRET_CLOUD_ITEMS_BACKUP_1='{{ .Values.S3_SECRET_CLOUD_ITEMS_BACKUP_1 }}' - S3_SECRET_CLOUD_ITEMS_BACKUP_2='{{ .Values.S3_SECRET_CLOUD_ITEMS_BACKUP_2 }}' - SECURE_AUTH_KEY='{{ .Values.SECURE_AUTH_KEY }}' - SECURE_AUTH_SALT='{{ .Values.SECURE_AUTH_SALT }}' - VIRTUAL_HOST='{{ .Values.VIRTUAL_HOST }}' + AUTH_KEY={{ .Values.AUTH_KEY | squote }} + AUTH_SALT={{ .Values.AUTH_SALT | squote }} + CLOUD_SERVER_PATH={{ .Values.INSTALL_PATH | squote }} + CLOUD_SERVER_REPO_URL={{ .Values.CLOUD_SERVER_REPO_URL | squote }} + COOKIE_SALT={{ .Values.COOKIE_SALT | squote }} + DB_HOST_0={{ .Values.DB_HOST_0 | squote }} + DB_HOST_1={{ .Values.DB_HOST_1 | squote }} + DB_HOST_2={{ .Values.DB_HOST_2 | squote }} + DB_NAME={{ .Values.DB_NAME | squote }} + DB_PASSWORD={{ .Values.DB_PASSWORD | squote }} + DB_PREFIX={{ .Values.DB_PREFIX | squote }} + DB_USER={{ .Values.DB_USER | squote }} + IMAGE_VERSION={{ .Values.CLOUD_SERVER_VERSION | squote }} + LOGGED_IN_KEY={{ .Values.LOGGED_IN_KEY | squote }} + LOGGED_IN_SALT={{ .Values.LOGGED_IN_SALT | squote }} + NONCE_KEY={{ .Values.NONCE_KEY | squote }} + NONCE_SALT={{ .Values.NONCE_SALT | squote }} + S3_BUCKET_CLOUD_ITEMS={{ .Values.S3_BUCKET_CLOUD_ITEMS | squote }} + S3_BUCKET_CLOUD_ITEMS_BACKUP_1={{ .Values.S3_BUCKET_CLOUD_ITEMS_BACKUP_1 | squote }} + S3_BUCKET_CLOUD_ITEMS_BACKUP_2={{ .Values.S3_BUCKET_CLOUD_ITEMS_BACKUP_2 | squote }} + S3_ENDPOINT_CLOUD_ITEMS={{ .Values.S3_ENDPOINT_CLOUD_ITEMS | squote }} + S3_ENDPOINT_CLOUD_ITEMS_BACKUP_1={{ .Values.S3_ENDPOINT_CLOUD_ITEMS_BACKUP_1 | squote }} + S3_ENDPOINT_CLOUD_ITEMS_BACKUP_2={{ .Values.S3_ENDPOINT_CLOUD_ITEMS_BACKUP_2 | squote }} + S3_KEY_CLOUD_ITEMS={{ .Values.S3_KEY_CLOUD_ITEMS | squote }} + S3_KEY_CLOUD_ITEMS_BACKUP_1={{ .Values.S3_KEY_CLOUD_ITEMS_BACKUP_1 | squote }} + S3_KEY_CLOUD_ITEMS_BACKUP_2={{ .Values.S3_KEY_CLOUD_ITEMS_BACKUP_2 | squote }} + S3_REGION_CLOUD_ITEMS={{ .Values.S3_REGION_CLOUD_ITEMS | squote }} + S3_REGION_CLOUD_ITEMS_BACKUP_1={{ .Values.S3_REGION_CLOUD_ITEMS_BACKUP_1 | squote }} + S3_REGION_CLOUD_ITEMS_BACKUP_2={{ .Values.S3_REGION_CLOUD_ITEMS_BACKUP_2 | squote }} + S3_SECRET_CLOUD_ITEMS={{ .Values.S3_SECRET_CLOUD_ITEMS | squote }} + S3_SECRET_CLOUD_ITEMS_BACKUP_1={{ .Values.S3_SECRET_CLOUD_ITEMS_BACKUP_1 | squote }} + S3_SECRET_CLOUD_ITEMS_BACKUP_2={{ .Values.S3_SECRET_CLOUD_ITEMS_BACKUP_2 | squote }} + SECURE_AUTH_KEY={{ .Values.SECURE_AUTH_KEY | squote }} + SECURE_AUTH_SALT={{ .Values.SECURE_AUTH_SALT | squote }} + VIRTUAL_HOST={{ .Values.VIRTUAL_HOST | squote }} WP_DEBUG_LOG=true - WP_ENV='{{ .Values.WP_ENV }}' - WP_HOME='{{ .Values.WP_HOME }}' - WP_SITEURL='{{ .Values.WP_SITEURL }}' - JWT_ET_PUBLIC_KEY='{{ .Values.JWT_ET_PUBLIC_KEY | b64enc }}' - JWT_ET_PUBLIC_KEY_TESTS='{{ .Values.JWT_ET_PUBLIC_KEY_TESTS | b64enc }}' - JWT_PRIVATE_KEY='{{ .Values.JWT_PRIVATE_KEY | b64enc }}' - JWT_PUBLIC_KEY='{{ .Values.JWT_PUBLIC_KEY | b64enc }}' + WP_ENV={{ .Values.WP_ENV | squote }} + WP_HOME={{ .Values.WP_HOME | squote }} + WP_SITEURL={{ .Values.WP_SITEURL | squote }} + JWT_ET_PUBLIC_KEY={{ .Values.JWT_ET_PUBLIC_KEY | b64enc | squote }} + JWT_ET_PUBLIC_KEY_TESTS={{ .Values.JWT_ET_PUBLIC_KEY_TESTS | b64enc | squote }} + JWT_PRIVATE_KEY={{ .Values.JWT_PRIVATE_KEY | b64enc | squote }} + JWT_PUBLIC_KEY={{ .Values.JWT_PUBLIC_KEY | b64enc | squote }}