Merge branch 'dev-newchart'
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,2 +1,4 @@
|
|||||||
example.yaml
|
example.yaml
|
||||||
example*.yaml
|
example*.yaml
|
||||||
|
example*.yml
|
||||||
|
test-*.yaml
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
variables:
|
variables:
|
||||||
HELM_CHART_VERSION: "0.6.13"
|
HELM_CHART_VERSION: "1.0.24"
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- deploy
|
- deploy
|
||||||
@@ -9,9 +9,7 @@ default:
|
|||||||
name: cloudyne/kubectl-helm:latest
|
name: cloudyne/kubectl-helm:latest
|
||||||
entrypoint: [""]
|
entrypoint: [""]
|
||||||
tags:
|
tags:
|
||||||
- build01
|
- shell
|
||||||
- helm
|
|
||||||
- chartbuild
|
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
|
|||||||
@@ -2,5 +2,5 @@ apiVersion: v2
|
|||||||
name: wordyne
|
name: wordyne
|
||||||
description: Helm chart for deploying pre-built website containers to kubernetes clusters
|
description: Helm chart for deploying pre-built website containers to kubernetes clusters
|
||||||
type: application
|
type: application
|
||||||
version: "0.6.13"
|
version: "1.0.24"
|
||||||
appVersion: "6.2.2"
|
appVersion: "6.2.2"
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
{{- if .Values.site.skipWPCRegistration | default false }}
|
{{- if .Values.site.autoRegisterEnabled | default false }}
|
||||||
{{- else }}
|
|
||||||
apiVersion: batch/v1
|
apiVersion: batch/v1
|
||||||
kind: Job
|
kind: Job
|
||||||
metadata:
|
metadata:
|
||||||
@@ -21,4 +20,5 @@ spec:
|
|||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
- name: pull-secret
|
- name: pull-secret
|
||||||
backoffLimit: 4
|
backoffLimit: 4
|
||||||
|
{{- else }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
@@ -3,13 +3,17 @@ Define the application name and fullname
|
|||||||
*/}}
|
*/}}
|
||||||
|
|
||||||
{{- define "..name" -}}
|
{{- define "..name" -}}
|
||||||
{{- .Values.site.domain | trunc 63 | replace "." "-" | trimSuffix "-" }}
|
{{- .Values.site.name | trunc 63 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- define "..fullname" -}}
|
{{- define "..fullname" -}}
|
||||||
{{ include "..name" . }}
|
{{ include "..name" . }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
{{- define "..domains" }}
|
||||||
|
{{- if .Values.site.additionalDomains }}{{ .Values.site.additionalDomains | toYaml }}{{- end }}
|
||||||
|
- {{ .Values.site.domain | replace "www." "" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
{{- define "..resourcelimits" -}}
|
{{- define "..resourcelimits" -}}
|
||||||
resources:
|
resources:
|
||||||
@@ -38,7 +42,31 @@ app.kubernetes.io/name: {{ include "..name" . }}
|
|||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||||
cloudyne.systems/customer: {{ .Values.customer.legalName | replace " " "-" | trunc 63 | trimSuffix "-" }}
|
cloudyne.systems/customer: {{ .Values.customer.legalName | replace " " "-" | replace "," "" | trunc 63 | trimSuffix "-" | quote }}
|
||||||
cloudyne.systems/customer-legal-id: {{ .Values.customer.legalId }}
|
cloudyne.systems/customer-legal-id: '{{ .Values.customer.legalId }}'
|
||||||
cloudyne.systems/site: {{ .Values.site.domain }}
|
cloudyne.systems/site: {{ .Values.site.domain | quote }}
|
||||||
|
{{- end }}
|
||||||
|
{{- define "..selector-labels" -}}
|
||||||
|
cloudyne.systems/customer: {{ .Values.customer.legalName | replace " " "-" | replace "," "" | trunc 63 | trimSuffix "-" | quote }}
|
||||||
|
cloudyne.systems/site: {{ .Values.site.domain | quote }}
|
||||||
|
cloudyne.systems/component: site
|
||||||
|
{{- end }}
|
||||||
|
{{- define "..affinity-labels" -}}
|
||||||
|
podAffinity:
|
||||||
|
requiredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
- labelSelector:
|
||||||
|
matchExpressions:
|
||||||
|
- key: cloudyne.systems/customer
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
- {{ .Values.customer.legalName | replace " " "-" | replace "," "" | trunc 63 | trimSuffix "-" | quote }}
|
||||||
|
- key: cloudyne.systems/site
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
- {{ .Values.site.domain | quote }}
|
||||||
|
- key: cloudyne.systems/component
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
- "site"
|
||||||
|
topologyKey: kubernetes.io/hostname
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
{{- if and .Values.site.certificate .Values.site.certificate.certManager }}
|
||||||
apiVersion: cert-manager.io/v1
|
apiVersion: cert-manager.io/v1
|
||||||
kind: Certificate
|
kind: Certificate
|
||||||
metadata:
|
metadata:
|
||||||
@@ -6,17 +7,21 @@ metadata:
|
|||||||
{{- include "..labels" . | nindent 8 }}
|
{{- include "..labels" . | nindent 8 }}
|
||||||
spec:
|
spec:
|
||||||
issuerRef:
|
issuerRef:
|
||||||
name: cloudyne-internal-root-v2
|
name: {{ .Values.site.certificate.issuerRef }}
|
||||||
kind: ClusterIssuer
|
kind: {{ .Values.site.certificate.issuerKind }}
|
||||||
secretName: {{ include "..fullname" . }}-cert-secret
|
secretName: {{ include "..fullname" . }}-cert-secret
|
||||||
commonName: {{ .Values.site.url }}
|
commonName: {{ .Values.site.domain }}
|
||||||
dnsNames:
|
dnsNames: {{ include "..domains" . | nindent 8 }}
|
||||||
- {{ .Values.site.domain | replace "www." "" }}
|
{{- else if and .Values.site.certificate .Values.site.certificate.custom .Values.site.certificate.custom.enabled }}
|
||||||
- www.{{ .Values.site.domain | replace "www." "" }}
|
apiVersion: v1
|
||||||
- {{ .Values.site.domain | replace "www." "" | replace "." "-" }}.eu.cust.azurecd.net
|
kind: Secret
|
||||||
- www.{{ .Values.site.domain | replace "www." "" | replace "." "-" }}.eu.cust.azurecd.net
|
metadata:
|
||||||
{{- if .Values.site.additionalIngressDomains }}
|
name: {{ include "..fullname" . }}-cert-secret
|
||||||
{{- range .Values.site.additionalIngressDomains }}
|
labels:
|
||||||
- {{ . }}
|
{{- include "..labels" . | nindent 8 }}
|
||||||
{{- end }}
|
type: kubernetes.io/tls
|
||||||
|
data:
|
||||||
|
tls.crt: {{ .Values.site.certificate.custom.cert | b64enc }}
|
||||||
|
tls.key: {{ .Values.site.certificate.custom.key | b64enc }}
|
||||||
|
{{- else }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
@@ -5,30 +5,45 @@ metadata:
|
|||||||
labels:
|
labels:
|
||||||
{{- include "..labels" . | nindent 8 }}
|
{{- include "..labels" . | nindent 8 }}
|
||||||
data:
|
data:
|
||||||
SMTP_PORT: '2525'
|
{{- if .Values.email.smtpHost }}
|
||||||
SMTP_AUTH: 'true'
|
SMTP_HOST: {{ .Values.email.smtpHost }}
|
||||||
SMTP_FROM: 'customer-noreply@v3.nu'
|
{{- end }}
|
||||||
{{- if .Values.email }}
|
{{- if .Values.email.smtpPort }}
|
||||||
{{- if .Values.email.forceFromEmail }}
|
SMTP_PORT: {{ .Values.email.smtpPort | quote }}
|
||||||
SMTP_FORCE_FROM: {{ .Values.email.forceFromEmail }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- if .Values.email.smtpAuth }}
|
||||||
{{- if .Values.email.domains }}
|
SMTP_AUTH: 'True'
|
||||||
|
{{- if .Values.email.smtpUser }}
|
||||||
|
SMTP_USER: {{ .Values.email.smtpUser }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.email.smtpPassword }}
|
||||||
|
SMTP_PASSWORD: {{ .Values.email.smtpPassword }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.email.smtpStarttls }}
|
||||||
|
SMTP_STARTTLS: 'True'
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.email.defaultSender }}
|
||||||
|
SMTP_FROM: {{ .Values.email.defaultSender }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.email.defaultSenderName }}
|
||||||
|
SMTP_FROM_NAME: {{ .Values.email.defaultSenderName }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.email.forceSender }}
|
||||||
|
SMTP_FORCE_FROM: {{ .Values.email.forceSender }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.email.domains }}
|
||||||
SMTP_ALLOWONLY_DOMAINS: {{ .Values.email.domains | join "," }}
|
SMTP_ALLOWONLY_DOMAINS: {{ .Values.email.domains | join "," }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.email.allowedEmails }}
|
{{- if .Values.email.allowedEmails }}
|
||||||
SMTP_ALLOWONLY_EMAILS: {{ .Values.email.allowedEmails | join "," }}
|
SMTP_ALLOWONLY_EMAILS: {{ .Values.email.allowedEmails | join "," }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- else }}
|
WP_HOME: "https://{{ .Values.site.domain | replace "http://" "" | replace "https://" "" }}"
|
||||||
SMTP_FORCE_FROM: "customer-noreply@v3.nu"
|
{{- if .Values.site.env }}
|
||||||
SMTP_FROM_NAME: "V3 Customer Mailer"
|
{{- range $k, $v := .Values.site.env }}
|
||||||
{{- end }}
|
|
||||||
WP_ENV: "{{ .Values.site.environment | default "production" }}"
|
|
||||||
WP_HOME: "https://{{ ( .Values.site.redirectDomain | default ( .Values.site.domain )) | replace "https://" "" | replace "http://" "" }}"
|
|
||||||
{{- if .Values.site.additionalEnv }}
|
|
||||||
{{- range $k, $v := .Values.site.additionalEnv }}
|
|
||||||
{{ $k }}: {{ $v }}
|
{{ $k }}: {{ $v }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
---
|
---
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
@@ -44,13 +59,26 @@ data:
|
|||||||
"webserverGroup": "unit",
|
"webserverGroup": "unit",
|
||||||
"applicationDir": "/app",
|
"applicationDir": "/app",
|
||||||
"permissions": "0770",
|
"permissions": "0770",
|
||||||
"updatePermissions": true,
|
"updatePermissions": {{ .Values.init.wp.updatePermissions | default false }},
|
||||||
"importDatabase": {{ .Values.database.import | default false }},
|
"importDatabase": {{ .Values.init.db.active | default false }},
|
||||||
"databasePath": "{{ .Values.database.importPath | default "" }}",
|
"databasePath": "{{ .Values.init.db.path | default "" }}",
|
||||||
"overwriteDatabase": {{ .Values.database.overwrite | default false }},
|
"databaseUrl": "{{ .Values.init.db.url | default "" }}",
|
||||||
|
"importContent": {{ .Values.init.content.active | default false }},
|
||||||
|
"contentPath": "{{ .Values.init.content.path | default "" }}",
|
||||||
|
"contentUrl": "{{ .Values.init.content.url | default "" }}",
|
||||||
|
"overwriteDatabase": {{ .Values.init.db.overwrite | default false }},
|
||||||
"generateSalts": true,
|
"generateSalts": true,
|
||||||
"activateTheme": "{{ .Values.site.theme | default .Values.site.name }}",
|
"activateTheme": "{{ .Values.init.wp.theme | default .Values.site.name }}",
|
||||||
"convertUploadsToWebp": {{ .Values.site.enableWebpConversion | default false }},
|
{{- if .Values.init.asJob }}
|
||||||
|
"convertUploadsToWebp": {{ .Values.init.content.webpConverter | default true }},
|
||||||
|
{{- else }}
|
||||||
|
"convertUploadsToWebp": {{ .Values.init.content.webpConverter | default false }},
|
||||||
|
{{- end }}
|
||||||
|
{{- if and .Values.storage.cloud.active .Values.storage.local.active }}
|
||||||
|
"backupToCloud": true,
|
||||||
|
{{- else }}
|
||||||
|
"backupToCloud": false,
|
||||||
|
{{- end }}
|
||||||
"convertMissingOnly": true
|
"convertMissingOnly": true
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -81,6 +109,30 @@ data:
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"action": {
|
||||||
|
"return": 302,
|
||||||
|
"location": "/wp/wp-admin"
|
||||||
|
},
|
||||||
|
"match": {
|
||||||
|
"uri": [
|
||||||
|
"/wp-admin",
|
||||||
|
"/wp-admin/*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"action": {
|
||||||
|
"return": 302,
|
||||||
|
"location": "/wp/wp-login.php"
|
||||||
|
},
|
||||||
|
"match": {
|
||||||
|
"uri": [
|
||||||
|
"/wp-login.php",
|
||||||
|
"/wp-login.php*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"action": {
|
"action": {
|
||||||
"return": 404
|
"return": 404
|
||||||
@@ -104,19 +156,7 @@ data:
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{{- if (.Values.site.webpRoute | default "true") }}
|
||||||
"action": {
|
|
||||||
"return": 302,
|
|
||||||
"location": "/wp/wp-admin"
|
|
||||||
},
|
|
||||||
"match": {
|
|
||||||
"uri": [
|
|
||||||
"/wp-admin",
|
|
||||||
"/wp-admin/*"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{{- if eq .Values.site.enableWebpRoute "true" }}
|
|
||||||
{
|
{
|
||||||
"match": {
|
"match": {
|
||||||
"uri": [
|
"uri": [
|
||||||
@@ -151,27 +191,37 @@ data:
|
|||||||
"applications": {
|
"applications": {
|
||||||
"php": {
|
"php": {
|
||||||
"type": "php",
|
"type": "php",
|
||||||
|
"processes": {
|
||||||
|
"max": {{ .Values.php.maxProc | default 5 }},
|
||||||
|
"spare": {{ .Values.php.spareProc | default 1 }},
|
||||||
|
"idle_timeout": {{ .Values.php.procIdleTimeout | default 65 }}
|
||||||
|
},
|
||||||
"options": {
|
"options": {
|
||||||
"user": {
|
"user": {
|
||||||
"display_errors": "{{ .Values.site.displayErrors | default "0" }}",
|
{{- if and .Values.php .Values.php.additionalValues }}
|
||||||
"log_errors": "{{ .Values.site.logErrors | default "1" }}"
|
{{- range $k, $v := .Values.php.additionalValues }}
|
||||||
|
"{{ $k }}": "{{ $v }}",
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
"display_errors": "{{ .Values.php.displayErrors | default "Off" }}",
|
||||||
|
"log_errors": "{{ .Values.php.logErrors | default "On" }}"
|
||||||
},
|
},
|
||||||
"admin": {
|
"admin": {
|
||||||
"expose_php": "Off",
|
"expose_php": "Off",
|
||||||
"short_open_tag": "Off",
|
"short_open_tag": "Off",
|
||||||
"disable_functions": "exec,passthru,shell_exec,system,proc_open,popen,show_source",
|
"disable_functions": "exec,passthru,shell_exec,system,proc_open,popen,show_source",
|
||||||
"log_errors": "On",
|
"log_errors": "{{ .Values.php.logErrors | default "On" }}",
|
||||||
{{- if and .Values.advanced .Values.advanced.php .Values.advanced.php.additionalAdminValues }}
|
{{- if and .Values.php .Values.php.additionalAdminValues }}
|
||||||
{{- range $k, $v := .Values.advanced.php.additionalAdminValues }}
|
{{- range $k, $v := .Values.php.additionalAdminValues }}
|
||||||
"{{ $k }}": "{{ $v }}",
|
"{{ $k }}": "{{ $v }}",
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
"memory_limit": "{{ .Values.site.resources.php.memory | default "512M" }}",
|
"memory_limit": "{{ .Values.site.resources.php.memory | default "512M" }}",
|
||||||
"upload_max_filesize": "{{ .Values.site.resources.php.upload | default "512M" }}",
|
"upload_max_filesize": "{{ .Values.site.resources.php.upload | default "512M" }}",
|
||||||
"post_max_size": "{{ .Values.site.resources.php.post | default "512M" }}",
|
"post_max_size": "{{ .Values.site.resources.php.post | default "512M" }}",
|
||||||
"max_execution_time": "{{ .Values.site.resources.php.executionTime | default "300" }}",
|
"max_execution_time": "{{ .Values.site.resources.php.executionTime | default "300" }}",
|
||||||
"max_input_time": "{{ .Values.site.resources.php.inputTime | default "300" }}",
|
"max_input_time": "{{ .Values.site.resources.php.inputTime | default "300" }}",
|
||||||
{{- end }}
|
{{- end }}
|
||||||
"date.timezone": "{{ .Values.customer.timezone | default "Europe/Stockholm" }}"
|
"date.timezone": "{{ .Values.customer.timezone | default "Europe/Stockholm" }}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -187,3 +237,20 @@ data:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
{{- if .Values.storage.configMap }}
|
||||||
|
{{- range .Values.storage.configMap }}
|
||||||
|
{{- if eq .type "configmap" }}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: {{ include "..fullname" $ }}-cm-{{ .name }}
|
||||||
|
labels:
|
||||||
|
{{- include "..labels" $ | nindent 8 }}
|
||||||
|
data:
|
||||||
|
{{- range $k, $v := .files }}
|
||||||
|
{{ $v.name }}: {{ $v.content | toYaml | indent 4}}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
@@ -6,7 +6,7 @@ metadata:
|
|||||||
{{- include "..labels" . | nindent 8 }}
|
{{- include "..labels" . | nindent 8 }}
|
||||||
spec:
|
spec:
|
||||||
secretName: {{ include "..fullname" . }}-db-auth
|
secretName: {{ include "..fullname" . }}-db-auth
|
||||||
instance: {{ .Values.database.server | default "kincaid" }}
|
instance: {{ .Values.site.dbInstance | default "kincaid" }}
|
||||||
deletionProtected: yes
|
deletionProtected: yes
|
||||||
backup:
|
backup:
|
||||||
enable: No
|
enable: No
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ metadata:
|
|||||||
name: {{ include "..fullname" . }}
|
name: {{ include "..fullname" . }}
|
||||||
labels:
|
labels:
|
||||||
{{- include "..labels" . | nindent 4 }}
|
{{- include "..labels" . | nindent 4 }}
|
||||||
cloudyne.systems/component: site
|
|
||||||
spec:
|
spec:
|
||||||
{{- if .Values.site.resources }}
|
{{- if .Values.site.resources }}
|
||||||
replicas: {{ .Values.site.resources.replicas | default 1 }}
|
replicas: {{ .Values.site.resources.replicas | default 1 }}
|
||||||
@@ -13,96 +12,173 @@ spec:
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
cloudyne.systems/customer: {{ .Values.customer.legalName | replace " " "-" | lower | trunc 63 }}
|
{{- include "..selector-labels" . | nindent 6 }}
|
||||||
cloudyne.systems/customer-legal-id: {{ .Values.customer.legalId }}
|
|
||||||
cloudyne.systems/site: {{ .Values.site.domain }}
|
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
cloudyne.systems/customer: {{ .Values.customer.legalName | replace " " "-" | lower | trunc 63 }}
|
{{- include "..selector-labels" . | nindent 8 }}
|
||||||
cloudyne.systems/customer-legal-id: {{ .Values.customer.legalId }}
|
|
||||||
cloudyne.systems/site: {{ .Values.site.domain }}
|
|
||||||
spec:
|
spec:
|
||||||
securityContext:
|
securityContext:
|
||||||
fsGroup: 101
|
fsGroup: 101
|
||||||
volumes:
|
volumes:
|
||||||
- name: cloud
|
|
||||||
persistentVolumeClaim:
|
|
||||||
claimName: pvc-{{ include "..fullname" . }}
|
|
||||||
- name: serverconfig
|
- name: serverconfig
|
||||||
configMap:
|
configMap:
|
||||||
name: {{ include "..fullname" . }}-cfg
|
name: {{ include "..fullname" . }}-cfg
|
||||||
|
{{- if and .Values.secrets .Values.secrets.external }}
|
||||||
|
{{- range .Values.secrets.external }}
|
||||||
|
{{- if eq .type "file" }}
|
||||||
|
- name: {{ .name }}
|
||||||
|
secret:
|
||||||
|
secretName: {{- include "..fullname" $ }}-exts-{{ .name }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.storage.kubernetes }}
|
||||||
|
{{- range .Values.storage.kubernetes }}
|
||||||
|
- name: {{ .name }}
|
||||||
|
{{- if eq .type "secret" }}
|
||||||
|
secret:
|
||||||
|
secretName: "{{- include "..fullname" $ }}-sec-{{ .name }}"
|
||||||
|
{{- end }}
|
||||||
|
{{- if eq .type "configmap" }}
|
||||||
|
configMap:
|
||||||
|
name: "{{- include "..fullname" $ }}-sec-{{ .name }}"
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.storage.cloud.active }}
|
||||||
|
- name: cloud
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: pvc-{{- include "..name" . }}-cloud
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.storage.local.active }}
|
||||||
|
- name: local
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: pvc-{{- include "..name" . }}-local
|
||||||
|
{{- end }}
|
||||||
|
{{- if and .Values.secrets .Values.secrets.external }}
|
||||||
|
{{- range .Values.secrets.external }}
|
||||||
|
{{- if eq .type "docker" }}
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
- name: pull-secret
|
- name: "{{- include "..fullname" $ }}-exts-{{ .name }}"
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.storage.kubernetes }}
|
||||||
|
{{- range .Values.storage.kubernetes }}
|
||||||
|
{{- if eq .type "docker" }}
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: "{{- include "..fullname" $ }}-sec-{{ .name }}"
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if not .Values.init.asJob }}
|
||||||
initContainers:
|
initContainers:
|
||||||
- name: deploy
|
{{- if and .Values.storage.cloud.active .Values.storage.local.active .Values.storage.local.cloneCloud }}
|
||||||
|
- name: init-local-storage
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
runAsUser: 0
|
runAsUser: 0
|
||||||
image: "cloudyne.azurecr.io/buildahome/{{ .Values.site.name | default ( .Values.site.domain | replace "." "-" ) }}:{{ .Values.site.imageTag | default "latest" }}"
|
image: cloudyne/ubuntu-ci:latest
|
||||||
|
command: ["python3"]
|
||||||
|
args: ["/usr/local/bin/storage-clone", "/mnt/cloud", "/mnt/local"]
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: cloud
|
- name: cloud
|
||||||
mountPath: /full-cloud
|
mountPath: /mnt/cloud
|
||||||
|
- name: local
|
||||||
|
mountPath: /mnt/local
|
||||||
|
{{- end }}
|
||||||
|
- name: init-site
|
||||||
|
securityContext:
|
||||||
|
allowPrivilegeEscalation: false
|
||||||
|
runAsUser: 0
|
||||||
|
image: "{{ .Values.site.image }}"
|
||||||
|
imagePullPolicy: Always
|
||||||
|
volumeMounts:
|
||||||
- name: serverconfig
|
- name: serverconfig
|
||||||
mountPath: /init-go/config.json
|
mountPath: /init-go/config.json
|
||||||
subPath: init.json
|
subPath: init.json
|
||||||
{{- if .Values.storage.wpContent }}
|
{{- if .Values.storage.local.active }}
|
||||||
{{- range $v := .Values.storage.wpContent }}
|
{{- range .Values.storage.folders }}
|
||||||
- name: cloud
|
- name: local
|
||||||
mountPath: "/app/web/app/{{ $v }}"
|
mountPath: "/app/web/app/{{ . }}"
|
||||||
subPath: "{{ $v }}"
|
subPath: "{{ . }}"
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- if .Values.storage.cloud.active }}
|
||||||
{{- if .Values.storage.additionalMounts }}
|
|
||||||
{{- range $v := .Values.storage.additionalMounts }}
|
|
||||||
- name: cloud
|
- name: cloud
|
||||||
mountPath: {{ $v.localPath }}
|
mountPath: "/mnt/cloud"
|
||||||
subPath: {{ $v.cloudPath }}
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- else }}
|
||||||
|
{{- if .Values.storage.cloud.active }}
|
||||||
|
{{- range .Values.storage.folders }}
|
||||||
|
- name: cloud
|
||||||
|
mountPath: "/app/web/app/{{ . }}"
|
||||||
|
subPath: "{{ . }}"
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
envFrom:
|
envFrom:
|
||||||
- configMapRef:
|
- configMapRef:
|
||||||
name: {{ include "..fullname" . }}-env
|
name: {{ include "..fullname" . }}-env
|
||||||
|
{{- if and .Values.secrets .Values.secrets.external }}
|
||||||
|
{{- range .Values.secrets.external }}
|
||||||
|
{{- if eq .type "env" }}
|
||||||
|
- secretRef:
|
||||||
|
name: "{{- include "..fullname" $ }}-exts-{{ .name }}"
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
- secretRef:
|
- secretRef:
|
||||||
name: {{ include "..fullname" . }}-db-auth
|
name: {{ include "..fullname" . }}-db-auth
|
||||||
- secretRef:
|
command: ["sh"]
|
||||||
name: global-secrets
|
args: ["-c", "/init-go/init-go"]
|
||||||
command: [ "/init-go/init-go" ]
|
{{- end }}
|
||||||
containers:
|
containers:
|
||||||
- name: wordpress
|
- name: wordpress
|
||||||
securityContext:
|
securityContext:
|
||||||
runAsUser: 101
|
runAsUser: 101
|
||||||
image: "cloudyne.azurecr.io/buildahome/{{ .Values.site.name | default ( .Values.site.domain | replace "." "-" ) }}:{{ .Values.site.imageTag | default "latest" }}"
|
image: "{{ .Values.site.image }}"
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: serverconfig
|
- name: serverconfig
|
||||||
mountPath: /docker-entrypoint.d/unit.json
|
mountPath: /docker-entrypoint.d/unit.json
|
||||||
subPath: unit.json
|
subPath: unit.json
|
||||||
{{- if .Values.storage.wpContent }}
|
{{- if .Values.storage.local.active }}
|
||||||
{{- range $v := .Values.storage.wpContent }}
|
{{- range .Values.storage.folders }}
|
||||||
- name: cloud
|
- name: local
|
||||||
mountPath: "/app/web/app/{{ $v }}"
|
mountPath: "/app/web/app/{{ . }}"
|
||||||
subPath: "{{ $v }}"
|
subPath: "{{ . }}"
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- if .Values.storage.cloud.active }}
|
||||||
{{- if .Values.storage.additionalMounts }}
|
|
||||||
{{- range $v := .Values.storage.additionalMounts }}
|
|
||||||
- name: cloud
|
- name: cloud
|
||||||
mountPath: {{ $v.localPath }}
|
mountPath: "/mnt/cloud"
|
||||||
subPath: {{ $v.cloudPath }}
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- else }}
|
||||||
|
{{- if .Values.storage.cloud.active }}
|
||||||
|
{{- range .Values.storage.folders }}
|
||||||
|
- name: cloud
|
||||||
|
mountPath: "/app/web/app/{{ . }}"
|
||||||
|
subPath: "{{ . }}"
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- include "..resourcelimits" . | nindent 10 }}
|
||||||
envFrom:
|
envFrom:
|
||||||
- configMapRef:
|
- configMapRef:
|
||||||
name: {{ include "..fullname" . }}-env
|
name: {{ include "..fullname" . }}-env
|
||||||
|
{{- if and .Values.secrets .Values.secrets.external }}
|
||||||
|
{{- range .Values.secrets.external }}
|
||||||
|
{{- if eq .type "env" }}
|
||||||
|
- secretRef:
|
||||||
|
name: "{{- include "..fullname" $ }}-exts-{{ .name }}"
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
- secretRef:
|
- secretRef:
|
||||||
name: {{ include "..fullname" . }}-db-auth
|
name: {{ include "..fullname" . }}-db-auth
|
||||||
- secretRef:
|
|
||||||
name: global-secrets
|
|
||||||
{{- include "..resourcelimits" . | nindent 10 }}
|
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8080
|
- containerPort: 8080
|
||||||
name: http
|
name: http
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
|
|
||||||
|
|||||||
@@ -1,60 +1,37 @@
|
|||||||
apiVersion: external-secrets.io/v1beta1
|
{{- if and .Values.secrets .Values.secrets.external }}
|
||||||
kind: ExternalSecret
|
{{- range .Values.secrets.external }}
|
||||||
metadata:
|
|
||||||
name: {{ include "..fullname" . }}-ex-gl-secret
|
|
||||||
labels:
|
|
||||||
{{- include "..labels" . | nindent 8 }}
|
|
||||||
spec:
|
|
||||||
refreshInterval: 4h
|
|
||||||
secretStoreRef:
|
|
||||||
kind: ClusterSecretStore
|
|
||||||
name: az-cluster-store
|
|
||||||
target:
|
|
||||||
name: global-secrets
|
|
||||||
creationPolicy: Orphan
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app.kubernetes.io/managed-by: External-Secrets
|
|
||||||
data:
|
|
||||||
- secretKey: COMPOSER_AUTH
|
|
||||||
remoteRef:
|
|
||||||
key: secret/GITLAB-COMPOSER-AUTH
|
|
||||||
- secretKey: SMTP_USER
|
|
||||||
remoteRef:
|
|
||||||
key: secret/SMTP-USER
|
|
||||||
- secretKey: SMTP_PASS
|
|
||||||
remoteRef:
|
|
||||||
key: secret/SMTP-PASSWORD
|
|
||||||
- secretKey: SMTP_HOST
|
|
||||||
remoteRef:
|
|
||||||
key: secret/SMTP-HOST
|
|
||||||
- secretKey: WPC_REGISTRATION_SECRET
|
|
||||||
remoteRef:
|
|
||||||
key: secret/WPC-REGISTRATION-SECRET
|
|
||||||
---
|
---
|
||||||
apiVersion: external-secrets.io/v1beta1
|
apiVersion: external-secrets.io/v1beta1
|
||||||
kind: ExternalSecret
|
kind: ExternalSecret
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ include "..fullname" . }}-ex-pull-secret
|
name: {{ include "..fullname" $ }}-ext-{{ .name }}
|
||||||
labels:
|
labels:
|
||||||
{{- include "..labels" . | nindent 8 }}
|
{{- include "..labels" $ | nindent 8 }}
|
||||||
spec:
|
spec:
|
||||||
refreshInterval: 4h
|
refreshInterval: {{ .refreshInterval | default "10h" }}
|
||||||
secretStoreRef:
|
secretStoreRef:
|
||||||
|
{{- if .ref.clusterSecretStore }}
|
||||||
kind: ClusterSecretStore
|
kind: ClusterSecretStore
|
||||||
name: az-cluster-store
|
name: {{ .ref.clusterSecretStore }}
|
||||||
|
{{- else }}
|
||||||
|
kind: SecretStore
|
||||||
|
name: {{ .ref.secretStore }}
|
||||||
|
namespace: {{ .ref.secretStoreNamespace }}
|
||||||
|
{{- end }}
|
||||||
target:
|
target:
|
||||||
name: pull-secret
|
name: {{ include "..fullname" $ }}-exts-{{ .name }}
|
||||||
template:
|
template:
|
||||||
|
{{- if eq .type "docker"}}
|
||||||
|
type: kubernetes.io/dockerconfigjson
|
||||||
|
{{- end }}
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app.kubernetes.io/managed-by: External-Secrets
|
app.kubernetes.io/managed-by: External-Secrets
|
||||||
type: kubernetes.io/dockerconfigjson
|
|
||||||
data:
|
|
||||||
.dockerconfigjson: "{{`{{ .dockerconfig | toString }}`}}"
|
|
||||||
creationPolicy: Orphan
|
|
||||||
data:
|
data:
|
||||||
- secretKey: dockerconfig
|
{{- range $v := .items }}
|
||||||
|
- secretKey: {{ $v.target }}
|
||||||
remoteRef:
|
remoteRef:
|
||||||
key: secret/CLDY-CR-PULL-TOKEN
|
key: {{ $v.source }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|||||||
@@ -9,72 +9,27 @@ metadata:
|
|||||||
{{- include "..labels" . | nindent 4 }}
|
{{- include "..labels" . | nindent 4 }}
|
||||||
spec:
|
spec:
|
||||||
ingressClassName: nginx
|
ingressClassName: nginx
|
||||||
|
{{- if or .Values.site.certificate.certManager .Values.site.certificate.importCert }}
|
||||||
tls:
|
tls:
|
||||||
- secretName: {{ include "..fullname" . }}-cert-secret
|
- secretName: {{ include "..fullname" . }}-cert-secret
|
||||||
hosts:
|
hosts: {{ include "..domains" . | nindent 6 }}
|
||||||
- {{ .Values.site.domain | replace "www." "" }}
|
{{- else if .Values.site.certificate.existingCert }}
|
||||||
- www.{{ .Values.site.domain | replace "www." "" }}
|
tls:
|
||||||
- {{ .Values.site.domain | replace "www." "" | replace "." "-" }}.eu.cust.azurecd.net
|
- secretName: {{ .Values.site.certificate.existingCertName }}
|
||||||
- www.{{ .Values.site.domain | replace "www." "" | replace "." "-" }}.eu.cust.azurecd.net
|
hosts: {{ include "..domains" . | nindent 6 }}
|
||||||
{{- if .Values.site.additionalIngressDomains }}
|
|
||||||
{{- range .Values.site.additionalIngressDomains }}
|
|
||||||
- {{ . }}
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
- host: {{ .Values.site.domain | replace "www." "" }}
|
{{- range include "..domains" . | split "\n" }}
|
||||||
|
{{- if ne . "" }}
|
||||||
|
- host: {{ . | replace "- " ""}}
|
||||||
http:
|
http:
|
||||||
paths:
|
paths:
|
||||||
- path: /
|
- path: /
|
||||||
pathType: Prefix
|
pathType: Prefix
|
||||||
backend:
|
backend:
|
||||||
service:
|
service:
|
||||||
name: {{ include "..fullname" . }}
|
name: {{ include "..fullname" $ }}
|
||||||
port:
|
port:
|
||||||
number: 80
|
number: 80
|
||||||
- host: www.{{ .Values.site.domain | replace "www." "" }}
|
{{- end }}
|
||||||
http:
|
|
||||||
paths:
|
|
||||||
- path: /
|
|
||||||
pathType: Prefix
|
|
||||||
backend:
|
|
||||||
service:
|
|
||||||
name: {{ include "..fullname" . }}
|
|
||||||
port:
|
|
||||||
number: 80
|
|
||||||
- host: {{ .Values.site.domain | replace "www." "" | replace "." "-" }}.eu.cust.azurecd.net
|
|
||||||
http:
|
|
||||||
paths:
|
|
||||||
- path: /
|
|
||||||
pathType: Prefix
|
|
||||||
backend:
|
|
||||||
service:
|
|
||||||
name: {{ include "..fullname" . }}
|
|
||||||
port:
|
|
||||||
number: 80
|
|
||||||
|
|
||||||
- host: www.{{ .Values.site.domain | replace "www." "" | replace "." "-" }}.eu.cust.azurecd.net
|
|
||||||
http:
|
|
||||||
paths:
|
|
||||||
- path: /
|
|
||||||
pathType: Prefix
|
|
||||||
backend:
|
|
||||||
service:
|
|
||||||
name: {{ include "..fullname" . }}
|
|
||||||
port:
|
|
||||||
number: 80
|
|
||||||
{{- if .Values.site.additionalIngressDomains }}
|
|
||||||
{{- range .Values.site.additionalIngressDomains }}
|
|
||||||
- host: {{ . }}
|
|
||||||
http:
|
|
||||||
paths:
|
|
||||||
- path: /
|
|
||||||
pathType: Prefix
|
|
||||||
backend:
|
|
||||||
service:
|
|
||||||
name: {{ include "..fullname" $ }}
|
|
||||||
port:
|
|
||||||
number: 80
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
@@ -1,38 +1,39 @@
|
|||||||
|
{{ if .Values.storage.cloud.active }}
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: PersistentVolume
|
kind: PersistentVolume
|
||||||
metadata:
|
metadata:
|
||||||
name: pv-{{ include "..fullname" . }}
|
name: pv-{{ include "..name" . }}-cloud
|
||||||
labels:
|
labels:
|
||||||
{{- include "..labels" . | nindent 8 }}
|
{{- include "..labels" . | nindent 4 }}
|
||||||
spec:
|
spec:
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteOnce
|
- ReadWriteOnce
|
||||||
capacity:
|
capacity:
|
||||||
storage: {{ .Values.site.resources.disk | default "5Gi" }}
|
storage: {{ .Values.site.resources.disk }}
|
||||||
csi:
|
csi:
|
||||||
driver: blob.csi.azure.com
|
driver: {{ .Values.storage.cloud.driver | default "blob.csi.azure.com" }}
|
||||||
nodeStageSecretRef:
|
nodeStageSecretRef:
|
||||||
name: cloudyne{{ .Values.storage.class | default "premium01" }}-credentials
|
name: {{ .Values.storage.cloud.account }}-credentials
|
||||||
namespace: blob-csi
|
namespace: blob-csi
|
||||||
volumeAttributes:
|
volumeAttributes:
|
||||||
containername: {{ .Values.storage.container | default ( .Values.site.domain | replace "." "-") }}
|
containername: {{ .Values.storage.cloud.container }}
|
||||||
csi.storage.k8s.io/pv/name: pv-{{ include "..fullname" . }}
|
csi.storage.k8s.io/pv/name: pv-{{ include "..name" . }}-cloud
|
||||||
csi.storage.k8s.io/pvc/namespace: {{ include "..fullname" . }}
|
csi.storage.k8s.io/pvc/namespace: {{ .Release.Namespace }}
|
||||||
secretnamespace: {{ include "..fullname" . }}
|
secretnamespace: {{ .Release.Namespace }}
|
||||||
skuName: {{ .Values.storage.type | default "Premium_LRS" }}
|
skuName: {{ .Values.storage.cloud.sku | default "Premium_LRS" }}
|
||||||
volumeHandle: {{ .Values.storage.class | default "premium01" }}-retain_{{ include "..fullname" . }}
|
volumeHandle: {{ .Values.storage.cloud.class }}_{{ .Values.storage.cloud.container }}
|
||||||
mountOptions:
|
mountOptions:
|
||||||
- -o allow_other
|
- -o allow_other
|
||||||
- --file-cache-timeout-in-seconds=120
|
- --file-cache-timeout-in-seconds=120
|
||||||
- --use-attr-cache=true
|
- --use-attr-cache=true
|
||||||
- --cancel-list-on-mount-seconds=10
|
- --cancel-list-on-mount-seconds=10
|
||||||
- -o attr_timeout=120
|
- -o attr_timeout=120
|
||||||
- -o entry_timeout=120
|
- -o entry_timeout=120
|
||||||
- -o negative_timeout=120
|
- -o negative_timeout=120
|
||||||
- --log-level=LOG_WARNING
|
- --log-level=LOG_WARNING
|
||||||
- --cache-size-mb=3500
|
- --cache-size-mb=3500
|
||||||
- -o uid=101
|
- -o uid=101
|
||||||
persistentVolumeReclaimPolicy: Retain
|
persistentVolumeReclaimPolicy: Retain
|
||||||
storageClassName: {{ .Values.storage.class | default "premium01" }}-retain
|
storageClassName: {{ .Values.storage.cloud.class }}
|
||||||
volumeMode: Filesystem
|
volumeMode: Filesystem
|
||||||
---
|
{{- end }}
|
||||||
|
|||||||
@@ -1,22 +1,37 @@
|
|||||||
|
{{- if .Values.storage.cloud.active }}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: pvc-{{ include "..name" . }}-cloud
|
||||||
|
labels:
|
||||||
|
{{- include "..labels" . | nindent 4 }}
|
||||||
|
annotations:
|
||||||
|
volume.beta.kubernetes.io/storage-provisioner: {{ .Values.storage.cloud.driver }}
|
||||||
|
volume.kubernetes.io/storage-provisioner: {{ .Values.storage.cloud.driver }}
|
||||||
|
spec:
|
||||||
|
volumeMode: Filesystem
|
||||||
|
volumeName: pv-{{ include "..name" . }}-cloud
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: {{ .Values.site.resources.disk }}
|
||||||
|
storageClassName: {{ .Values.storage.cloud.class }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.storage.local.active }}
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
metadata:
|
metadata:
|
||||||
annotations:
|
name: pvc-{{ include "..name" . }}-local
|
||||||
volume.beta.kubernetes.io/storage-provisioner: blob.csi.azure.com
|
labels:
|
||||||
volume.kubernetes.io/storage-provisioner: blob.csi.azure.com
|
{{- include "..labels" . | nindent 4 }}
|
||||||
labels:
|
|
||||||
{{- include "..labels" . | nindent 8 }}
|
|
||||||
name: pvc-{{ include "..fullname" . }}
|
|
||||||
spec:
|
spec:
|
||||||
volumeMode: Filesystem
|
volumeMode: Filesystem
|
||||||
volumeName: pv-{{ include "..fullname" . }}
|
accessModes:
|
||||||
accessModes:
|
- ReadWriteOnce
|
||||||
- ReadWriteOnce
|
resources:
|
||||||
resources:
|
requests:
|
||||||
requests:
|
storage: {{ .Values.site.resources.disk }}
|
||||||
storage: {{ .Values.site.resources.disk | default "5Gi" }}
|
storageClassName: {{ .Values.storage.local.class }}
|
||||||
|
|
||||||
{{- if and .Values.storage .Values.storage.class }}
|
|
||||||
storageClassName: {{ .Values.storage.class | default "premium01" }}-retain
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
17
Chart/templates/secret.yaml
Normal file
17
Chart/templates/secret.yaml
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{{- if .Values.storage.kubernetes }}
|
||||||
|
{{- range .Values.storage.kubernetes }}
|
||||||
|
{{- if eq .type "secret" }}
|
||||||
|
---
|
||||||
|
kind: Secret
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: {{ include "..fullname" $ }}-sec-{{ .name }}
|
||||||
|
labels:
|
||||||
|
{{- include "..labels" $ | nindent 8 }}
|
||||||
|
stringData:
|
||||||
|
{{- range $k, $v := .files }}
|
||||||
|
{{ $v.name }}: {{ $v.content | toYaml | indent 4}}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
@@ -10,7 +10,5 @@ spec:
|
|||||||
port: 80
|
port: 80
|
||||||
targetPort: 8080
|
targetPort: 8080
|
||||||
selector:
|
selector:
|
||||||
cloudyne.systems/customer: {{ .Values.customer.legalName | replace " " "-" | lower | trunc 63 }}
|
{{- include "..selector-labels" . | nindent 4 }}
|
||||||
cloudyne.systems/customer-legal-id: {{ .Values.customer.legalId }}
|
|
||||||
cloudyne.systems/site: {{ .Values.site.domain }}
|
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
|
|||||||
@@ -1,111 +1,41 @@
|
|||||||
customer:
|
customer:
|
||||||
# The (dns-compliant) customer name (Required)
|
# The customer name (DNS-Compliant)
|
||||||
# name: dns-compliant-customer-name
|
name: customerdomain-tld
|
||||||
|
|
||||||
# The legal name of the customer (Required)
|
# The customer legal name
|
||||||
# legalName: Customer Name Ltd
|
legalName: Customer Name Ltd.
|
||||||
|
|
||||||
# The legal ID of the customer (Required)
|
# The customer legal ID
|
||||||
# legalId: 112233-4455
|
legalId: 112233-4455
|
||||||
|
|
||||||
# The timezone for the customer
|
# The customer timezone
|
||||||
timezone: "Europe/Stockholm"
|
timezone: "Europe/Stockholm"
|
||||||
|
|
||||||
email:
|
|
||||||
# Force a given sender email
|
|
||||||
# forceSender: "example@email.com"
|
|
||||||
|
|
||||||
# Set a default sender/display name
|
|
||||||
# defaultSender: "customer-noreply@v3.nu"
|
|
||||||
# defaultSenderName: "Customer Name"
|
|
||||||
|
|
||||||
# Specify allowed domains/emails to use as senders
|
|
||||||
# domains:
|
|
||||||
# - customer.tld
|
|
||||||
# emails:
|
|
||||||
# - mail@customer.tld
|
|
||||||
|
|
||||||
# Database configuration
|
|
||||||
database:
|
|
||||||
# Database server to use
|
|
||||||
server: kincaid
|
|
||||||
|
|
||||||
# Import database from file if not already imported
|
|
||||||
import: false
|
|
||||||
importPath: "/full-cloud/import.sql"
|
|
||||||
overwriteExisting: false
|
|
||||||
|
|
||||||
# Storage Settings
|
|
||||||
storage:
|
|
||||||
# The storage class to use for the site
|
|
||||||
# Default: premium01
|
|
||||||
class: "premium01"
|
|
||||||
|
|
||||||
# The storage type to use for the site
|
|
||||||
# Default: Premium_LRS
|
|
||||||
type: "Premium_LRS"
|
|
||||||
|
|
||||||
# The storage container to use for the site (REQUIRED)
|
|
||||||
# Default: <domain>-<tld>
|
|
||||||
# container: "company-tld"
|
|
||||||
|
|
||||||
# Skip WPC Auto-registration
|
|
||||||
# Default: false
|
|
||||||
# skipWPCRegistration: false
|
|
||||||
|
|
||||||
# WP Content Folders
|
|
||||||
wpContent:
|
|
||||||
- uploads
|
|
||||||
- languages
|
|
||||||
|
|
||||||
additionalMounts: {}
|
|
||||||
# - cloudPath: uploads
|
|
||||||
# localPath: /app/web/app/uploads
|
|
||||||
|
|
||||||
site:
|
site:
|
||||||
# The name of the repository/composerpackage/dockerimage
|
name: "customerdomain-tld"
|
||||||
# Default: domain.replace('.', '-')
|
domain: "customerdomain.tld"
|
||||||
# name: "customer-tld"
|
additionalDomains: []
|
||||||
|
|
||||||
# Tag of the container to deploy
|
image: "ghcr.io/cloudynes/php-bedrock:8.0-alpine"
|
||||||
# imageTag: "latest"
|
|
||||||
|
|
||||||
# The primary domain/TLD where the site will be available
|
env:
|
||||||
# domain: customer.tld
|
WP_ENV: "production"
|
||||||
|
|
||||||
# The main url (subdomain) for the site
|
webpRoute: true
|
||||||
# Only needed if it differs from the domain
|
dbInstance: ""
|
||||||
# ex.
|
|
||||||
# redirectDomain: tempdomain.customer.tld
|
|
||||||
|
|
||||||
# Additional ingress domains that should all
|
certificate:
|
||||||
# point to the same site
|
certManager: false
|
||||||
# Defaults are:
|
# issuerRef: ""
|
||||||
# - <domain>.<tld>
|
# issuerKind: ""
|
||||||
# - www.<domain>.<tld>
|
existingCert: false
|
||||||
# - <domain>-<tld>.eu.cust.azurecd.net
|
# existingCertName: ""
|
||||||
# - www-<domain>-<tld>.eu.cust.azurecd.net
|
importCert: false
|
||||||
additionalIngressDomains: []
|
# importCertValue: |
|
||||||
|
# ....
|
||||||
|
# importKeyValue: |
|
||||||
|
# ....
|
||||||
|
|
||||||
# PHP Version
|
|
||||||
phpVersion: "8.0"
|
|
||||||
|
|
||||||
# Set environment (production/test/staging)
|
|
||||||
# Default: production
|
|
||||||
environment: production
|
|
||||||
|
|
||||||
# Additional env vars
|
|
||||||
# additionalEnv:
|
|
||||||
# MY_ENV_VAR: "value"
|
|
||||||
additionalEnv: {}
|
|
||||||
|
|
||||||
# Enable the route for trying .webp files before images
|
|
||||||
enableWebpRoute: "true"
|
|
||||||
|
|
||||||
# Enable the automatic conversion of WebP images
|
|
||||||
enableWebpConversion: "true"
|
|
||||||
|
|
||||||
# The resource limits for the site
|
|
||||||
resources:
|
resources:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
php:
|
php:
|
||||||
@@ -122,15 +52,114 @@ site:
|
|||||||
peak: 512Mi
|
peak: 512Mi
|
||||||
disk: 5Gi
|
disk: 5Gi
|
||||||
|
|
||||||
# Log Errors
|
secrets:
|
||||||
logErrors: "1"
|
external: []
|
||||||
|
# - name: "ex-gl-secret"
|
||||||
|
# type: "env"
|
||||||
|
# ref:
|
||||||
|
# secretStore: ""
|
||||||
|
# clusterSecretStore: "az-cluster-store"
|
||||||
|
# target: "global-secrets"
|
||||||
|
# items:
|
||||||
|
# - source: secret/SMTP-USER
|
||||||
|
# target: SMTP_USER
|
||||||
|
# - source: secret/SMTP-PASSWORD
|
||||||
|
# target: SMTP_PASS
|
||||||
|
# - source: secret/SMTP-HOST
|
||||||
|
# target: SMTP_HOST
|
||||||
|
# - name: "ex-pull-secret"
|
||||||
|
# type: "docker"
|
||||||
|
# ref:
|
||||||
|
# secretStore: ""
|
||||||
|
# secretStoreNamespace: ""
|
||||||
|
# clusterSecretStore: "az-cluster-store"
|
||||||
|
# target: "pull-secret"
|
||||||
|
# items:
|
||||||
|
# - source: secret/PULL-TOKEN
|
||||||
|
# target: dockerconfig
|
||||||
|
|
||||||
# Display Errors
|
|
||||||
displayErrors: "0"
|
|
||||||
|
|
||||||
# advanced:
|
storage:
|
||||||
# php:
|
kubernetes:
|
||||||
# displayErrors: "0"
|
- name: "pull-secret"
|
||||||
# logErrors: "1"
|
type: "secret"
|
||||||
# additionalAdminValues: {}
|
files:
|
||||||
|
- name: .dockerconfigjson
|
||||||
|
content: |
|
||||||
|
{"auths":{"ghcr.io":{"username":"ghcr.io","password":"ghcr.io","auth":"ghcr.io"}}}
|
||||||
|
# - name: "secret01"
|
||||||
|
# type: "secret"
|
||||||
|
# files:
|
||||||
|
# - name: x
|
||||||
|
# mount: /x.txt
|
||||||
|
# content: |
|
||||||
|
# Hello World
|
||||||
|
# - name: "config01"
|
||||||
|
# type: configmap
|
||||||
|
# files:
|
||||||
|
# - name: x
|
||||||
|
# mount: /x.txt
|
||||||
|
# content: |
|
||||||
|
# test:
|
||||||
|
# data:
|
||||||
|
# - x
|
||||||
|
# - y
|
||||||
|
# - z
|
||||||
|
cloud:
|
||||||
|
active: false
|
||||||
|
driver: "blob.csi.azure.com"
|
||||||
|
account: "azstorage11"
|
||||||
|
sku: "Premium_LRS"
|
||||||
|
class: "azstorage11class-retain"
|
||||||
|
container: "customerdomain-tld"
|
||||||
|
|
||||||
|
local:
|
||||||
|
active: true
|
||||||
|
cloneCloud: False
|
||||||
|
class: "longhorn"
|
||||||
|
|
||||||
|
folders:
|
||||||
|
- uploads
|
||||||
|
- languages
|
||||||
|
|
||||||
|
init:
|
||||||
|
asJob: false
|
||||||
|
wp:
|
||||||
|
theme: "abctheme"
|
||||||
|
updatePermissions: true
|
||||||
|
db:
|
||||||
|
active: false
|
||||||
|
overwrite: false
|
||||||
|
# path: "/full-cloud/init.sql"
|
||||||
|
# url: "https://url.to/init.sql"
|
||||||
|
content:
|
||||||
|
active: false
|
||||||
|
overwrite: false
|
||||||
|
webpConverter: false
|
||||||
|
# path: "/full-cloud/content.zip"
|
||||||
|
# url: "https://url.to/content.zip"
|
||||||
|
|
||||||
|
email:
|
||||||
|
smtpHost: ""
|
||||||
|
smtpPort: ""
|
||||||
|
smtpAuth: false
|
||||||
|
smtpUser: ""
|
||||||
|
smtpPassword: ""
|
||||||
|
smtpStarttls: false
|
||||||
|
|
||||||
|
forceSender: ""
|
||||||
|
defaultSender: ""
|
||||||
|
defaultSenderName: ""
|
||||||
|
domains:
|
||||||
|
- domain
|
||||||
|
emails:
|
||||||
|
- email
|
||||||
|
|
||||||
|
php:
|
||||||
|
maxProc: 5
|
||||||
|
spareProc: 2
|
||||||
|
procIdleTimeout: 65
|
||||||
|
logErrors: "On"
|
||||||
|
displayErrors: "Off"
|
||||||
|
additionalValues: {}
|
||||||
|
additionalAdminValues: {}
|
||||||
|
|||||||
Reference in New Issue
Block a user