mirror of
https://github.com/lordmathis/dev-cluster.git
synced 2025-12-22 16:44:24 +00:00
Migrate ghost from helm to manifests
This commit is contained in:
35
apps/base/ghost/deployment.yaml
Normal file
35
apps/base/ghost/deployment.yaml
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: ghost
|
||||||
|
namespace: ghost
|
||||||
|
labels:
|
||||||
|
app: ghost
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: ghost
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: ghost
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: ghost
|
||||||
|
image: ghost:5-alpine
|
||||||
|
ports:
|
||||||
|
- containerPort: 2368
|
||||||
|
name: http
|
||||||
|
env:
|
||||||
|
- name: database__client
|
||||||
|
value: sqlite3
|
||||||
|
- name: NODE_ENV
|
||||||
|
value: production
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 500m
|
||||||
|
memory: 512Mi
|
||||||
|
requests:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 256Mi
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
# /apps/base/ghost/repository.yaml
|
|
||||||
apiVersion: source.toolkit.fluxcd.io/v1
|
|
||||||
kind: HelmRepository
|
|
||||||
metadata:
|
|
||||||
name: bitnami
|
|
||||||
namespace: ghost
|
|
||||||
spec:
|
|
||||||
interval: 24h
|
|
||||||
type: oci
|
|
||||||
url: oci://registry-1.docker.io/bitnamicharts
|
|
||||||
15
apps/base/ghost/service.yaml
Normal file
15
apps/base/ghost/service.yaml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: ghost
|
||||||
|
namespace: ghost
|
||||||
|
labels:
|
||||||
|
app: ghost
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: ghost
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
targetPort: 2368
|
||||||
|
name: http
|
||||||
|
type: ClusterIP
|
||||||
20
apps/prod/ghost/deployment-patch.yaml
Normal file
20
apps/prod/ghost/deployment-patch.yaml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: ghost
|
||||||
|
namespace: ghost
|
||||||
|
spec:
|
||||||
|
template:
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: ghost
|
||||||
|
env:
|
||||||
|
- name: url
|
||||||
|
value: https://${GHOST_URL}
|
||||||
|
volumeMounts:
|
||||||
|
- name: ghost-content
|
||||||
|
mountPath: /var/lib/ghost/content
|
||||||
|
volumes:
|
||||||
|
- name: ghost-content
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: ghost-content
|
||||||
@@ -1,19 +1,14 @@
|
|||||||
# /apps/prod/ghost/kustomization.yaml
|
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
namespace: ghost
|
namespace: ghost
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
- ../../base/ghost
|
- ../../base/ghost
|
||||||
- release.yaml
|
- pvc.yaml
|
||||||
- ingress.yaml
|
- ingress.yaml
|
||||||
- secret.enc.yaml
|
|
||||||
|
|
||||||
configMapGenerator:
|
patchesStrategicMerge:
|
||||||
- name: ghost-prod-values
|
- deployment-patch.yaml
|
||||||
namespace: ghost
|
|
||||||
files:
|
|
||||||
- values.yaml
|
|
||||||
|
|
||||||
configurations:
|
configurations:
|
||||||
- kustomizeconfig.yaml
|
- kustomizeconfig.yaml
|
||||||
12
apps/prod/ghost/pvc.yaml
Normal file
12
apps/prod/ghost/pvc.yaml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: ghost-content
|
||||||
|
namespace: ghost
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
storageClassName: retain-local-path
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 5Gi
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
|
||||||
kind: HelmRelease
|
|
||||||
metadata:
|
|
||||||
name: ghost
|
|
||||||
namespace: ghost
|
|
||||||
spec:
|
|
||||||
interval: 1h
|
|
||||||
chart:
|
|
||||||
spec:
|
|
||||||
chart: ghost
|
|
||||||
version: "22.2.3"
|
|
||||||
sourceRef:
|
|
||||||
kind: HelmRepository
|
|
||||||
name: bitnami
|
|
||||||
namespace: ghost
|
|
||||||
interval: 1h
|
|
||||||
valuesFrom:
|
|
||||||
- kind: ConfigMap
|
|
||||||
name: ghost-prod-values
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Secret
|
|
||||||
metadata:
|
|
||||||
name: ghost-admin-secret
|
|
||||||
namespace: ghost
|
|
||||||
type: Opaque
|
|
||||||
stringData:
|
|
||||||
ghost-password: ENC[AES256_GCM,data:UfT+Is1grMWVhQOl2ew7etgE,iv:fDiZ4re4odMYd2LJk90qwqdMvr9+oH0fW7SZiEjE6TU=,tag:qbREC2IScRYq6Y9lk4C5EA==,type:str]
|
|
||||||
sops:
|
|
||||||
kms: []
|
|
||||||
gcp_kms: []
|
|
||||||
azure_kv: []
|
|
||||||
hc_vault: []
|
|
||||||
age:
|
|
||||||
- recipient: age1jk99rtxq3ep2xj2w886cchddf7jypqpwkr3dszg5dzq93gn8cy9qyc786m
|
|
||||||
enc: |
|
|
||||||
-----BEGIN AGE ENCRYPTED FILE-----
|
|
||||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBvd0VQMmJYVFp4bVBYWTZh
|
|
||||||
RmlGQXE5YlBZZjVFYlJERFR1Q3B5U2tncDBVCkVvczlzakJFN3o2UGFiLzZaN2pL
|
|
||||||
RVRYTUpOYTdpNUFNVWhldFVucVBwNXMKLS0tIHRNUVpnSkpVeHV6L0FaOFZVdW8v
|
|
||||||
ZGs3Y2dkZEtmTG9GbVRoMzJoTFJpaHMKENlCAd/B6HLlL2NlRXx64JqoJYuxNQwj
|
|
||||||
KRGmUNbjDIjFQym/8LI6XbIW1WgrWa/6pVdzkUOjjTXe6V9BijFGhw==
|
|
||||||
-----END AGE ENCRYPTED FILE-----
|
|
||||||
lastmodified: "2025-03-23T15:09:57Z"
|
|
||||||
mac: ENC[AES256_GCM,data:Xy351DGdecmgyDrNR9QUMj5QXlqnm4icdJix0zyiX8THO8cojHj7g5qfrXLuQbN6G5zMVW0b6YgDiSeaXvSFje1tHNZd4cCmq3BO4A0MTAUufau6n50nWFlWaMecny4JIPYS+kJe6FUq68mCv/aaDMWPOf3jZDfPYb5KUVqat80=,iv:aLphC2N5vkBB9Ma5NafpP6dyHD5rM3Z6aI+g1sJ5KNM=,tag:yFslBcL/oKWwdWG2ZWeBrA==,type:str]
|
|
||||||
pgp: []
|
|
||||||
unencrypted_regex: ^(apiVersion|metadata|kind|type)$
|
|
||||||
version: 3.9.4
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
mysql:
|
|
||||||
enabled: false
|
|
||||||
postgresql:
|
|
||||||
enabled: false
|
|
||||||
|
|
||||||
persistence:
|
|
||||||
enabled: true
|
|
||||||
storageClass: "retain-local-path"
|
|
||||||
size: 8Gi
|
|
||||||
|
|
||||||
ghostHost: "${GHOST_DOMAIN}"
|
|
||||||
ghostUsername: admin
|
|
||||||
existingSecret: "ghost-admin-secret"
|
|
||||||
ghostEmail: "${GHOST_ADMIN_EMAIL}"
|
|
||||||
ghostBlogTitle: ""
|
|
||||||
|
|
||||||
service:
|
|
||||||
type: ClusterIP
|
|
||||||
|
|
||||||
extraEnvVars:
|
|
||||||
- name: database__client
|
|
||||||
value: sqlite3
|
|
||||||
- name: NODE_ENV
|
|
||||||
value: production
|
|
||||||
Reference in New Issue
Block a user