Compare commits

...

10 Commits

Author SHA1 Message Date
4d44f56679 Updated 2024-01-06 11:03:31 +01:00
721dc409ad Update .gitlab-ci.yml 2023-10-30 23:47:38 +01:00
0ada9155eb Parameterize webp conversion 2023-10-30 23:44:39 +01:00
5129be3fc8 Swap imagepullpolicy to always 2023-10-05 18:27:07 +02:00
f70afe5523 Restore webp conversion for init running as job 2023-09-23 18:26:16 +00:00
d6292ca4b0 Fixed labels 2023-09-23 13:41:10 +00:00
c514a76b5e Added restart policy to job 2023-09-23 13:28:50 +00:00
6287a199b8 Added topology key 2023-09-23 13:26:34 +00:00
d884c6cb2b Fixed selector 2023-09-23 13:25:04 +00:00
b7e034847e Fixed topology selector 2023-09-23 13:23:44 +00:00
7 changed files with 58 additions and 24 deletions

View File

@@ -0,0 +1,24 @@
name: Upload Helm Chart
run-name: Uploading helm chart
on: [push]
jobs:
Explore-Gitea-Actions:
runs-on: ubuntu-latest
env:
HELM_CHART_VERSION: "1.0.24"
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
- run: echo ${{ secrets.GITEA_TOKEN }}
- name: Upload Helm Chart
run: |
curl --request POST \
-H "Authorization: Bearer ${{ secrets.GITEA_TOKEN }}" \
--form "chart=@wordyne-${HELM_CHART_VERSION}.tgz" \
https://git.cloudyne.io/api/packages/helm/helm/charts

View File

@@ -1,5 +1,5 @@
variables:
HELM_CHART_VERSION: "1.0.16"
HELM_CHART_VERSION: "1.0.24"
stages:
- deploy
@@ -9,9 +9,7 @@ default:
name: cloudyne/kubectl-helm:latest
entrypoint: [""]
tags:
- build01
- helm
- chartbuild
- shell
deploy:
stage: deploy

View File

@@ -2,5 +2,5 @@ apiVersion: v2
name: wordyne
description: Helm chart for deploying pre-built website containers to kubernetes clusters
type: application
version: "99.6.29"
version: "1.0.24"
appVersion: "6.2.2"

View File

@@ -48,25 +48,25 @@ 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/customer-legal-id: '{{ .Values.customer.legalId }}'
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:
- cloudyne.systems/site: {{ .Values.site.domain | quote }}
- key: cloudyne.systems/component
operator: In
values:
- "site"
- 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 }}

View File

@@ -69,7 +69,16 @@ data:
"overwriteDatabase": {{ .Values.init.db.overwrite | default false }},
"generateSalts": true,
"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 }},
{{- end }}
{{- if and .Values.storage.cloud.active .Values.storage.local.active }}
"backupToCloud": true,
{{- else }}
"backupToCloud": false,
{{- end }}
"convertMissingOnly": true
}

View File

@@ -4,7 +4,6 @@ metadata:
name: {{ include "..fullname" . }}
labels:
{{- include "..labels" . | nindent 4 }}
cloudyne.systems/component: site
spec:
{{- if .Values.site.resources }}
replicas: {{ .Values.site.resources.replicas | default 1 }}
@@ -12,10 +11,12 @@ spec:
replicas: 1
{{- end }}
selector:
matchLabels: {{- include "..selector-labels" . | nindent 6 }}
matchLabels:
{{- include "..selector-labels" . | nindent 6 }}
template:
metadata:
labels: {{- include "..selector-labels" . | nindent 8 }}
labels:
{{- include "..selector-labels" . | nindent 8 }}
spec:
securityContext:
fsGroup: 101
@@ -139,7 +140,7 @@ spec:
securityContext:
runAsUser: 101
image: "{{ .Values.site.image }}"
imagePullPolicy: IfNotPresent
imagePullPolicy: Always
volumeMounts:
- name: serverconfig
mountPath: /docker-entrypoint.d/unit.json

View File

@@ -2,13 +2,15 @@
apiVersion: batch/v1
kind: Job
metadata:
name: {{ include "..fullname" . }}-wpc-reg
name: {{ include "..fullname" . }}-initializer
labels:
{{- include "..labels" . | nindent 4 }}
cloudyne.systems/component: site-init
spec:
backoffLimit: 2
template:
spec:
restartPolicy: "OnFailure"
affinity: {{ include "..affinity-labels" . | nindent 8 }}
securityContext:
fsGroup: 101
@@ -86,7 +88,7 @@ spec:
allowPrivilegeEscalation: false
runAsUser: 0
image: "{{ .Values.site.image }}"
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
volumeMounts:
- name: serverconfig
mountPath: /init-go/config.json