Compare commits
24 Commits
| 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 | |||
| 4d44f56679 |
@@ -1,14 +1,12 @@
|
||||
name: Upload Helm Chart
|
||||
run-name: Uploading helm chart
|
||||
on:
|
||||
push:
|
||||
tags: ['*']
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
Explore-Gitea-Actions:
|
||||
runs-on: shell
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
HELM_CHART_VERSION: "${{ github.ref_name }}"
|
||||
HELM_CHART_VERSION: "1.1.2"
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Helm
|
||||
@@ -19,7 +17,7 @@ jobs:
|
||||
- run: helm package ./Chart
|
||||
- name: Upload Helm Chart
|
||||
run: |
|
||||
curl --request POST \
|
||||
curl -ki -X 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
|
||||
--upload-file "wordyne-${HELM_CHART_VERSION}.tgz" \
|
||||
https://helm.cloudyne.io/api/charts
|
||||
|
||||
@@ -2,5 +2,5 @@ apiVersion: v2
|
||||
name: wordyne
|
||||
description: Helm chart for deploying pre-built website containers to kubernetes clusters
|
||||
type: application
|
||||
version: "1.0.24"
|
||||
version: "1.0.27"
|
||||
appVersion: "6.2.2"
|
||||
|
||||
@@ -99,23 +99,29 @@ spec:
|
||||
- name: serverconfig
|
||||
mountPath: /init-go/config.json
|
||||
subPath: init.json
|
||||
{{- if .Values.storage.cloud.active }}
|
||||
- name: cloud
|
||||
mountPath: "/mnt/cloud"
|
||||
{{- end }}
|
||||
{{- 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 }}
|
||||
{{- if or ( eq . "certificates" ) ( eq . "secrets" ) }}
|
||||
- name: local
|
||||
mountPath: "/app/{{ . }}"
|
||||
subPath: "{{ . }}"
|
||||
{{- else }}
|
||||
- name: cloud
|
||||
mountPath: "/app/web/app/{{ . }}"
|
||||
subPath: "{{ . }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
@@ -145,22 +151,34 @@ spec:
|
||||
- name: serverconfig
|
||||
mountPath: /docker-entrypoint.d/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 }}
|
||||
- name: cloud
|
||||
mountPath: "/mnt/cloud"
|
||||
{{- 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 }}
|
||||
{{- if .Values.storage.cloud.active }}
|
||||
{{- range .Values.storage.folders }}
|
||||
{{- if or ( eq . "certificates" ) ( eq . "secrets" ) }}
|
||||
- name: cloud
|
||||
mountPath: "/app/{{ . }}"
|
||||
subPath: "{{ . }}"
|
||||
{{- else }}
|
||||
- name: cloud
|
||||
mountPath: "/app/web/app/{{ . }}"
|
||||
subPath: "{{ . }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
132
Chart/templates/job.yaml
Normal file
132
Chart/templates/job.yaml
Normal file
@@ -0,0 +1,132 @@
|
||||
#dev-newchart
|
||||
{{- if .Values.init.asJob }}
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
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
|
||||
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: IfNotPresent
|
||||
volumeMounts:
|
||||
- name: serverconfig
|
||||
mountPath: /init-go/config.json
|
||||
subPath: init.json
|
||||
{{- if .Values.storage.cloud.active }}
|
||||
- name: cloud
|
||||
mountPath: "/mnt/cloud"
|
||||
{{- end }}
|
||||
{{- if .Values.storage.local.active }}
|
||||
{{- range .Values.storage.folders }}
|
||||
- name: local
|
||||
mountPath: "/app/web/app/{{ . }}"
|
||||
subPath: "{{ . }}"
|
||||
{{- 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 }}
|
||||
@@ -81,12 +81,12 @@ secrets:
|
||||
|
||||
storage:
|
||||
kubernetes:
|
||||
- name: "pull-secret"
|
||||
type: "secret"
|
||||
files:
|
||||
- name: .dockerconfigjson
|
||||
content: |
|
||||
{"auths":{"ghcr.io":{"username":"ghcr.io","password":"ghcr.io","auth":"ghcr.io"}}}
|
||||
# - name: "pull-secret"
|
||||
# type: "secret"
|
||||
# files:
|
||||
# - name: .dockerconfigjson
|
||||
# content: |
|
||||
# {"auths":{"ghcr.io":{"username":"ghcr.io","password":"ghcr.io","auth":"ghcr.io"}}}
|
||||
# - name: "secret01"
|
||||
# type: "secret"
|
||||
# files:
|
||||
@@ -140,6 +140,17 @@ init:
|
||||
# url: "https://url.to/content.zip"
|
||||
|
||||
email:
|
||||
relay:
|
||||
enabled: false
|
||||
relayName: "smtp-relay"
|
||||
relayHost: "relay.domain.com"
|
||||
relayPort: 2525
|
||||
# Generate automatically
|
||||
# relayUser: "relayuser"
|
||||
# relayPassword: "relaypassword"
|
||||
|
||||
|
||||
|
||||
smtpHost: ""
|
||||
smtpPort: ""
|
||||
smtpAuth: false
|
||||
|
||||
Reference in New Issue
Block a user