Compare commits
37 Commits
cbb973550c
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 816ff471cb | |||
| 826884baff | |||
| 0b1258bebe | |||
| a1acf02233 | |||
| bae6a260f0 | |||
| 047c1c8758 | |||
| 9d56d1d0b9 | |||
| b036ce7710 | |||
| d478cb6ec3 | |||
| 3cdaaf07a4 | |||
| 4876cdc866 | |||
| 847eca2458 | |||
| a2a9d05ee0 | |||
| 0c2fbf3a79 | |||
| 90e6fced80 | |||
| c60bcd8c9f | |||
| 6a66bc9829 | |||
| c2bdc364c0 | |||
| b8aef496f4 | |||
| c3c8b8eebe | |||
| b6cd28d1e9 | |||
| 8389dbcee7 | |||
| 7540309c71 | |||
| 596c4102ed | |||
| d862f7c132 | |||
| 7cbab35102 | |||
| 4d44f56679 | |||
| 721dc409ad | |||
| 0ada9155eb | |||
| 5129be3fc8 | |||
| f70afe5523 | |||
| d6292ca4b0 | |||
| c514a76b5e | |||
| 6287a199b8 | |||
| d884c6cb2b | |||
| b7e034847e | |||
| 8b85ba35fa |
23
.gitea/workflows/upload-helm.yml
Normal file
23
.gitea/workflows/upload-helm.yml
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
name: Upload Helm Chart
|
||||||
|
run-name: Uploading helm chart
|
||||||
|
on: [push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
Explore-Gitea-Actions:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
HELM_CHART_VERSION: "1.1.2"
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Set up Helm
|
||||||
|
uses: azure/setup-helm@v1
|
||||||
|
with:
|
||||||
|
version: 'v3.0.0'
|
||||||
|
- run: 'sed -i "s/version:.*/version: \"${HELM_CHART_VERSION}\"/" ./Chart/Chart.yaml'
|
||||||
|
- run: helm package ./Chart
|
||||||
|
- name: Upload Helm Chart
|
||||||
|
run: |
|
||||||
|
curl -ki -X POST \
|
||||||
|
--user ${{ secrets.HELM_PKG_UPLOAD_USER }}:${{ secrets.HELM_PKG_UPLOAD_PASS }} \
|
||||||
|
--upload-file "wordyne-${HELM_CHART_VERSION}.tgz" \
|
||||||
|
https://helm.cloudyne.io/api/charts
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
variables:
|
variables:
|
||||||
HELM_CHART_VERSION: "1.0.16"
|
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: "99.6.29"
|
version: "1.0.27"
|
||||||
appVersion: "6.2.2"
|
appVersion: "6.2.2"
|
||||||
|
|||||||
@@ -48,25 +48,25 @@ cloudyne.systems/site: {{ .Values.site.domain | quote }}
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
{{- define "..selector-labels" -}}
|
{{- define "..selector-labels" -}}
|
||||||
cloudyne.systems/customer: {{ .Values.customer.legalName | replace " " "-" | replace "," "" | trunc 63 | trimSuffix "-" | quote }}
|
cloudyne.systems/customer: {{ .Values.customer.legalName | replace " " "-" | replace "," "" | trunc 63 | trimSuffix "-" | quote }}
|
||||||
cloudyne.systems/customer-legal-id: '{{ .Values.customer.legalId }}'
|
|
||||||
cloudyne.systems/site: {{ .Values.site.domain | quote }}
|
cloudyne.systems/site: {{ .Values.site.domain | quote }}
|
||||||
|
cloudyne.systems/component: site
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- define "..affinity-labels" -}}
|
{{- define "..affinity-labels" -}}
|
||||||
podAffinity:
|
podAffinity:
|
||||||
requiredDuringSchedulingIgnoredDuringExecution:
|
requiredDuringSchedulingIgnoredDuringExecution:
|
||||||
- labelSelector:
|
- labelSelector:
|
||||||
matchExpressions:
|
matchExpressions:
|
||||||
- key: cloudyne.systems/customer
|
- key: cloudyne.systems/customer
|
||||||
operator: In
|
operator: In
|
||||||
values:
|
values:
|
||||||
- {{ .Values.customer.legalName | replace " " "-" | replace "," "" | trunc 63 | trimSuffix "-" | quote }}
|
- {{ .Values.customer.legalName | replace " " "-" | replace "," "" | trunc 63 | trimSuffix "-" | quote }}
|
||||||
- key: cloudyne.systems/site
|
- key: cloudyne.systems/site
|
||||||
operator: In
|
operator: In
|
||||||
values:
|
values:
|
||||||
- cloudyne.systems/site: {{ .Values.site.domain | quote }}
|
- {{ .Values.site.domain | quote }}
|
||||||
- key: cloudyne.systems/component
|
- key: cloudyne.systems/component
|
||||||
operator: In
|
operator: In
|
||||||
values:
|
values:
|
||||||
- "site"
|
- "site"
|
||||||
topologyKey: kubernetes.io/hostname
|
topologyKey: kubernetes.io/hostname
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -69,7 +69,16 @@ data:
|
|||||||
"overwriteDatabase": {{ .Values.init.db.overwrite | default false }},
|
"overwriteDatabase": {{ .Values.init.db.overwrite | default false }},
|
||||||
"generateSalts": true,
|
"generateSalts": true,
|
||||||
"activateTheme": "{{ .Values.init.wp.theme | default .Values.site.name }}",
|
"activateTheme": "{{ .Values.init.wp.theme | default .Values.site.name }}",
|
||||||
|
{{- if .Values.init.asJob }}
|
||||||
|
"convertUploadsToWebp": {{ .Values.init.content.webpConverter | default true }},
|
||||||
|
{{- else }}
|
||||||
"convertUploadsToWebp": {{ .Values.init.content.webpConverter | default false }},
|
"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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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 }}
|
||||||
@@ -12,10 +11,12 @@ spec:
|
|||||||
replicas: 1
|
replicas: 1
|
||||||
{{- end }}
|
{{- end }}
|
||||||
selector:
|
selector:
|
||||||
matchLabels: {{- include "..selector-labels" . | nindent 6 }}
|
matchLabels:
|
||||||
|
{{- include "..selector-labels" . | nindent 6 }}
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels: {{- include "..selector-labels" . | nindent 8 }}
|
labels:
|
||||||
|
{{- include "..selector-labels" . | nindent 8 }}
|
||||||
spec:
|
spec:
|
||||||
securityContext:
|
securityContext:
|
||||||
fsGroup: 101
|
fsGroup: 101
|
||||||
@@ -98,23 +99,29 @@ spec:
|
|||||||
- name: serverconfig
|
- name: serverconfig
|
||||||
mountPath: /init-go/config.json
|
mountPath: /init-go/config.json
|
||||||
subPath: init.json
|
subPath: init.json
|
||||||
|
{{- if .Values.storage.cloud.active }}
|
||||||
|
- name: cloud
|
||||||
|
mountPath: "/mnt/cloud"
|
||||||
|
{{- end }}
|
||||||
{{- if .Values.storage.local.active }}
|
{{- if .Values.storage.local.active }}
|
||||||
{{- range .Values.storage.folders }}
|
{{- range .Values.storage.folders }}
|
||||||
- name: local
|
- name: local
|
||||||
mountPath: "/app/web/app/{{ . }}"
|
mountPath: "/app/web/app/{{ . }}"
|
||||||
subPath: "{{ . }}"
|
subPath: "{{ . }}"
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.storage.cloud.active }}
|
|
||||||
- name: cloud
|
|
||||||
mountPath: "/mnt/cloud"
|
|
||||||
{{- end }}
|
|
||||||
{{- else }}
|
{{- else }}
|
||||||
{{- if .Values.storage.cloud.active }}
|
{{- if .Values.storage.cloud.active }}
|
||||||
{{- range .Values.storage.folders }}
|
{{- range .Values.storage.folders }}
|
||||||
|
{{- if or ( eq . "certificates" ) ( eq . "secrets" ) }}
|
||||||
|
- name: local
|
||||||
|
mountPath: "/app/{{ . }}"
|
||||||
|
subPath: "{{ . }}"
|
||||||
|
{{- else }}
|
||||||
- name: cloud
|
- name: cloud
|
||||||
mountPath: "/app/web/app/{{ . }}"
|
mountPath: "/app/web/app/{{ . }}"
|
||||||
subPath: "{{ . }}"
|
subPath: "{{ . }}"
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
@@ -139,27 +146,39 @@ spec:
|
|||||||
securityContext:
|
securityContext:
|
||||||
runAsUser: 101
|
runAsUser: 101
|
||||||
image: "{{ .Values.site.image }}"
|
image: "{{ .Values.site.image }}"
|
||||||
imagePullPolicy: IfNotPresent
|
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.local.active }}
|
|
||||||
{{- range .Values.storage.folders }}
|
|
||||||
- name: local
|
|
||||||
mountPath: "/app/web/app/{{ . }}"
|
|
||||||
subPath: "{{ . }}"
|
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.storage.cloud.active }}
|
{{- if .Values.storage.cloud.active }}
|
||||||
- name: cloud
|
- name: cloud
|
||||||
mountPath: "/mnt/cloud"
|
mountPath: "/mnt/cloud"
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- if .Values.storage.local.active }}
|
||||||
|
{{- range .Values.storage.folders }}
|
||||||
|
{{- if or ( eq . "certificates" ) ( eq . "secrets" ) }}
|
||||||
|
- name: local
|
||||||
|
mountPath: "/app/{{ . }}"
|
||||||
|
subPath: "{{ . }}"
|
||||||
|
{{- else }}
|
||||||
|
- name: local
|
||||||
|
mountPath: "/app/web/app/{{ . }}"
|
||||||
|
subPath: "{{ . }}"
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
{{- if .Values.storage.cloud.active }}
|
{{- if .Values.storage.cloud.active }}
|
||||||
{{- range .Values.storage.folders }}
|
{{- range .Values.storage.folders }}
|
||||||
|
{{- if or ( eq . "certificates" ) ( eq . "secrets" ) }}
|
||||||
|
- name: cloud
|
||||||
|
mountPath: "/app/{{ . }}"
|
||||||
|
subPath: "{{ . }}"
|
||||||
|
{{- else }}
|
||||||
- name: cloud
|
- name: cloud
|
||||||
mountPath: "/app/web/app/{{ . }}"
|
mountPath: "/app/web/app/{{ . }}"
|
||||||
subPath: "{{ . }}"
|
subPath: "{{ . }}"
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -1,14 +1,17 @@
|
|||||||
|
#dev-newchart
|
||||||
{{- if .Values.init.asJob }}
|
{{- if .Values.init.asJob }}
|
||||||
apiVersion: batch/v1
|
apiVersion: batch/v1
|
||||||
kind: Job
|
kind: Job
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ include "..fullname" . }}-wpc-reg
|
name: {{ include "..fullname" . }}-initializer
|
||||||
labels:
|
labels:
|
||||||
{{- include "..labels" . | nindent 4 }}
|
{{- include "..labels" . | nindent 4 }}
|
||||||
cloudyne.systems/component: site-init
|
cloudyne.systems/component: site-init
|
||||||
spec:
|
spec:
|
||||||
|
backoffLimit: 2
|
||||||
template:
|
template:
|
||||||
spec:
|
spec:
|
||||||
|
restartPolicy: "OnFailure"
|
||||||
affinity: {{ include "..affinity-labels" . | nindent 8 }}
|
affinity: {{ include "..affinity-labels" . | nindent 8 }}
|
||||||
securityContext:
|
securityContext:
|
||||||
fsGroup: 101
|
fsGroup: 101
|
||||||
@@ -86,21 +89,21 @@ spec:
|
|||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
runAsUser: 0
|
runAsUser: 0
|
||||||
image: "{{ .Values.site.image }}"
|
image: "{{ .Values.site.image }}"
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: IfNotPresent
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: serverconfig
|
- name: serverconfig
|
||||||
mountPath: /init-go/config.json
|
mountPath: /init-go/config.json
|
||||||
subPath: init.json
|
subPath: init.json
|
||||||
|
{{- if .Values.storage.cloud.active }}
|
||||||
|
- name: cloud
|
||||||
|
mountPath: "/mnt/cloud"
|
||||||
|
{{- end }}
|
||||||
{{- if .Values.storage.local.active }}
|
{{- if .Values.storage.local.active }}
|
||||||
{{- range .Values.storage.folders }}
|
{{- range .Values.storage.folders }}
|
||||||
- name: local
|
- name: local
|
||||||
mountPath: "/app/web/app/{{ . }}"
|
mountPath: "/app/web/app/{{ . }}"
|
||||||
subPath: "{{ . }}"
|
subPath: "{{ . }}"
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.storage.cloud.active }}
|
|
||||||
- name: cloud
|
|
||||||
mountPath: "/mnt/cloud"
|
|
||||||
{{- end }}
|
|
||||||
{{- else }}
|
{{- else }}
|
||||||
{{- if .Values.storage.cloud.active }}
|
{{- if .Values.storage.cloud.active }}
|
||||||
{{- range .Values.storage.folders }}
|
{{- range .Values.storage.folders }}
|
||||||
|
|||||||
@@ -81,12 +81,12 @@ secrets:
|
|||||||
|
|
||||||
storage:
|
storage:
|
||||||
kubernetes:
|
kubernetes:
|
||||||
- name: "pull-secret"
|
# - name: "pull-secret"
|
||||||
type: "secret"
|
# type: "secret"
|
||||||
files:
|
# files:
|
||||||
- name: .dockerconfigjson
|
# - name: .dockerconfigjson
|
||||||
content: |
|
# content: |
|
||||||
{"auths":{"ghcr.io":{"username":"ghcr.io","password":"ghcr.io","auth":"ghcr.io"}}}
|
# {"auths":{"ghcr.io":{"username":"ghcr.io","password":"ghcr.io","auth":"ghcr.io"}}}
|
||||||
# - name: "secret01"
|
# - name: "secret01"
|
||||||
# type: "secret"
|
# type: "secret"
|
||||||
# files:
|
# files:
|
||||||
@@ -140,6 +140,17 @@ init:
|
|||||||
# url: "https://url.to/content.zip"
|
# url: "https://url.to/content.zip"
|
||||||
|
|
||||||
email:
|
email:
|
||||||
|
relay:
|
||||||
|
enabled: false
|
||||||
|
relayName: "smtp-relay"
|
||||||
|
relayHost: "relay.domain.com"
|
||||||
|
relayPort: 2525
|
||||||
|
# Generate automatically
|
||||||
|
# relayUser: "relayuser"
|
||||||
|
# relayPassword: "relaypassword"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
smtpHost: ""
|
smtpHost: ""
|
||||||
smtpPort: ""
|
smtpPort: ""
|
||||||
smtpAuth: false
|
smtpAuth: false
|
||||||
|
|||||||
Reference in New Issue
Block a user