Created chart and CI/CD
This commit is contained in:
22
.gitlab-ci.yml
Normal file
22
.gitlab-ci.yml
Normal 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"'
|
||||||
@@ -2,5 +2,5 @@ apiVersion: v2
|
|||||||
name: cloudypress
|
name: cloudypress
|
||||||
description: A helm chart for deploying Wordpress on Cloudyne Hosting
|
description: A helm chart for deploying Wordpress on Cloudyne Hosting
|
||||||
type: application
|
type: application
|
||||||
version: 0.1.5
|
version: "0.5.0"
|
||||||
appVersion: "6.1.1"
|
appVersion: "6.1.1"
|
||||||
@@ -10,8 +10,11 @@ data:
|
|||||||
SMTP_FORCE_FROM: "noreply@customer.v3.nu"
|
SMTP_FORCE_FROM: "noreply@customer.v3.nu"
|
||||||
SMTP_FROM_NAME: "V3 Customer Mailer"
|
SMTP_FROM_NAME: "V3 Customer Mailer"
|
||||||
WP_ENV: "production"
|
WP_ENV: "production"
|
||||||
WP_HOME: {{ .Values.site.url }}
|
{{- if .Values.site.overrideMainUrl }}
|
||||||
WP_SITEURL: {{ .Values.site.url }}/wp
|
WP_HOME: "https://{{ .Values.site.overrideMainUrl }}"
|
||||||
|
{{- else }}
|
||||||
|
WP_HOME: "https://{{ .Values.site.url }}"
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
{{- if and .Values.site.init .Values.site.init.composerPackage }}
|
{{- if and .Values.site.init .Values.site.init.composerPackage }}
|
||||||
RUN_COMPOSER: 'true'
|
RUN_COMPOSER: 'true'
|
||||||
@@ -59,13 +59,13 @@ spec:
|
|||||||
- secretRef:
|
- secretRef:
|
||||||
name: {{ include "..fullname" . }}-db-auth
|
name: {{ include "..fullname" . }}-db-auth
|
||||||
- secretRef:
|
- secretRef:
|
||||||
name: global-secrets-ext
|
name: global-secrets
|
||||||
containers:
|
containers:
|
||||||
- name: wordpress
|
- name: wordpress
|
||||||
securityContext:
|
securityContext:
|
||||||
runAsUser: 65534
|
runAsUser: 65534
|
||||||
{{- if .Values.global }}
|
{{- 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 }}
|
{{- else }}
|
||||||
image: ghcr.io/cloudynes/php-nginx:latest
|
image: ghcr.io/cloudynes/php-nginx:latest
|
||||||
{{- end }}
|
{{- end }}
|
||||||
@@ -78,6 +78,7 @@ spec:
|
|||||||
subPath: nginx.conf
|
subPath: nginx.conf
|
||||||
- name: serverconfig
|
- name: serverconfig
|
||||||
mountPath: /usr/local/etc/php-fpm.d/www.conf
|
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 }}
|
{{- if and .Values.site .Values.site.storage .Values.site.storage.cloud .Values.site.storage.cloud.folders }}
|
||||||
{{- range $v := .Values.site.storage.cloud.folders }}
|
{{- range $v := .Values.site.storage.cloud.folders }}
|
||||||
- name: cloud
|
- name: cloud
|
||||||
@@ -91,7 +92,7 @@ spec:
|
|||||||
- secretRef:
|
- secretRef:
|
||||||
name: {{ include "..fullname" . }}-db-auth
|
name: {{ include "..fullname" . }}-db-auth
|
||||||
- secretRef:
|
- secretRef:
|
||||||
name: global-secrets-ext
|
name: global-secrets
|
||||||
resources:
|
resources:
|
||||||
{{- if and .Values.customer .Values.customer.package .Values.customer.package.cpu }}
|
{{- if and .Values.customer .Values.customer.package .Values.customer.package.cpu }}
|
||||||
requests:
|
requests:
|
||||||
@@ -17,8 +17,8 @@ spec:
|
|||||||
volumeAttributes:
|
volumeAttributes:
|
||||||
containername: {{ .Values.site.storage.cloud.container }}
|
containername: {{ .Values.site.storage.cloud.container }}
|
||||||
csi.storage.k8s.io/pv/name: pv-{{ include "..fullname" . }}
|
csi.storage.k8s.io/pv/name: pv-{{ include "..fullname" . }}
|
||||||
csi.storage.k8s.io/pvc/namespace: {{ .Values.customer.name }}
|
csi.storage.k8s.io/pvc/namespace: {{ include "..fullname" . }}
|
||||||
secretnamespace: {{ .Values.customer.name }}
|
secretnamespace: {{ include "..fullname" . }}
|
||||||
skuName: {{ .Values.site.storage.cloud.type }}
|
skuName: {{ .Values.site.storage.cloud.type }}
|
||||||
volumeHandle: {{ .Values.site.storage.cloud.class }}-retain_{{ include "..fullname" . }}
|
volumeHandle: {{ .Values.site.storage.cloud.class }}-retain_{{ include "..fullname" . }}
|
||||||
mountOptions:
|
mountOptions:
|
||||||
@@ -9,11 +9,14 @@ metadata:
|
|||||||
{{- include "..labels" . | nindent 8 }}
|
{{- include "..labels" . | nindent 8 }}
|
||||||
name: pvc-{{ include "..fullname" . }}
|
name: pvc-{{ include "..fullname" . }}
|
||||||
spec:
|
spec:
|
||||||
|
volumeMode: Filesystem
|
||||||
|
volumeName: pv-{{ include "..fullname" . }}
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteOnce
|
- ReadWriteOnce
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
storage: {{ .Values.customer.package.disk }}
|
storage: {{ .Values.customer.package.disk }}
|
||||||
|
|
||||||
|
{{- if and .Values.site .Values.site.storage .Values.site.storage.cloud }}
|
||||||
storageClassName: {{ .Values.site.storage.cloud.class }}-retain
|
storageClassName: {{ .Values.site.storage.cloud.class }}-retain
|
||||||
volumeMode: Filesystem
|
{{- end }}
|
||||||
volumeName: pv-{{ include "..fullname" . }}
|
|
||||||
@@ -95,7 +95,7 @@ global:
|
|||||||
initImage: ghcr.io/cloudynes/php-init
|
initImage: ghcr.io/cloudynes/php-init
|
||||||
|
|
||||||
# The tag to use for the above images
|
# The tag to use for the above images
|
||||||
imageTag: latest
|
imageTag: fpm8.0-alpine3.16
|
||||||
|
|
||||||
# The database instance where the database will be provisioned
|
# The database instance where the database will be provisioned
|
||||||
dbInstance: "kincaid"
|
dbInstance: "kincaid"
|
||||||
BIN
cloudypress-0.5.0.tgz
Normal file
BIN
cloudypress-0.5.0.tgz
Normal file
Binary file not shown.
Reference in New Issue
Block a user