瀏覽代碼

Publish new changes in catalog

sonicaj 1 年之前
父節點
當前提交
0940f60c9b

+ 0 - 6
community/wordpress/1.0.7/Chart.lock

@@ -1,6 +0,0 @@
-dependencies:
-- name: common
-  repository: file://../../../common
-  version: 1.1.0
-digest: sha256:752ce76025f5b61094bd2b18ca11693eb9d26d0dde4eb2e63cd2330cbffe9e73
-generated: "2023-08-28T16:58:06.402626788+03:00"

二進制
community/wordpress/1.0.7/charts/common-1.1.0.tgz


+ 0 - 50
community/wordpress/1.0.7/templates/_mariadb.tpl

@@ -1,50 +0,0 @@
-{{- define "wordpress.mariadb.workload" -}}
-workload:
-{{- include "ix.v1.common.app.mariadb" (dict "secretName" "mariadb-creds"
-                                              "resources" .Values.resources
-                                              "ixChartContext" .Values.ixChartContext) | nindent 2 }}
-{{/* Service */}}
-service:
-  mariadb:
-    enabled: true
-    type: ClusterIP
-    targetSelector: mariadb
-    ports:
-      mariadb:
-        enabled: true
-        primary: true
-        port: 3306
-        targetPort: 3306
-        targetSelector: mariadb
-
-{{/* Persistence */}}
-persistence:
-  mariadbdata:
-    enabled: true
-    type: {{ .Values.wpStorage.mariadbData.type }}
-    datasetName: {{ .Values.wpStorage.mariadbData.datasetName | default "" }}
-    hostPath: {{ .Values.wpStorage.mariadbData.hostPath | default "" }}
-    targetSelector:
-      # MariaDB pod
-      mariadb:
-        # MariaDB container
-        mariadb:
-          mountPath: /var/lib/mysql
-        # MariaDB - Permissions container
-        permissions:
-          mountPath: /mnt/directories/mariadb_data
-  mariadbbackup:
-    enabled: true
-    type: {{ .Values.wpStorage.mariadbBackup.type }}
-    datasetName: {{ .Values.wpStorage.mariadbBackup.datasetName | default "" }}
-    hostPath: {{ .Values.wpStorage.mariadbBackup.hostPath | default "" }}
-    targetSelector:
-      # MariaDB backup pod
-      mariadbbackup:
-        # MariaDB backup container
-        mariadbbackup:
-          mountPath: /mariadb_backup
-        # MariaDB - Permissions container
-        permissions:
-          mountPath: /mnt/directories/mariadb_backup
-{{- end -}}

+ 6 - 0
community/wordpress/1.0.8/Chart.lock

@@ -0,0 +1,6 @@
+dependencies:
+- name: common
+  repository: file://../../../common
+  version: 1.1.1
+digest: sha256:a7dbe3e4d42dbcd4325776e5e01a1d630c7f185f79e7ebf22b1b9cc80f56eed7
+generated: "2023-09-13T17:06:07.150719489+03:00"

+ 2 - 2
community/wordpress/1.0.7/Chart.yaml → community/wordpress/1.0.8/Chart.yaml

@@ -3,7 +3,7 @@ description: Wordpress is a web content management system
 annotations:
   title: Wordpress
 type: application
-version: 1.0.7
+version: 1.0.8
 apiVersion: v2
 appVersion: 6.3.1
 kubeVersion: '>=1.16.0-0'
@@ -14,7 +14,7 @@ maintainers:
 dependencies:
   - name: common
     repository: file://../../../common
-    version: 1.1.0
+    version: 1.1.1
 home: https://wordpress.org
 icon: https://github.com/WordPress/WordPress/blob/master/wp-admin/images/wordpress-logo.png?raw=true
 sources:

+ 0 - 0
community/wordpress/1.0.7/README.md → community/wordpress/1.0.8/README.md


+ 0 - 0
community/wordpress/1.0.7/app-readme.md → community/wordpress/1.0.8/app-readme.md


二進制
community/wordpress/1.0.8/charts/common-1.1.1.tgz


+ 0 - 0
community/wordpress/1.0.7/ci/basic-values.yaml → community/wordpress/1.0.8/ci/basic-values.yaml


+ 14 - 0
community/wordpress/1.0.8/ci/cron-values.yaml

@@ -0,0 +1,14 @@
+wpConfig:
+  enableCronJob: true
+  cronSchedule: "*/1 * * * *"
+
+wpStorage:
+  data:
+    type: hostPath
+    hostPath: /mnt/{{ .Release.Name }}/data
+  mariadbData:
+    type: hostPath
+    hostPath: /mnt/{{ .Release.Name }}/mariadbData
+  mariadbBackup:
+    type: hostPath
+    hostPath: /mnt/{{ .Release.Name }}/mariadbBackup

+ 2 - 0
community/wordpress/1.0.7/ix_values.yaml → community/wordpress/1.0.8/ix_values.yaml

@@ -9,6 +9,8 @@ resources:
     memory: 8Gi
 
 wpConfig:
+  enableCronJob: true
+  cronSchedule: "*/15 * * * *"
   additionalEnvs: []
 
 wpNetwork:

+ 0 - 0
community/wordpress/1.0.7/metadata.yaml → community/wordpress/1.0.8/metadata.yaml


+ 16 - 0
community/wordpress/1.0.7/questions.yaml → community/wordpress/1.0.8/questions.yaml

@@ -33,6 +33,22 @@ questions:
     schema:
       type: dict
       attrs:
+        - variable: enableCronJob
+          label: Enable CronJob
+          description: |
+            Enable CronJob for Wordpress executed by Kubernetes scheduler.</br>
+            This will also disable running cron on page load.
+          schema:
+            type: boolean
+            default: false
+        - variable: cronSchedule
+          label: Cron Schedule
+          description: Cron schedule for Wordpress CronJob.
+          schema:
+            type: string
+            default: "*/15 * * * *"
+            show_if: [["enableCronJob", "=", true]]
+            required: true
         - variable: additionalEnvs
           label: Additional Environment Variables
           description: Configure additional environment variables for Wordpress.

+ 0 - 0
community/wordpress/1.0.7/templates/NOTES.txt → community/wordpress/1.0.8/templates/NOTES.txt


+ 5 - 0
community/wordpress/1.0.7/templates/_configuration.tpl → community/wordpress/1.0.8/templates/_configuration.tpl

@@ -30,4 +30,9 @@ secret:
       WORDPRESS_DB_NAME: {{ $dbName }}
       WORDPRESS_DB_USER: {{ $dbUser }}
       WORDPRESS_DB_PASSWORD: {{ $dbPass }}
+      {{/* Disable On Page Load Cron when k8s CronJob is enabled */}}
+      {{- if .Values.wpConfig.enableCronJob }}
+      WORDPRESS_CONFIG_EXTRA: |
+          define( 'DISABLE_WP_CRON', true );
+      {{- end -}}
 {{- end -}}

+ 39 - 0
community/wordpress/1.0.8/templates/_cron.tpl

@@ -0,0 +1,39 @@
+{{- define "wordpress.cron" -}}
+workload:
+  wordpress-cron:
+    enabled: true
+    type: CronJob
+    schedule: {{ .Values.wpConfig.cronSchedule | quote }}
+    podSpec:
+      hostNetwork: false
+      restartPolicy: Never
+      containers:
+        wordpress-cron:
+          enabled: true
+          primary: true
+          imageSelector: image
+          securityContext:
+            runAsUser: 33
+            runAsGroup: 33
+          command:
+            - /usr/local/bin/php
+          args:
+            - /var/www/html/wp-cron.php
+          envFrom:
+            - secretRef:
+                name: wordpress-creds
+          {{ with .Values.wpConfig.additionalEnvs }}
+          envList:
+            {{ range $env := . }}
+            - name: {{ $env.name }}
+              value: {{ $env.value }}
+            {{ end }}
+          {{ end }}
+          probes:
+            liveness:
+              enabled: false
+            readiness:
+              enabled: false
+            startup:
+              enabled: false
+{{- end -}}

+ 6 - 0
community/wordpress/1.0.8/templates/_mariadb.tpl

@@ -0,0 +1,6 @@
+{{- define "wordpress.mariadb.workload" -}}
+workload:
+{{- include "ix.v1.common.app.mariadb" (dict "secretName" "mariadb-creds"
+                                              "resources" .Values.resources
+                                              "ixChartContext" .Values.ixChartContext) | nindent 2 }}
+{{- end -}}

+ 72 - 0
community/wordpress/1.0.8/templates/_persistence.tpl

@@ -0,0 +1,72 @@
+{{- define "wordpress.persistence" -}}
+persistence:
+  data:
+    enabled: true
+    type: {{ .Values.wpStorage.data.type }}
+    datasetName: {{ .Values.wpStorage.data.datasetName | default "" }}
+    hostPath: {{ .Values.wpStorage.data.hostPath | default "" }}
+    targetSelector:
+      wordpress:
+        wordpress:
+          mountPath: /var/www/html
+        01-permissions:
+          mountPath: /mnt/directories/data
+      wordpress-cron:
+        wordpress-cron:
+          mountPath: /var/www/html
+  {{- range $idx, $storage := .Values.wpStorage.additionalStorages }}
+  {{ printf "wp-%v" (int $idx) }}:
+    enabled: true
+    type: {{ $storage.type }}
+    datasetName: {{ $storage.datasetName | default "" }}
+    hostPath: {{ $storage.hostPath | default "" }}
+    targetSelector:
+      wordpress:
+        wordpress:
+          mountPath: {{ $storage.mountPath }}
+        01-permissions:
+          mountPath: /mnt/directories{{ $storage.mountPath }}
+  {{- end }}
+  tmp:
+    enabled: true
+    type: emptyDir
+    targetSelector:
+      wordpress:
+        wordpress:
+          mountPath: /tmp
+  varrun:
+    enabled: true
+    type: emptyDir
+    targetSelector:
+      wordpress:
+        wordpress:
+          mountPath: /var/run
+  mariadbdata:
+    enabled: true
+    type: {{ .Values.wpStorage.mariadbData.type }}
+    datasetName: {{ .Values.wpStorage.mariadbData.datasetName | default "" }}
+    hostPath: {{ .Values.wpStorage.mariadbData.hostPath | default "" }}
+    targetSelector:
+      # MariaDB pod
+      mariadb:
+        # MariaDB container
+        mariadb:
+          mountPath: /var/lib/mysql
+        # MariaDB - Permissions container
+        permissions:
+          mountPath: /mnt/directories/mariadb_data
+  mariadbbackup:
+    enabled: true
+    type: {{ .Values.wpStorage.mariadbBackup.type }}
+    datasetName: {{ .Values.wpStorage.mariadbBackup.datasetName | default "" }}
+    hostPath: {{ .Values.wpStorage.mariadbBackup.hostPath | default "" }}
+    targetSelector:
+      # MariaDB backup pod
+      mariadbbackup:
+        # MariaDB backup container
+        mariadbbackup:
+          mountPath: /mariadb_backup
+        # MariaDB - Permissions container
+        permissions:
+          mountPath: /mnt/directories/mariadb_backup
+{{- end -}}

+ 0 - 0
community/wordpress/1.0.7/templates/_portal.tpl → community/wordpress/1.0.8/templates/_portal.tpl


+ 27 - 0
community/wordpress/1.0.8/templates/_service.tpl

@@ -0,0 +1,27 @@
+{{- define "wordpress.service" -}}
+service:
+  wordpress:
+    enabled: true
+    primary: true
+    type: NodePort
+    targetSelector: wordpress
+    ports:
+      webui:
+        enabled: true
+        primary: true
+        port: {{ .Values.wpNetwork.webPort }}
+        nodePort: {{ .Values.wpNetwork.webPort }}
+        targetPort: 80
+        targetSelector: wordpress
+  mariadb:
+    enabled: true
+    type: ClusterIP
+    targetSelector: mariadb
+    ports:
+      mariadb:
+        enabled: true
+        primary: true
+        port: 3306
+        targetPort: 3306
+        targetSelector: mariadb
+{{- end -}}

+ 0 - 56
community/wordpress/1.0.7/templates/_wordpress.tpl → community/wordpress/1.0.8/templates/_wordpress.tpl

@@ -47,60 +47,4 @@ workload:
                                                         "type" "install") | nindent 8 }}
       {{- include "ix.v1.common.app.mariadbWait" (dict "name" "mariadb-wait"
                                                        "secretName" "mariadb-creds") | nindent 8 }}
-{{/* Service */}}
-service:
-  wordpress:
-    enabled: true
-    primary: true
-    type: NodePort
-    targetSelector: wordpress
-    ports:
-      webui:
-        enabled: true
-        primary: true
-        port: {{ .Values.wpNetwork.webPort }}
-        nodePort: {{ .Values.wpNetwork.webPort }}
-        targetPort: 80
-        targetSelector: wordpress
-
-{{/* Persistence */}}
-persistence:
-  data:
-    enabled: true
-    type: {{ .Values.wpStorage.data.type }}
-    datasetName: {{ .Values.wpStorage.data.datasetName | default "" }}
-    hostPath: {{ .Values.wpStorage.data.hostPath | default "" }}
-    targetSelector:
-      wordpress:
-        wordpress:
-          mountPath: /var/www/html
-        01-permissions:
-          mountPath: /mnt/directories/data
-  {{- range $idx, $storage := .Values.wpStorage.additionalStorages }}
-  {{ printf "wp-%v" (int $idx) }}:
-    enabled: true
-    type: {{ $storage.type }}
-    datasetName: {{ $storage.datasetName | default "" }}
-    hostPath: {{ $storage.hostPath | default "" }}
-    targetSelector:
-      wordpress:
-        wordpress:
-          mountPath: {{ $storage.mountPath }}
-        01-permissions:
-          mountPath: /mnt/directories{{ $storage.mountPath }}
-  {{- end }}
-  tmp:
-    enabled: true
-    type: emptyDir
-    targetSelector:
-      wordpress:
-        wordpress:
-          mountPath: /tmp
-  varrun:
-    enabled: true
-    type: emptyDir
-    targetSelector:
-      wordpress:
-        wordpress:
-          mountPath: /var/run
 {{- end -}}

+ 5 - 0
community/wordpress/1.0.7/templates/common.yaml → community/wordpress/1.0.8/templates/common.yaml

@@ -2,8 +2,13 @@
 
 {{/* Merge the templates with Values */}}
 {{- $_ := mustMergeOverwrite .Values (include "wordpress.configuration" $ | fromYaml) -}}
+{{- $_ := mustMergeOverwrite .Values (include "wordpress.persistence" $ | fromYaml) -}}
+{{- $_ := mustMergeOverwrite .Values (include "wordpress.service" $ | fromYaml) -}}
 {{- $_ := mustMergeOverwrite .Values (include "wordpress.workload" $ | fromYaml) -}}
 {{- $_ := mustMergeOverwrite .Values (include "wordpress.mariadb.workload" $ | fromYaml) -}}
+{{- if .Values.wpConfig.enableCronJob -}}
+  {{- $_ := mustMergeOverwrite .Values (include "wordpress.cron" $ | fromYaml) -}}
+{{- end -}}
 
 {{/* Create the configmap for portal manually*/}}
 {{- include "wordpress.portal" $ -}}