Created chart and CI/CD

This commit is contained in:
2023-03-19 22:43:41 +00:00
parent 9f91f4efe5
commit 520bfbb549
19 changed files with 40 additions and 11 deletions

22
.gitlab-ci.yml Normal file
View File

@@ -0,0 +1,22 @@
variables:
HELM_CHART_VERSION: "0.5.1"
stages:
- deploy
default:
image: cloudyne/kubectl-helm:latest
tags:
- kubernetes
- cluster01
deploy:
stage: deploy
script:
- 'sed -i "s/version:.*/version: ${HELM_CHART_VERSION}/"'
- helm package ./Chart
- |
curl --request POST \
--user gitlab-ci-token:$CI_JOB_TOKEN \
--form "chart=@cloudypress-${HELM_CHART_VERSION}.tgz" \
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/helm/api/stable/charts"'

View File

@@ -2,5 +2,5 @@ apiVersion: v2
name: cloudypress
description: A helm chart for deploying Wordpress on Cloudyne Hosting
type: application
version: 0.1.5
version: "0.5.0"
appVersion: "6.1.1"

View File

@@ -10,8 +10,11 @@ data:
SMTP_FORCE_FROM: "noreply@customer.v3.nu"
SMTP_FROM_NAME: "V3 Customer Mailer"
WP_ENV: "production"
WP_HOME: {{ .Values.site.url }}
WP_SITEURL: {{ .Values.site.url }}/wp
{{- if .Values.site.overrideMainUrl }}
WP_HOME: "https://{{ .Values.site.overrideMainUrl }}"
{{- else }}
WP_HOME: "https://{{ .Values.site.url }}"
{{- end }}
{{- if and .Values.site.init .Values.site.init.composerPackage }}
RUN_COMPOSER: 'true'

View File

@@ -59,13 +59,13 @@ spec:
- secretRef:
name: {{ include "..fullname" . }}-db-auth
- secretRef:
name: global-secrets-ext
name: global-secrets
containers:
- name: wordpress
securityContext:
runAsUser: 65534
{{- if .Values.global }}
image: {{ .Values.global.initImage | default "ghcr.io/cloudynes/php-nginx" }}:{{ .Values.global.imagetag | default "latest" }}
image: {{ .Values.global.serverImage | default "ghcr.io/cloudynes/php-nginx" }}:{{ .Values.global.imagetag | default "latest" }}
{{- else }}
image: ghcr.io/cloudynes/php-nginx:latest
{{- end }}
@@ -78,6 +78,7 @@ spec:
subPath: nginx.conf
- name: serverconfig
mountPath: /usr/local/etc/php-fpm.d/www.conf
subPath: www.conf
{{- if and .Values.site .Values.site.storage .Values.site.storage.cloud .Values.site.storage.cloud.folders }}
{{- range $v := .Values.site.storage.cloud.folders }}
- name: cloud
@@ -91,7 +92,7 @@ spec:
- secretRef:
name: {{ include "..fullname" . }}-db-auth
- secretRef:
name: global-secrets-ext
name: global-secrets
resources:
{{- if and .Values.customer .Values.customer.package .Values.customer.package.cpu }}
requests:

View File

@@ -17,8 +17,8 @@ spec:
volumeAttributes:
containername: {{ .Values.site.storage.cloud.container }}
csi.storage.k8s.io/pv/name: pv-{{ include "..fullname" . }}
csi.storage.k8s.io/pvc/namespace: {{ .Values.customer.name }}
secretnamespace: {{ .Values.customer.name }}
csi.storage.k8s.io/pvc/namespace: {{ include "..fullname" . }}
secretnamespace: {{ include "..fullname" . }}
skuName: {{ .Values.site.storage.cloud.type }}
volumeHandle: {{ .Values.site.storage.cloud.class }}-retain_{{ include "..fullname" . }}
mountOptions:

View File

@@ -9,11 +9,14 @@ metadata:
{{- include "..labels" . | nindent 8 }}
name: pvc-{{ include "..fullname" . }}
spec:
volumeMode: Filesystem
volumeName: pv-{{ include "..fullname" . }}
accessModes:
- ReadWriteOnce
resources:
requests:
storage: {{ .Values.customer.package.disk }}
{{- if and .Values.site .Values.site.storage .Values.site.storage.cloud }}
storageClassName: {{ .Values.site.storage.cloud.class }}-retain
volumeMode: Filesystem
volumeName: pv-{{ include "..fullname" . }}
{{- end }}

View File

@@ -95,7 +95,7 @@ global:
initImage: ghcr.io/cloudynes/php-init
# The tag to use for the above images
imageTag: latest
imageTag: fpm8.0-alpine3.16
# The database instance where the database will be provisioned
dbInstance: "kincaid"

BIN
cloudypress-0.5.0.tgz Normal file

Binary file not shown.