Compare commits
13 Commits
cbb973550c
...
1.0.25
| Author | SHA1 | Date | |
|---|---|---|---|
| 596c4102ed | |||
| d862f7c132 | |||
| 7cbab35102 | |||
| 721dc409ad | |||
| 0ada9155eb | |||
| 5129be3fc8 | |||
| f70afe5523 | |||
| d6292ca4b0 | |||
| c514a76b5e | |||
| 6287a199b8 | |||
| d884c6cb2b | |||
| b7e034847e | |||
| 8b85ba35fa |
25
.gitea/workflows/upload-helm.yml
Normal file
25
.gitea/workflows/upload-helm.yml
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
name: Upload Helm Chart
|
||||||
|
run-name: Uploading helm chart
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags: ['*']
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
Explore-Gitea-Actions:
|
||||||
|
runs-on: shell
|
||||||
|
env:
|
||||||
|
HELM_CHART_VERSION: "${{ github.ref_name }}"
|
||||||
|
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 --request POST \
|
||||||
|
--user ${{ secrets.HELM_PKG_UPLOAD_USER }}:${{ secrets.HELM_PKG_UPLOAD_PASS }} \
|
||||||
|
--form "chart=@wordyne-${HELM_CHART_VERSION}.tgz" \
|
||||||
|
https://git.cloudyne.io/api/packages/helm/helm/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.24"
|
||||||
appVersion: "6.2.2"
|
appVersion: "6.2.2"
|
||||||
|
|||||||
@@ -48,8 +48,8 @@ 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:
|
||||||
@@ -63,7 +63,7 @@ podAffinity:
|
|||||||
- 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:
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -139,7 +140,7 @@ 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
|
||||||
|
|||||||
@@ -1,129 +0,0 @@
|
|||||||
{{- if .Values.init.asJob }}
|
|
||||||
apiVersion: batch/v1
|
|
||||||
kind: Job
|
|
||||||
metadata:
|
|
||||||
name: {{ include "..fullname" . }}-wpc-reg
|
|
||||||
labels:
|
|
||||||
{{- include "..labels" . | nindent 4 }}
|
|
||||||
cloudyne.systems/component: site-init
|
|
||||||
spec:
|
|
||||||
template:
|
|
||||||
spec:
|
|
||||||
affinity: {{ include "..affinity-labels" . | nindent 8 }}
|
|
||||||
securityContext:
|
|
||||||
fsGroup: 101
|
|
||||||
volumes:
|
|
||||||
- name: serverconfig
|
|
||||||
configMap:
|
|
||||||
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:
|
|
||||||
- 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 and .Values.storage.cloud.active .Values.storage.local.active .Values.storage.local.cloneCloud }}
|
|
||||||
initContainers:
|
|
||||||
- name: init-local-storage
|
|
||||||
securityContext:
|
|
||||||
allowPrivilegeEscalation: false
|
|
||||||
runAsUser: 0
|
|
||||||
image: cloudyne/ubuntu-ci:latest
|
|
||||||
command: ["python3"]
|
|
||||||
args: ["/usr/local/bin/storage-clone", "/mnt/cloud", "/mnt/local"]
|
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
volumeMounts:
|
|
||||||
- name: cloud
|
|
||||||
mountPath: /mnt/cloud
|
|
||||||
- name: local
|
|
||||||
mountPath: /mnt/local
|
|
||||||
{{- end }}
|
|
||||||
containers:
|
|
||||||
- name: init-site
|
|
||||||
securityContext:
|
|
||||||
allowPrivilegeEscalation: false
|
|
||||||
runAsUser: 0
|
|
||||||
image: "{{ .Values.site.image }}"
|
|
||||||
imagePullPolicy: Always
|
|
||||||
volumeMounts:
|
|
||||||
- name: serverconfig
|
|
||||||
mountPath: /init-go/config.json
|
|
||||||
subPath: init.json
|
|
||||||
{{- if .Values.storage.local.active }}
|
|
||||||
{{- range .Values.storage.folders }}
|
|
||||||
- name: local
|
|
||||||
mountPath: "/app/web/app/{{ . }}"
|
|
||||||
subPath: "{{ . }}"
|
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.storage.cloud.active }}
|
|
||||||
- name: cloud
|
|
||||||
mountPath: "/mnt/cloud"
|
|
||||||
{{- end }}
|
|
||||||
{{- else }}
|
|
||||||
{{- if .Values.storage.cloud.active }}
|
|
||||||
{{- range .Values.storage.folders }}
|
|
||||||
- name: cloud
|
|
||||||
mountPath: "/app/web/app/{{ . }}"
|
|
||||||
subPath: "{{ . }}"
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
envFrom:
|
|
||||||
- configMapRef:
|
|
||||||
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:
|
|
||||||
name: {{ include "..fullname" . }}-db-auth
|
|
||||||
command: ["sh"]
|
|
||||||
args: ["-c", "/init-go/init-go"]
|
|
||||||
{{- end }}
|
|
||||||
Reference in New Issue
Block a user